aboutsummaryrefslogtreecommitdiffstats
path: root/lispref/hooks.texi
diff options
context:
space:
mode:
authorRichard M. Stallman1996-09-01 22:44:57 +0000
committerRichard M. Stallman1996-09-01 22:44:57 +0000
commitdd73b091cbdfa4a9268fb0de925faab04e5bab44 (patch)
tree00b6ec415506b4160f49e5cf28a411855b69e407 /lispref/hooks.texi
parent4f8aaa7480ecc26189f1a338bd7f45f6d54446bf (diff)
downloademacs-dd73b091cbdfa4a9268fb0de925faab04e5bab44.tar.gz
emacs-dd73b091cbdfa4a9268fb0de925faab04e5bab44.zip
Explain better about abnormal hooks.
Diffstat (limited to 'lispref/hooks.texi')
-rw-r--r--lispref/hooks.texi25
1 files changed, 14 insertions, 11 deletions
diff --git a/lispref/hooks.texi b/lispref/hooks.texi
index 18f8bcfcad5..046ac7cc5d5 100644
--- a/lispref/hooks.texi
+++ b/lispref/hooks.texi
@@ -11,19 +11,22 @@ functions to be called from within Emacs on suitable occasions.
11 11
12Most of these variables have names ending with @samp{-hook}. They are 12Most of these variables have names ending with @samp{-hook}. They are
13@dfn{normal hooks}, run by means of @code{run-hooks}. The value of such 13@dfn{normal hooks}, run by means of @code{run-hooks}. The value of such
14a hook is a list of functions. The recommended way to put a new 14a hook is a list of functions; the functions are called with no
15function on such a hook is to call @code{add-hook}. @xref{Hooks}, for 15arguments and their values are completely ignored. The recommended way
16more information about using hooks. 16to put a new function on such a hook is to call @code{add-hook}.
17@xref{Hooks}, for more information about using hooks.
17 18
18The variables whose names end in @samp{-function} have single functions 19The variables whose names end in @samp{-hooks} or @samp{-functions} are
19as their values. Usually there is a specific reason why the variable is 20usually @dfn{abnormal hooks}; their values are lists of functions, but
20not a normal hook, such as the need to pass arguments to the function. 21these functions are called in a special way (they are passed arguments,
21(In older Emacs versions, some of these variables had names ending in 22or their values are used). A few of these variables are actually normal
22@samp{-hook} even though they were not normal hooks.) 23hooks which were named before we established the convention that normal
24hooks' names should end in @samp{-hook}.
23 25
24The variables whose names end in @samp{-hooks} or @samp{-functions} have 26The variables whose names end in @samp{-function} have single functions
25lists of functions as their values, but these functions are called in a 27as their values. (In older Emacs versions, some of these variables had
26special way (they are passed arguments, or else their values are used). 28names ending in @samp{-hook} even though they were not normal hooks;
29however, we have renamed all of those.)
27 30
28@c !!! need xref to where each hook is documented or else document it 31@c !!! need xref to where each hook is documented or else document it
29@c by specifying what is expected, and when it is called relative to 32@c by specifying what is expected, and when it is called relative to