From dd6b8ea7a87c3597abb9c5ff3e527b30507017ac Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 16 May 2000 21:37:32 +0000 Subject: [PATCH] (remove-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 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 -- 2.39.5