]> code.delx.au - gnu-emacs/commitdiff
* doc/lispref/modes.texi (Running Hooks): Mention run-hook-wrapped.
authorGlenn Morris <rgm@gnu.org>
Mon, 6 Feb 2012 00:58:38 +0000 (16:58 -0800)
committerGlenn Morris <rgm@gnu.org>
Mon, 6 Feb 2012 00:58:38 +0000 (16:58 -0800)
* etc/NEWS: Related edit.

doc/lispref/ChangeLog
doc/lispref/modes.texi
etc/NEWS

index 933fe82f1e8fae26b9c549efdb3eff7ec08f7065..e184f2637375dcbdc3a85c4175e69f8d87aa7450 100644 (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.
 
index 638ab89e37fcc937be96a7421febdb44c718b38b..b4aa39dfbb9a98f1090b57677be5b8c26cf5459c 100644 (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
 
index 136ff60fec30f12c6eb14db15d146b6b1142e396..86b4f60dddf675bfb87122b115eb24c9a365b60a 100644 (file)
--- a/etc/NEWS
+++ b/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.