summaryrefslogtreecommitdiff
path: root/lispref
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-06-15 13:28:17 +0000
committerRichard M. Stallman <rms@gnu.org>1995-06-15 13:28:17 +0000
commit4f3f0be401102c31d50c84e77159e0535bad4b62 (patch)
tree9b78e25f5463cced27050965eff58ae087d0b414 /lispref
parent0c8dc0526ffff99bacd2d4a6f5f607432aaf3ffe (diff)
downloademacs-4f3f0be401102c31d50c84e77159e0535bad4b62.tar.gz
Explain how make-local-hook works.
Diffstat (limited to 'lispref')
-rw-r--r--lispref/modes.texi7
1 files changed, 7 insertions, 0 deletions
diff --git a/lispref/modes.texi b/lispref/modes.texi
index 77cb11302a0..08016dbfddc 100644
--- a/lispref/modes.texi
+++ b/lispref/modes.texi
@@ -1383,6 +1383,13 @@ This function makes the hook variable @code{hook} local to the current
buffer. When a hook variable is local, it can have local and global
hook functions, and @code{run-hooks} runs all of them.
+This function works by making @code{t} an element of the buffer-local
+value. That serves as a flag to use the hook functions in the default
+value of the hook variable as well as those in the local value. Since
+@code{run-hooks} understands this flag, @code{make-local-hook} works
+with all normal hooks. It works for only some non-normal hooks---those
+whose callers have been updated to understand this meaning of @code{t}.
+
Do not use @code{make-local-variable} directly for hook variables; it is
not sufficient.
@end defun