changeset 28940:2a91228f7aa3

(add-hook): setq hook-value, not set
author Sam Steingold <sds@gnu.org>
date Tue, 16 May 2000 14:47:46 +0000
parents c5964d5c6afa
children 54b181bf04dc
files lisp/ChangeLog lisp/subr.el
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue May 16 14:37:08 2000 +0000
+++ b/lisp/ChangeLog	Tue May 16 14:47:46 2000 +0000
@@ -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
--- a/lisp/subr.el	Tue May 16 14:37:08 2000 +0000
+++ b/lisp/subr.el	Tue May 16 14:47:46 2000 +0000
@@ -704,7 +704,7 @@
   (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