emacs-devel
[Top][All Lists]
Advanced

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

Re: Multiple next-error sources


From: Daniel Colascione
Subject: Re: Multiple next-error sources
Date: Fri, 07 Nov 2014 15:24:51 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 11/07/2014 02:59 PM, Stefan Monnier wrote:
>> The advantage of hooks is that it makes it easier for users to
>> customize the behavior by adding and removing various entries.
> 
> While it's true that
> 
>     (add-hook 'next-error-functions #'my-function)
> 
> is shorter than
> 
>     (add-function :before-until next-error-function #'my-function)
> 
> I don't think it warrants the addition of a next-error-functions.
> 
> If the :before-until is the problematic part, then I guess we should
> look for ways to improve that (e.g. a better name, or some way for
> a variable to say that :before-until is the default when adding
> functions to it?).
> 
>> Is add-function intended to replace hooks like this in general?
> 
> Somewhat, yes.  I have no intention to go around and replace existing
> hooks in the forseeable future (except for those rare hooks that used
> with-wrapper-hook), but I'll favor new foo-function over new
> foo-functions.

I strongly dislike this approach. It conflates customization points with
implementation details. Hook variables clearly separate the two ideas.

There's also no buffer-local add-function equivalent.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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