aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2021-10-23 20:03:34 +0200
committerStefan Kangas2021-10-23 20:03:34 +0200
commit4fd5c8df67e2eb41dd0ea6d95586bbd8d09cc482 (patch)
tree398be37af2cd86e7967c6871796038856240ab13
parent6fa520677095c5872f1d448f6f1001ee22e42276 (diff)
downloademacs-4fd5c8df67e2eb41dd0ea6d95586bbd8d09cc482.tar.gz
emacs-4fd5c8df67e2eb41dd0ea6d95586bbd8d09cc482.zip
Clarify abnormal hook documentation
* doc/lispref/hooks.texi (Standard Hooks): * doc/lispref/modes.texi (Hooks): Clarify wording of "abnormal hook" documentation. (Bug#34588)
-rw-r--r--doc/lispref/hooks.texi12
-rw-r--r--doc/lispref/modes.texi12
2 files changed, 13 insertions, 11 deletions
diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi
index feec8b24f46..e9d1e270d8e 100644
--- a/doc/lispref/hooks.texi
+++ b/doc/lispref/hooks.texi
@@ -18,11 +18,13 @@ arguments and their values are completely ignored. The recommended way
18to put a new function on such a hook is to call @code{add-hook}. 18to put a new function on such a hook is to call @code{add-hook}.
19@xref{Hooks}, for more information about using hooks. 19@xref{Hooks}, for more information about using hooks.
20 20
21The variables whose names end in @samp{-functions} are usually @dfn{abnormal 21The variables whose names end in @samp{-functions} are usually
22hooks} (some old code may also use the deprecated @samp{-hooks} suffix); their 22@dfn{abnormal hooks} (some old code may also use the deprecated
23values are lists of functions, but these functions are called in a special way 23@samp{-hooks} suffix). Their values are lists of functions, but these
24(they are passed arguments, or their return values are used). The variables 24functions are called in a special way: they are either passed
25whose names end in @samp{-function} have single functions as their values. 25arguments, or their return values are used in some way. The variables
26whose names end in @samp{-function} have single functions as their
27values.
26 28
27This is not an exhaustive list, it only covers the more general hooks. 29This is not an exhaustive list, it only covers the more general hooks.
28For example, every major mode defines a hook named 30For example, every major mode defines a hook named
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index ee55f982d02..ed0c535867f 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -59,12 +59,12 @@ runs just before Emacs suspends itself (@pxref{Suspending Emacs}).
59 59
60@cindex abnormal hook 60@cindex abnormal hook
61 If the hook variable's name does not end with @samp{-hook}, that 61 If the hook variable's name does not end with @samp{-hook}, that
62indicates it is probably an @dfn{abnormal hook}. That means the hook 62indicates it is probably an @dfn{abnormal hook}. That means one of
63functions are called with arguments, or their return values are used 63two things: either that the hook functions are called with arguments,
64in some way. The hook's documentation says how the functions are 64or that their return values are used in some way. The hook's
65called. Any functions added to an abnormal hook must follow the 65documentation says how the functions are called. Any functions added
66hook's calling convention. By convention, abnormal hook names end in 66to an abnormal hook must follow the hook's calling convention. By
67@samp{-functions}. 67convention, abnormal hook names end in @samp{-functions}.
68 68
69@cindex single-function hook 69@cindex single-function hook
70If the name of the variable ends in @samp{-predicate} or 70If the name of the variable ends in @samp{-predicate} or