Add remove-hook!
This commit is contained in:
parent
e2cb712b18
commit
de7e8c33a7
1 changed files with 9 additions and 2 deletions
|
@ -119,11 +119,18 @@ Examples:
|
|||
(dolist (fn funcs)
|
||||
(setq fn (if (symbolp fn) `(quote ,fn) `(lambda (&rest args) ,@args)))
|
||||
(dolist (h hooks)
|
||||
(push `(add-hook ',(if quoted-p h (intern (format "%s-hook" h)))
|
||||
(push `(,(if (boundp 'hook-fn) hook-fn 'add-hook)
|
||||
',(if quoted-p h (intern (format "%s-hook" h)))
|
||||
,fn ,append-p ,local-p)
|
||||
forms)))
|
||||
`(progn ,@(reverse forms)))))
|
||||
|
||||
(defmacro remove-hook! (&rest args)
|
||||
"Convenience macro for `remove-hook'. Takes the same arguments as
|
||||
`add-hook!'."
|
||||
(let ((hook-fn 'remove-hook))
|
||||
(macroexpand `(add-hook! ,@args))))
|
||||
|
||||
(defmacro associate! (mode &rest plist)
|
||||
"Associate a major or minor mode to certain patterns and project files."
|
||||
(declare (indent 1))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue