# HG changeset patch # User Richard M. Stallman # Date 1018450519 0 # Node ID b64869712ee015942b3dc50686d2c7d4e966a160 # Parent 9d117150b0a2c5ec7153c2c5c5c0af997a736d8f (remove-hook): When there are no more local hooks, kill the buffer-local value. diff -r 9d117150b0a2 -r b64869712ee0 lisp/subr.el --- 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.