mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-21 13:53:38 -05:00
add-hook! fix hooks that take arguments
This commit is contained in:
@@ -76,10 +76,10 @@ Examples:
|
||||
(forms '()))
|
||||
(mapc
|
||||
(lambda (f) (let ((func (cond ((symbolp f) `(quote ,f))
|
||||
(t `(lambda () ,@func-or-forms)))))
|
||||
(mapc
|
||||
(lambda (h) (push `(add-hook ',(if quoted h (intern (format "%s-hook" h))) ,func) forms))
|
||||
(if (listp hook) hook (list hook))))) funcs)
|
||||
(t `(lambda (&rest _) ,@func-or-forms)))))
|
||||
(mapc
|
||||
(lambda (h) (push `(add-hook ',(if quoted h (intern (format "%s-hook" h))) ,func) forms))
|
||||
(if (listp hook) hook (list hook))))) funcs)
|
||||
`(progn ,@forms)))
|
||||
|
||||
(cl-defmacro associate! (mode &key minor
|
||||
|
Reference in New Issue
Block a user