emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: remove-hook.


From: Lute Kamstra
Subject: Re: remove-hook.
Date: Tue, 07 Oct 2003 16:00:36 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> When does remove-hook need to make a hook buffer-local to remove a
>> function from it?
>
> (add-hook 'foo-hook 'bar)
> (remove-hook 'foo-hook 'bar 'local)
>
>
> PS: Admittedly, this doesn't work in Emacs-CVS because the only way this
>     can work is if we can put "negative" entries on the local side of
>     a hook to disable an element on the global side.  

If it doesn't work, the docstring is confusing.

>     I have code to make it work, 

I'm curious... can I have a peek?

>     but last time this came up RMS said it was overkill.

I tend to agree that such a system would get rather complicated.  It
also seems necessary to keep remove-hook efficient: when I
instrumented it, I noticed that it was called twice every keystroke.


  Lute.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]