projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c082ce
)
* lisp/subr.el (add-hook): Fix adding into hook--depth-alist (bug#51620).
author
Filipp Gunbin
<fgunbin@fastmail.fm>
Thu, 11 Nov 2021 16:44:27 +0000
(19:44 +0300)
committer
Filipp Gunbin
<fgunbin@fastmail.fm>
Thu, 11 Nov 2021 16:44:27 +0000
(19:44 +0300)
lisp/subr.el
patch
|
blob
|
history
diff --git
a/lisp/subr.el
b/lisp/subr.el
index 5a5842d4287a41daec7eb15a4b4b39f7263ab921..3902251586e3a477801bd39e548b345ffe54abfd 100644
(file)
--- a/
lisp/subr.el
+++ b/
lisp/subr.el
@@
-2042,7
+2042,7
@@
performance impact when running `add-hook' and `remove-hook'."
(when (or (get hook 'hook--depth-alist) (not (zerop depth)))
;; Note: The main purpose of the above `when' test is to avoid running
;; this `setf' before `gv' is loaded during bootstrap.
- (
push (cons function depth) (get hook 'hook--depth-alist)
))
+ (
setf (alist-get function (get hook 'hook--depth-alist) 0) depth
))
(setq hook-value
(if (< 0 depth)
(append hook-value (list function))