aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-02-05 16:58:38 -0800
committerGlenn Morris2012-02-05 16:58:38 -0800
commite7bc51d012a620268da85763e8bc233a1132ff3b (patch)
treec0212d0bdba68d4967a3d5d6aa94d49005c91175
parent866c1d22181fda6b0df3e9bf2c5f0bab9ee4a393 (diff)
downloademacs-e7bc51d012a620268da85763e8bc233a1132ff3b.tar.gz
emacs-e7bc51d012a620268da85763e8bc233a1132ff3b.zip
* doc/lispref/modes.texi (Running Hooks): Mention run-hook-wrapped.
* etc/NEWS: Related edit.
-rw-r--r--doc/lispref/ChangeLog2
-rw-r--r--doc/lispref/modes.texi8
-rw-r--r--etc/NEWS4
3 files changed, 14 insertions, 0 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 933fe82f1e8..e184f263737 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,5 +1,7 @@
12012-02-06 Glenn Morris <rgm@gnu.org> 12012-02-06 Glenn Morris <rgm@gnu.org>
2 2
3 * modes.texi (Running Hooks): Mention run-hook-wrapped.
4
3 * control.texi (Handling Errors): 5 * control.texi (Handling Errors):
4 Mention condition-case-no-debug and with-demoted-errors. 6 Mention condition-case-no-debug and with-demoted-errors.
5 7
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 638ab89e37f..b4aa39dfbb9 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -163,6 +163,14 @@ A wrapper-hook also allows for a hook function to completely replace the
163default definition (by not calling @var{fun}). 163default definition (by not calling @var{fun}).
164@end defmac 164@end defmac
165 165
166@defun run-hook-wrapped hook wrap-function &rest args
167This function is similar to @code{run-hook-with-args-until-success}.
168Like that function, it runs the functions on the abnormal hook
169@code{hook}, stopping at the first one that returns non-@code{nil}.
170Instead of calling the hook functions directly, though, it actually
171calls @code{wrap-function} with arguments @code{fun} and @code{args}.
172@end defun
173
166@node Setting Hooks 174@node Setting Hooks
167@subsection Setting Hooks 175@subsection Setting Hooks
168 176
diff --git a/etc/NEWS b/etc/NEWS
index 136ff60fec3..86b4f60dddf 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1236,8 +1236,12 @@ Instead, the offending function is removed.
1236 1236
1237** New hook types 1237** New hook types
1238 1238
1239+++
1239*** New function `run-hook-wrapped' for running an abnormal hook by 1240*** New function `run-hook-wrapped' for running an abnormal hook by
1240passing the hook functions as arguments to a "wrapping" function. 1241passing the hook functions as arguments to a "wrapping" function.
1242Like `run-hook-with-args-until-success', it stops at the first
1243non-nil retun value.
1244
1241+++ 1245+++
1242*** New macro `with-wrapper-hook' for running an abnormal hook as a 1246*** New macro `with-wrapper-hook' for running an abnormal hook as a
1243set of "wrapping" filters, similar to around advice. 1247set of "wrapping" filters, similar to around advice.