diff options
| author | Richard M. Stallman | 1995-06-15 13:28:17 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-06-15 13:28:17 +0000 |
| commit | fc0cb073e0ae12a632c7cabc46cb4782dee291f5 (patch) | |
| tree | 60c10c46a9e6f425f023846a6954b9276e903b9a /lispref | |
| parent | 1ce7f687682a8c06bd09f9db80cb70f7dc8d546e (diff) | |
| download | emacs-fc0cb073e0ae12a632c7cabc46cb4782dee291f5.tar.gz emacs-fc0cb073e0ae12a632c7cabc46cb4782dee291f5.zip | |
Explain how make-local-hook works.
Diffstat (limited to 'lispref')
| -rw-r--r-- | lispref/modes.texi | 7 |
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 | |||
| 1383 | buffer. When a hook variable is local, it can have local and global | 1383 | buffer. When a hook variable is local, it can have local and global |
| 1384 | hook functions, and @code{run-hooks} runs all of them. | 1384 | hook functions, and @code{run-hooks} runs all of them. |
| 1385 | 1385 | ||
| 1386 | This function works by making @code{t} an element of the buffer-local | ||
| 1387 | value. That serves as a flag to use the hook functions in the default | ||
| 1388 | value 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 | ||
| 1390 | with all normal hooks. It works for only some non-normal hooks---those | ||
| 1391 | whose callers have been updated to understand this meaning of @code{t}. | ||
| 1392 | |||
| 1386 | Do not use @code{make-local-variable} directly for hook variables; it is | 1393 | Do not use @code{make-local-variable} directly for hook variables; it is |
| 1387 | not sufficient. | 1394 | not sufficient. |
| 1388 | @end defun | 1395 | @end defun |