aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2012-02-04 12:59:54 -0800
committerGlenn Morris2012-02-04 12:59:54 -0800
commitc7291ad983d8494ff826b5c2eb4f5611b014de89 (patch)
treef9723dd27feb3c73c8de6d746e1919dcd2409db9 /lisp
parent3723ec07bf3a91a786ba4d5deba68f3d0eda2494 (diff)
downloademacs-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/ChangeLog2
-rw-r--r--lisp/subr.el23
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 @@
12012-02-04 Glenn Morris <rgm@gnu.org> 12012-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.
1373Each hook function should accept an argument list consisting of a 1373Each hook function should accept an argument list consisting of a
1374function FUN, followed by the additional arguments in ARGS. 1374function FUN, followed by the additional arguments in ARGS.
1375 1375
1376The FUN passed to the first hook function in HOOK performs BODY, 1376The first hook function in HOOK is passed a FUN that, if it is called
1377if it is called with arguments ARGS. The FUN passed to each 1377with arguments ARGS, performs BODY (i.e., the default operation).
1378successive hook function is defined based on the preceding hook 1378The FUN passed to each successive hook function is defined based
1379functions; if called with arguments ARGS, it does what the 1379on the preceding hook functions; if called with arguments ARGS,
1380`with-wrapper-hook' call would do if the preceding hook functions 1380it does what the `with-wrapper-hook' call would do if the
1381were the only ones present in HOOK. 1381preceding hook functions were the only ones present in HOOK.
1382 1382
1383In the function definition of each hook function, FUN can be 1383Each hook function may call its FUN argument as many times as it wishes,
1384called any number of times (including not calling it at all). 1384including never. In that case, such a hook function acts to replace
1385That function definition is then used to construct the FUN passed 1385the default definition altogether, and any preceding hook functions.
1386Of course, a subsequent hook function may do the same thing.
1387
1388Each hook function definition is used to construct the FUN passed
1386to the next hook function, if any. The last (or \"outermost\") 1389to the next hook function, if any. The last (or \"outermost\")
1387FUN is then called once." 1390FUN is then called once."
1388 (declare (indent 2) (debug (form sexp body))) 1391 (declare (indent 2) (debug (form sexp body)))