Fix insertion order of add-hook! when appending
When appending multiple functions to a hook(s) with add-hook!, insertion order was not preserved. e.g. => (add-hook! :append 'some-mode-hook #'(hook-1 hook-2)) => some-mode-hook (hook-2 hook-1)
This commit is contained in:
parent
fcb5284393
commit
dda81f7b54
1 changed files with 1 additions and 1 deletions
|
@ -304,7 +304,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 ,@forms))))
|
||||
`(progn ,@(if append-p (nreverse forms) 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