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

This commit is contained in:
Sam Steingold 2000-05-16 14:47:46 +00:00
parent b15f3b7779
commit 2248c40dab
2 changed files with 5 additions and 1 deletions

View file

@ -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

View file

@ -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