1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-13 16:38:14 +00:00

* doc/lispref/modes.texi (Running Hooks): Mention run-hook-wrapped.

* etc/NEWS: Related edit.
This commit is contained in:
Glenn Morris 2012-02-05 16:58:38 -08:00
parent 866c1d2218
commit e7bc51d012
3 changed files with 14 additions and 0 deletions

View File

@ -1,5 +1,7 @@
2012-02-06 Glenn Morris <rgm@gnu.org>
* modes.texi (Running Hooks): Mention run-hook-wrapped.
* control.texi (Handling Errors):
Mention condition-case-no-debug and with-demoted-errors.

View File

@ -163,6 +163,14 @@ A wrapper-hook also allows for a hook function to completely replace the
default definition (by not calling @var{fun}).
@end defmac
@defun run-hook-wrapped hook wrap-function &rest args
This function is similar to @code{run-hook-with-args-until-success}.
Like that function, it runs the functions on the abnormal hook
@code{hook}, stopping at the first one that returns non-@code{nil}.
Instead of calling the hook functions directly, though, it actually
calls @code{wrap-function} with arguments @code{fun} and @code{args}.
@end defun
@node Setting Hooks
@subsection Setting Hooks

View File

@ -1236,8 +1236,12 @@ Instead, the offending function is removed.
** New hook types
+++
*** New function `run-hook-wrapped' for running an abnormal hook by
passing the hook functions as arguments to a "wrapping" function.
Like `run-hook-with-args-until-success', it stops at the first
non-nil retun value.
+++
*** New macro `with-wrapper-hook' for running an abnormal hook as a
set of "wrapping" filters, similar to around advice.