diff options
| author | Richard M. Stallman | 1996-09-01 22:44:57 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-09-01 22:44:57 +0000 |
| commit | dd73b091cbdfa4a9268fb0de925faab04e5bab44 (patch) | |
| tree | 00b6ec415506b4160f49e5cf28a411855b69e407 /lispref/hooks.texi | |
| parent | 4f8aaa7480ecc26189f1a338bd7f45f6d54446bf (diff) | |
| download | emacs-dd73b091cbdfa4a9268fb0de925faab04e5bab44.tar.gz emacs-dd73b091cbdfa4a9268fb0de925faab04e5bab44.zip | |
Explain better about abnormal hooks.
Diffstat (limited to 'lispref/hooks.texi')
| -rw-r--r-- | lispref/hooks.texi | 25 |
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 | ||
| 12 | Most of these variables have names ending with @samp{-hook}. They are | 12 | Most 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 |
| 14 | a hook is a list of functions. The recommended way to put a new | 14 | a hook is a list of functions; the functions are called with no |
| 15 | function on such a hook is to call @code{add-hook}. @xref{Hooks}, for | 15 | arguments and their values are completely ignored. The recommended way |
| 16 | more information about using hooks. | 16 | to 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 | ||
| 18 | The variables whose names end in @samp{-function} have single functions | 19 | The variables whose names end in @samp{-hooks} or @samp{-functions} are |
| 19 | as their values. Usually there is a specific reason why the variable is | 20 | usually @dfn{abnormal hooks}; their values are lists of functions, but |
| 20 | not a normal hook, such as the need to pass arguments to the function. | 21 | these functions are called in a special way (they are passed arguments, |
| 21 | (In older Emacs versions, some of these variables had names ending in | 22 | or their values are used). A few of these variables are actually normal |
| 22 | @samp{-hook} even though they were not normal hooks.) | 23 | hooks which were named before we established the convention that normal |
| 24 | hooks' names should end in @samp{-hook}. | ||
| 23 | 25 | ||
| 24 | The variables whose names end in @samp{-hooks} or @samp{-functions} have | 26 | The variables whose names end in @samp{-function} have single functions |
| 25 | lists of functions as their values, but these functions are called in a | 27 | as their values. (In older Emacs versions, some of these variables had |
| 26 | special way (they are passed arguments, or else their values are used). | 28 | names ending in @samp{-hook} even though they were not normal hooks; |
| 29 | however, 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 |