diff options
| author | Lars Magne Ingebrigtsen | 2011-07-13 23:38:56 +0200 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2011-07-13 23:38:56 +0200 |
| commit | 465c5fc88d4d7f0cbeba1a12852a4be70d6ed28b (patch) | |
| tree | c1b3b1cf913cd2e0de9bc0ae8b94de656df307c7 | |
| parent | 5827450416985ed689cfa0ca1843a2ec2b0cd31d (diff) | |
| download | emacs-465c5fc88d4d7f0cbeba1a12852a4be70d6ed28b.tar.gz emacs-465c5fc88d4d7f0cbeba1a12852a4be70d6ed28b.zip | |
Clarify manual and `add-hook' doc string about buffer-local hooks
| -rw-r--r-- | doc/emacs/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/emacs/custom.texi | 6 | ||||
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/subr.el | 8 |
4 files changed, 17 insertions, 4 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 0102e028d49..e21a02f700f 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * custom.texi (Hooks): Mention buffer-local hooks (bug#6218). | ||
| 4 | |||
| 1 | 2011-07-13 Glenn Morris <rgm@gnu.org> | 5 | 2011-07-13 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * dired.texi (Dired Enter): Mention --dired. (Bug#9039) | 7 | * dired.texi (Dired Enter): Mention --dired. (Bug#9039) |
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 8465dd93519..6a6d465438d 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi | |||
| @@ -820,6 +820,12 @@ the versions you added will remain in the hook variable together. You | |||
| 820 | can clear out individual functions by calling @code{remove-hook}, or | 820 | can clear out individual functions by calling @code{remove-hook}, or |
| 821 | do @code{(setq @var{hook-variable} nil)} to remove everything. | 821 | do @code{(setq @var{hook-variable} nil)} to remove everything. |
| 822 | 822 | ||
| 823 | @cindex buffer-local hooks | ||
| 824 | If the hook variable is buffer-local, the buffer-local variable will | ||
| 825 | be used instead of the global variable. However, if the buffer-local | ||
| 826 | variable contains the element @code{t}, the global hook variable will | ||
| 827 | be run as well. | ||
| 828 | |||
| 823 | @node Locals | 829 | @node Locals |
| 824 | @subsection Local Variables | 830 | @subsection Local Variables |
| 825 | 831 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 41a7f0b1d2e..be42c4b8b2a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org> | 1 | 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 2 | ||
| 3 | * subr.el (add-hook): Clarify section about buffer-local hooks | ||
| 4 | (bug#6218). | ||
| 5 | |||
| 3 | * dired.el (dired-flagged): Clarify doc string (bug#6117). | 6 | * dired.el (dired-flagged): Clarify doc string (bug#6117). |
| 4 | 7 | ||
| 5 | 2011-07-13 Juanma Barranquero <lekktu@gmail.com> | 8 | 2011-07-13 Juanma Barranquero <lekktu@gmail.com> |
diff --git a/lisp/subr.el b/lisp/subr.el index 5c9d6c8d724..a2f560461eb 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1262,10 +1262,10 @@ unless the optional argument APPEND is non-nil, in which case | |||
| 1262 | FUNCTION is added at the end. | 1262 | FUNCTION is added at the end. |
| 1263 | 1263 | ||
| 1264 | The optional fourth argument, LOCAL, if non-nil, says to modify | 1264 | The optional fourth argument, LOCAL, if non-nil, says to modify |
| 1265 | the hook's buffer-local value rather than its default value. | 1265 | the hook's buffer-local value rather than its global value. |
| 1266 | This makes the hook buffer-local if needed, and it makes t a member | 1266 | This makes the hook buffer-local, and it makes t a member of the |
| 1267 | of the buffer-local value. That acts as a flag to run the hook | 1267 | buffer-local value. That acts as a flag to run the hook |
| 1268 | functions in the default value as well as in the local value. | 1268 | functions of the global value as well as in the local value. |
| 1269 | 1269 | ||
| 1270 | HOOK should be a symbol, and FUNCTION may be any valid function. If | 1270 | HOOK should be a symbol, and FUNCTION may be any valid function. If |
| 1271 | HOOK is void, it is first set to nil. If HOOK's value is a single | 1271 | HOOK is void, it is first set to nil. If HOOK's value is a single |