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:
parent
866c1d2218
commit
e7bc51d012
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
4
etc/NEWS
4
etc/NEWS
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user