aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2002-04-10 14:55:19 +0000
committerRichard M. Stallman2002-04-10 14:55:19 +0000
commit1087f3e6aac217dac65ba83270a700ee310ab984 (patch)
treee3bb4663ebe3d095000e78aff798c59e8a4069db
parent360e0dd587bd834889a6129da782bcd170e6a8e9 (diff)
downloademacs-1087f3e6aac217dac65ba83270a700ee310ab984.tar.gz
emacs-1087f3e6aac217dac65ba83270a700ee310ab984.zip
(remove-hook): When there are no more local hooks,
kill the buffer-local value.
-rw-r--r--lisp/subr.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 5a80298ca59..16359fa87bb 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -808,7 +808,11 @@ This makes the hook buffer-local if needed."
808 ;; (not (member (cons 'not function) hook-value))) 808 ;; (not (member (cons 'not function) hook-value)))
809 ;; (push (cons 'not function) hook-value)) 809 ;; (push (cons 'not function) hook-value))
810 ;; Set the actual variable 810 ;; Set the actual variable
811 (if local (set hook hook-value) (set-default hook hook-value)))) 811 (if (not local)
812 (set-default hook hook-value)
813 (if (equal hook-value '(t))
814 (kill-local-variable hook)
815 (set hook hook-value)))))
812 816
813(defun add-to-list (list-var element &optional append) 817(defun add-to-list (list-var element &optional append)
814 "Add to the value of LIST-VAR the element ELEMENT if it isn't there yet. 818 "Add to the value of LIST-VAR the element ELEMENT if it isn't there yet.