diff options
| author | Glenn Morris | 2012-02-05 16:58:38 -0800 |
|---|---|---|
| committer | Glenn Morris | 2012-02-05 16:58:38 -0800 |
| commit | e7bc51d012a620268da85763e8bc233a1132ff3b (patch) | |
| tree | c0212d0bdba68d4967a3d5d6aa94d49005c91175 | |
| parent | 866c1d22181fda6b0df3e9bf2c5f0bab9ee4a393 (diff) | |
| download | emacs-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/ChangeLog | 2 | ||||
| -rw-r--r-- | doc/lispref/modes.texi | 8 | ||||
| -rw-r--r-- | etc/NEWS | 4 |
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 @@ | |||
| 1 | 2012-02-06 Glenn Morris <rgm@gnu.org> | 1 | 2012-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 | |||
| 163 | default definition (by not calling @var{fun}). | 163 | default definition (by not calling @var{fun}). |
| 164 | @end defmac | 164 | @end defmac |
| 165 | 165 | ||
| 166 | @defun run-hook-wrapped hook wrap-function &rest args | ||
| 167 | This function is similar to @code{run-hook-with-args-until-success}. | ||
| 168 | Like that function, it runs the functions on the abnormal hook | ||
| 169 | @code{hook}, stopping at the first one that returns non-@code{nil}. | ||
| 170 | Instead of calling the hook functions directly, though, it actually | ||
| 171 | calls @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 | ||
| @@ -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 |
| 1240 | passing the hook functions as arguments to a "wrapping" function. | 1241 | passing the hook functions as arguments to a "wrapping" function. |
| 1242 | Like `run-hook-with-args-until-success', it stops at the first | ||
| 1243 | non-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 |
| 1243 | set of "wrapping" filters, similar to around advice. | 1247 | set of "wrapping" filters, similar to around advice. |