Commit e7bc51d0 authored by Glenn Morris's avatar Glenn Morris
Browse files

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

* etc/NEWS: Related edit.
parent 866c1d22
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
......
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment