1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-24 07:20:37 +00:00

(remove-hook): When there are no more local hooks,

kill the buffer-local value.
This commit is contained in:
Richard M. Stallman 2002-04-10 14:55:19 +00:00
parent 360e0dd587
commit 1087f3e6aa

View File

@ -808,7 +808,11 @@ This makes the hook buffer-local if needed."
;; (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.