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.