Skip to content

Commit

Permalink
Don't pass the arguments to the hook.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralt committed Oct 1, 2015
1 parent 5a81230 commit 44c1313
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions command.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ out, an element can just be the argument type."
(let ((%interactivep% *interactivep*)
(*interactivep* nil))
(declare (ignorable %interactivep%))
(run-hook-with-args *pre-command-hook* ',name (list ,@args))
(run-hook-with-args *pre-command-hook* ',name)
(multiple-value-prog1
(progn ,@body)
(run-hook-with-args *post-command-hook* ',name (list ,@args)))))
(run-hook-with-args *post-command-hook* ',name))))
(export ',name)
(setf (gethash ',name *command-hash*)
(make-command :name ',name
Expand Down
8 changes: 4 additions & 4 deletions primitives.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,12 @@ the mode-line")
the mode-line, the button clicked, and the x and y of the pointer.")

(defvar *pre-command-hook* '()
"Called before a command is called. It is called with 2 arguments,
the command as a symbol and a list of the arguments.")
"Called before a command is called. It is called with 1 argument:
the command as a symbol.")

(defvar *post-command-hook* '()
"Called after a command is called. It is called with 2 arguments,
the command as a symbol and a list of the arguments.")
"Called after a command is called. It is called with 1 argument:
the command as a symbol.")

;; Data types and globals used by stumpwm

Expand Down

0 comments on commit 44c1313

Please sign in to comment.