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:
Henrik Lissner 2018-01-08 14:55:54 -05:00
parent f2e5321ce1
commit 7777f9940e
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 8 additions and 8 deletions

View file

@ -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