We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
+hook-once!
1 parent 4dd3285 commit 4a08072Copy full SHA for 4a08072
elisp/+minemacs.el
@@ -241,7 +241,8 @@ DEPTH and LOCAL are passed as is to `add-hook'."
241
(defmacro +hook-once! (hook &rest body)
242
"Hook BODY in HOOK, it runs only once."
243
(declare (indent 1))
244
- (let ((fn-name (intern (format "+hook-once--function-%d-h" (cl-incf +hook-once-num)))))
+ (let ((hook (+unquote hook))
245
+ (fn-name (intern (format "+hook-once--function-%d-h" (cl-incf +hook-once-num)))))
246
`(add-hook
247
',hook
248
(defun ,fn-name ()
0 commit comments