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:
parent
f2e5321ce1
commit
7777f9940e
2 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue