Commit 2248c40d authored by Sam Steingold's avatar Sam Steingold
Browse files

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

parent b15f3b77
2000-05-16 Sam Steingold <>
* subr.el (add-hook): `setq' hook-value, not `set'.
2000-05-16 Gerd Moellmann <>
* startup.el (command-line-1): Mention the FAQ in the startup
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment