[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: remove-hook.
From: |
Stefan Monnier |
Subject: |
Re: remove-hook. |
Date: |
07 Oct 2003 11:24:49 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
> And you still have the mechanism where t in the buffer-local value of
> a hook is substituted by the functions in the global value?
Sure. Think of it as:
(defun run-hook (h)
(let ((inhibit nil)
(funs (symbol-value h)))
(while funs
(let ((fun (pop funs)))
(cond
((eq 'not (car-safe fun)) (push fun inhibit))
((member fun inhibit) nil)
((eq t fun) (setq funs (append (default-value h) funs)))
(t (funcall fun)))))))
-- Stefan
Re: remove-hook., Luc Teirlinck, 2003/10/07
Re: remove-hook., Richard Stallman, 2003/10/08