diff options
| author | Glenn Morris | 2012-02-04 12:59:54 -0800 |
|---|---|---|
| committer | Glenn Morris | 2012-02-04 12:59:54 -0800 |
| commit | c7291ad983d8494ff826b5c2eb4f5611b014de89 (patch) | |
| tree | f9723dd27feb3c73c8de6d746e1919dcd2409db9 /lisp | |
| parent | 3723ec07bf3a91a786ba4d5deba68f3d0eda2494 (diff) | |
| download | emacs-c7291ad983d8494ff826b5c2eb4f5611b014de89.tar.gz emacs-c7291ad983d8494ff826b5c2eb4f5611b014de89.zip | |
with-wrapper-hook doc clarifications
* doc/lispref/modes.texi (Running Hooks): Try to clarify with-wrapper-hook.
* lisp/subr.el (with-wrapper-hook): Doc fixes.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/subr.el | 23 |
2 files changed, 15 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 89ce0f67408..2d618c6454c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2012-02-04 Glenn Morris <rgm@gnu.org> | 1 | 2012-02-04 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * subr.el (with-wrapper-hook): Doc fixes. | ||
| 4 | |||
| 3 | * simple.el (filter-buffer-substring-functions) | 5 | * simple.el (filter-buffer-substring-functions) |
| 4 | (buffer-substring-filters, filter-buffer-substring): Doc fixes. | 6 | (buffer-substring-filters, filter-buffer-substring): Doc fixes. |
| 5 | 7 | ||
diff --git a/lisp/subr.el b/lisp/subr.el index 36bca654208..e735fd9577d 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1373,16 +1373,19 @@ around the preceding ones, like a set of nested `around' advices. | |||
| 1373 | Each hook function should accept an argument list consisting of a | 1373 | Each hook function should accept an argument list consisting of a |
| 1374 | function FUN, followed by the additional arguments in ARGS. | 1374 | function FUN, followed by the additional arguments in ARGS. |
| 1375 | 1375 | ||
| 1376 | The FUN passed to the first hook function in HOOK performs BODY, | 1376 | The first hook function in HOOK is passed a FUN that, if it is called |
| 1377 | if it is called with arguments ARGS. The FUN passed to each | 1377 | with arguments ARGS, performs BODY (i.e., the default operation). |
| 1378 | successive hook function is defined based on the preceding hook | 1378 | The FUN passed to each successive hook function is defined based |
| 1379 | functions; if called with arguments ARGS, it does what the | 1379 | on the preceding hook functions; if called with arguments ARGS, |
| 1380 | `with-wrapper-hook' call would do if the preceding hook functions | 1380 | it does what the `with-wrapper-hook' call would do if the |
| 1381 | were the only ones present in HOOK. | 1381 | preceding hook functions were the only ones present in HOOK. |
| 1382 | 1382 | ||
| 1383 | In the function definition of each hook function, FUN can be | 1383 | Each hook function may call its FUN argument as many times as it wishes, |
| 1384 | called any number of times (including not calling it at all). | 1384 | including never. In that case, such a hook function acts to replace |
| 1385 | That function definition is then used to construct the FUN passed | 1385 | the default definition altogether, and any preceding hook functions. |
| 1386 | Of course, a subsequent hook function may do the same thing. | ||
| 1387 | |||
| 1388 | Each hook function definition is used to construct the FUN passed | ||
| 1386 | to the next hook function, if any. The last (or \"outermost\") | 1389 | to the next hook function, if any. The last (or \"outermost\") |
| 1387 | FUN is then called once." | 1390 | FUN is then called once." |
| 1388 | (declare (indent 2) (debug (form sexp body))) | 1391 | (declare (indent 2) (debug (form sexp body))) |