From: Stefan Monnier Date: Tue, 16 May 2000 21:37:32 +0000 (+0000) Subject: (remove-hook): `setq' hook-value, not `set'. X-Git-Tag: emacs-pretest-21.0.90~3932 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dd6b8ea7a87c3597abb9c5ff3e527b30507017ac;p=emacs.git (remove-hook): `setq' hook-value, not `set'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9a26a771f34..467bfa0eaf0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2000-05-16 Stefan Monnier + + * subr.el (remove-hook): `setq' hook-value, not `set'. + 2000-05-16 Sam Steingold * info.el (debug-ignored-errors): more errors to ignore. diff --git a/lisp/subr.el b/lisp/subr.el index 38b721f2511..65d26d2007a 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -735,7 +735,7 @@ To make a hook variable buffer-local, always use (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 removal if necessary (setq hook-value (delete function (copy-sequence hook-value))) ;; If the function is on the global hook, we need to shadow it locally