emacs-devel
[Top][All Lists]
Advanced

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

Re: with-wrapper-hook is obsolete; how to replace it?


From: Stefan Monnier
Subject: Re: with-wrapper-hook is obsolete; how to replace it?
Date: Sun, 15 May 2016 14:43:59 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> How do I alter the code to use add-function instead?
> It's not immediately obvious. That is, if there is source code like this:

I don't think you can do it in a backward-compatible way.
Which is why buffer-substring--filter still uses with-wrapper-hook (but
only to implement the obsolete filter-buffer-substring-functions variable).

> then what should I replace the source code with?

The replacement is that instead of using add-hook on
filter-buffer-substring-functions, clients should now use add-function
on filter-buffer-substring-function.


        Stefan




reply via email to

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