Mercurial > emacs
changeset 44473:b64869712ee0
(remove-hook): When there are no more local hooks,
kill the buffer-local value.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 10 Apr 2002 14:55:19 +0000 |
parents | 9d117150b0a2 |
children | c3654e3e894b |
files | lisp/subr.el |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/subr.el Wed Apr 10 14:47:27 2002 +0000 +++ b/lisp/subr.el Wed Apr 10 14:55:19 2002 +0000 @@ -808,7 +808,11 @@ ;; (not (member (cons 'not function) hook-value))) ;; (push (cons 'not function) hook-value)) ;; Set the actual variable - (if local (set hook hook-value) (set-default hook hook-value)))) + (if (not local) + (set-default hook hook-value) + (if (equal hook-value '(t)) + (kill-local-variable hook) + (set hook hook-value))))) (defun add-to-list (list-var element &optional append) "Add to the value of LIST-VAR the element ELEMENT if it isn't there yet.