diff options
author | Lars Magne Ingebrigtsen <[email protected]> | 2011-07-13 23:42:54 +0200 |
---|---|---|
committer | Lars Magne Ingebrigtsen <[email protected]> | 2011-07-13 23:42:54 +0200 |
commit | 63d55f1f91e7ed9bc9a190a9861103b955ef6381 (patch) | |
tree | a6529ceb7fd6718077924901ed2609f9e4c68906 /doc/lispref/modes.texi | |
parent | 465c5fc88d4d7f0cbeba1a12852a4be70d6ed28b (diff) |
* modes.texi (Running Hooks): Mention buffer-local hook variables
Fixes: debbugs:6218
Diffstat (limited to 'doc/lispref/modes.texi')
-rw-r--r-- | doc/lispref/modes.texi | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index a8a10f750c..dd3b2e3038 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -101,6 +101,11 @@ one, with no arguments. The hook variable's value can also be a single function---either a lambda expression or a symbol with a function definition---which @code{run-hooks} calls. But this usage is obsolete. + +If the hook variable is buffer-local, the buffer-local variable will +be used instead of the global variable. However, if the buffer-local +variable contains the element @code{t}, the global hook variable will +be run as well. @end defun @defun run-hook-with-args hook &rest args @@ -169,11 +174,11 @@ function goes at the end of the hook list and will be executed last. value is a single function; it sets or changes the value to a list of functions. -If @var{local} is non-@code{nil}, that says to add @var{function} to -the buffer-local hook list instead of to the global hook list. If -needed, this makes the hook buffer-local and adds @code{t} to the -buffer-local value. The latter acts as a flag to run the hook -functions in the default value as well as in the local value. +If @var{local} is non-@code{nil}, that says to add @var{function} to the +buffer-local hook list instead of to the global hook list. This makes +the hook buffer-local and adds @code{t} to the buffer-local value. The +latter acts as a flag to run the hook functions in the default value as +well as in the local value. @end defun @defun remove-hook hook function &optional local |