aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2000-05-16 21:37:32 +0000
committerStefan Monnier2000-05-16 21:37:32 +0000
commitdd6b8ea7a87c3597abb9c5ff3e527b30507017ac (patch)
treea045fb6501fdce6b1682db5cf59a14060aca34ee
parent4ba7246dc5dcfa7480e10fa4a6f6df1bda12611e (diff)
downloademacs-dd6b8ea7a87c3597abb9c5ff3e527b30507017ac.tar.gz
emacs-dd6b8ea7a87c3597abb9c5ff3e527b30507017ac.zip
(remove-hook): `setq' hook-value, not `set'.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/subr.el2
2 files changed, 5 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9a26a771f34..467bfa0eaf0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12000-05-16 Stefan Monnier <monnier@cs.yale.edu>
2
3 * subr.el (remove-hook): `setq' hook-value, not `set'.
4
12000-05-16 Sam Steingold <sds@gnu.org> 52000-05-16 Sam Steingold <sds@gnu.org>
2 6
3 * info.el (debug-ignored-errors): more errors to ignore. 7 * info.el (debug-ignored-errors): more errors to ignore.
diff --git a/lisp/subr.el b/lisp/subr.el
index 38b721f2511..65d26d2007a 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -735,7 +735,7 @@ To make a hook variable buffer-local, always use
735 (let ((hook-value (if local (symbol-value hook) (default-value hook)))) 735 (let ((hook-value (if local (symbol-value hook) (default-value hook))))
736 ;; If the hook value is a single function, turn it into a list. 736 ;; If the hook value is a single function, turn it into a list.
737 (when (or (not (listp hook-value)) (eq (car hook-value) 'lambda)) 737 (when (or (not (listp hook-value)) (eq (car hook-value) 'lambda))
738 (set hook-value (list hook-value))) 738 (setq hook-value (list hook-value)))
739 ;; Do the actual removal if necessary 739 ;; Do the actual removal if necessary
740 (setq hook-value (delete function (copy-sequence hook-value))) 740 (setq hook-value (delete function (copy-sequence hook-value)))
741 ;; If the function is on the global hook, we need to shadow it locally 741 ;; If the function is on the global hook, we need to shadow it locally