summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2011-07-13 23:42:54 +0200
committerLars Magne Ingebrigtsen <larsi@gnus.org>2011-07-13 23:42:54 +0200
commit63d55f1f91e7ed9bc9a190a9861103b955ef6381 (patch)
treea6529ceb7fd6718077924901ed2609f9e4c68906 /doc
parent465c5fc88d4d7f0cbeba1a12852a4be70d6ed28b (diff)
downloademacs-63d55f1f91e7ed9bc9a190a9861103b955ef6381.tar.gz
* modes.texi (Running Hooks): Mention buffer-local hook variables
Fixes: debbugs:6218
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/ChangeLog3
-rw-r--r--doc/lispref/modes.texi15
2 files changed, 13 insertions, 5 deletions
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 <larsi@gnus.org>
+ * 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