Skip to content

Commit

Permalink
tweak(core): accept optional args in +hook-once!
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Jun 14, 2023
1 parent 7ca7b66 commit 9db34ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elisp/+minemacs.el
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ DEPTH and LOCAL are passed as is to `add-hook'."
(fn-name (intern (format "+hook-once--function-%d-h" (cl-incf +hook-once-num)))))
`(add-hook
',hook
(defun ,fn-name ()
(defun ,fn-name (&rest _)
,(macroexp-progn body)
(remove-hook ',hook ',fn-name)))))

Expand Down

0 comments on commit 9db34ce

Please sign in to comment.