aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-06-15 13:28:17 +0000
committerRichard M. Stallman1995-06-15 13:28:17 +0000
commitfc0cb073e0ae12a632c7cabc46cb4782dee291f5 (patch)
tree60c10c46a9e6f425f023846a6954b9276e903b9a
parent1ce7f687682a8c06bd09f9db80cb70f7dc8d546e (diff)
downloademacs-fc0cb073e0ae12a632c7cabc46cb4782dee291f5.tar.gz
emacs-fc0cb073e0ae12a632c7cabc46cb4782dee291f5.zip
Explain how make-local-hook works.
-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
1383buffer. When a hook variable is local, it can have local and global 1383buffer. When a hook variable is local, it can have local and global
1384hook functions, and @code{run-hooks} runs all of them. 1384hook functions, and @code{run-hooks} runs all of them.
1385 1385
1386This function works by making @code{t} an element of the buffer-local
1387value. That serves as a flag to use the hook functions in the default
1388value of the hook variable as well as those in the local value. Since
1389@code{run-hooks} understands this flag, @code{make-local-hook} works
1390with all normal hooks. It works for only some non-normal hooks---those
1391whose callers have been updated to understand this meaning of @code{t}.
1392
1386Do not use @code{make-local-variable} directly for hook variables; it is 1393Do not use @code{make-local-variable} directly for hook variables; it is
1387not sufficient. 1394not sufficient.
1388@end defun 1395@end defun