mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Change add-hook! macro to retain hook order
(add-hook! hook '(1 2 3)) should set hook to `(1 2 3 ,@old-hooks). Before this, they would be pushed sequentially, resulting in hook = `(3 2 1 ,@old hooks)`
This commit is contained in:
@ -157,7 +157,7 @@ Body forms can access the hook's arguments through the let-bound variable
|
||||
`(remove-hook ',hook ,fn ,local-p)
|
||||
`(add-hook ',hook ,fn ,append-p ,local-p))
|
||||
forms)))
|
||||
`(progn ,@(nreverse forms)))))
|
||||
`(progn ,@forms))))
|
||||
|
||||
(defmacro remove-hook! (&rest args)
|
||||
"Convenience macro for `remove-hook'. Takes the same arguments as
|
||||
|
Reference in New Issue
Block a user