Commit dd6b8ea7 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(remove-hook): `setq' hook-value, not `set'.

parent 4ba7246d
2000-05-16 Stefan Monnier <monnier@cs.yale.edu>
* subr.el (remove-hook): `setq' hook-value, not `set'.
2000-05-16 Sam Steingold <sds@gnu.org> 2000-05-16 Sam Steingold <sds@gnu.org>
* info.el (debug-ignored-errors): more errors to ignore. * info.el (debug-ignored-errors): more errors to ignore.
......
...@@ -735,7 +735,7 @@ To make a hook variable buffer-local, always use ...@@ -735,7 +735,7 @@ To make a hook variable buffer-local, always use
(let ((hook-value (if local (symbol-value hook) (default-value hook)))) (let ((hook-value (if local (symbol-value hook) (default-value hook))))
;; If the hook value is a single function, turn it into a list. ;; If the hook value is a single function, turn it into a list.
(when (or (not (listp hook-value)) (eq (car hook-value) 'lambda)) (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 ;; Do the actual removal if necessary
(setq hook-value (delete function (copy-sequence hook-value))) (setq hook-value (delete function (copy-sequence hook-value)))
;; If the function is on the global hook, we need to shadow it locally ;; If the function is on the global hook, we need to shadow it locally
......
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