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,7 +76,7 @@ Examples:
|
||||
(forms '()))
|
||||
(mapc
|
||||
(lambda (f) (let ((func (cond ((symbolp f) `(quote ,f))
|
||||
(t `(lambda () ,@func-or-forms)))))
|
||||
(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)
|
||||
|
Reference in New Issue
Block a user