From: Sam Steingold <sds@gnu.org>
Date: Tue, 16 May 2000 14:47:46 +0000 (+0000)
Subject: (add-hook): setq hook-value, not set
X-Git-Tag: emacs-pretest-21.0.90~3937
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2248c40dab51a996745e215d74af0e30fac8b114;p=emacs.git

(add-hook): setq hook-value, not set
---

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c798d6a0a23..ee70d51bc1c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2000-05-16  Sam Steingold  <sds@gnu.org>
+
+	* subr.el (add-hook): `setq' hook-value, not `set'.
+
 2000-05-16  Gerd Moellmann  <gerd@gnu.org>
 
 	* 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."
   (let ((hook-value (if local (symbol-value hook) (default-value hook))))
     ;; If the hook value is a single function, turn it into a list.
     (when (or (not (listp hook-value)) (eq (car hook-value) 'lambda))
-      (set hook-value (list hook-value)))
+      (setq hook-value (list hook-value)))
     ;; Do the actual addition if necessary
     (unless (member function hook-value)
       (setq hook-value