From: Lars Magne Ingebrigtsen Date: Wed, 13 Jul 2011 21:42:54 +0000 (+0200) Subject: * modes.texi (Running Hooks): Mention buffer-local hook variables X-Git-Tag: emacs-pretest-24.0.90~104^2~306 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=63d55f1f91e7ed9bc9a190a9861103b955ef6381;p=emacs.git * modes.texi (Running Hooks): Mention buffer-local hook variables Fixes: debbugs:6218 --- diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index d7a0fd14ae4..1a62dd88dfc 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,5 +1,8 @@ 2011-07-13 Lars Magne Ingebrigtsen + * modes.texi (Running Hooks): Mention buffer-local hook variables + (bug#6218). + * objects.texi (General Escape Syntax): "a with grave accent" is ?xe0, not ?x8e0 (bug#5259). diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index a8a10f750cc..dd3b2e3038f 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