aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorSam Steingold2000-05-16 14:47:46 +0000
committerSam Steingold2000-05-16 14:47:46 +0000
commit2248c40dab51a996745e215d74af0e30fac8b114 (patch)
treed3c795fe3e5b4be757995d73bc203af2c4bc5f88 /lisp
parentb15f3b7779ac0e14fd31be00b5301f0358cb5e11 (diff)
downloademacs-2248c40dab51a996745e215d74af0e30fac8b114.tar.gz
emacs-2248c40dab51a996745e215d74af0e30fac8b114.zip
(add-hook): setq hook-value, not set
Diffstat (limited to 'lisp')
-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 c798d6a0a23..ee70d51bc1c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12000-05-16 Sam Steingold <sds@gnu.org>
2
3 * subr.el (add-hook): `setq' hook-value, not `set'.
4
12000-05-16 Gerd Moellmann <gerd@gnu.org> 52000-05-16 Gerd Moellmann <gerd@gnu.org>
2 6
3 * startup.el (command-line-1): Mention the FAQ in the startup 7 * startup.el (command-line-1): Mention the FAQ in the startup
diff --git a/lisp/subr.el b/lisp/subr.el
index d99153bf8cd..38b721f2511 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -704,7 +704,7 @@ function, it is changed to a list of functions."
704 (let ((hook-value (if local (symbol-value hook) (default-value hook)))) 704 (let ((hook-value (if local (symbol-value hook) (default-value hook))))
705 ;; If the hook value is a single function, turn it into a list. 705 ;; If the hook value is a single function, turn it into a list.
706 (when (or (not (listp hook-value)) (eq (car hook-value) 'lambda)) 706 (when (or (not (listp hook-value)) (eq (car hook-value) 'lambda))
707 (set hook-value (list hook-value))) 707 (setq hook-value (list hook-value)))
708 ;; Do the actual addition if necessary 708 ;; Do the actual addition if necessary
709 (unless (member function hook-value) 709 (unless (member function hook-value)
710 (setq hook-value 710 (setq hook-value