From: Richard M. Stallman Date: Thu, 15 Jun 1995 13:28:17 +0000 (+0000) Subject: Explain how make-local-hook works. X-Git-Tag: emacs-19.34~3625 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fc0cb073e0ae12a632c7cabc46cb4782dee291f5;p=emacs.git Explain how make-local-hook works. --- 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