[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.
signature.asc
Description: OpenPGP digital signature
- Re: Generalizing find-definition, (continued)
- Re: Generalizing find-definition, Dmitry Gutov, 2014/11/06
- Re: Generalizing find-definition, Stefan Monnier, 2014/11/06
- Re: Generalizing find-definition, Helmut Eller, 2014/11/06
- Multiple next-error sources, Jorgen Schaefer, 2014/11/06
- Re: Multiple next-error sources, Stefan Monnier, 2014/11/06
- Re: Multiple next-error sources, Jorgen Schaefer, 2014/11/07
- Re: Multiple next-error sources, Stefan Monnier, 2014/11/07
- Re: Multiple next-error sources,
Daniel Colascione <=
- Re: Multiple next-error sources, Stefan Monnier, 2014/11/07
- Re: Multiple next-error sources, Daniel Colascione, 2014/11/07
- Re: Multiple next-error sources, Stefan Monnier, 2014/11/07
- Re: Multiple next-error sources, Daniel Colascione, 2014/11/07
- Re: Multiple next-error sources, Stefan Monnier, 2014/11/07
- Re: Multiple next-error sources, Jorgen Schaefer, 2014/11/07
- Re: Multiple next-error sources, Stefan Monnier, 2014/11/07
- Re: Multiple next-error sources, Alan Mackenzie, 2014/11/07
- Re: Multiple next-error sources, Daniel Colascione, 2014/11/07
- Re: Multiple next-error sources, Alan Mackenzie, 2014/11/07