From 2248c40dab51a996745e215d74af0e30fac8b114 Mon Sep 17 00:00:00 2001 From: Sam Steingold Date: Tue, 16 May 2000 14:47:46 +0000 Subject: [PATCH] (add-hook): setq hook-value, not set --- lisp/ChangeLog | 4 ++++ lisp/subr.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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 + + * 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 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 -- 2.39.5