emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r105176: Clarify manual and `add-hook


From: Lars Magne Ingebrigtsen
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105176: Clarify manual and `add-hook' doc string about buffer-local hooks
Date: Wed, 13 Jul 2011 23:38:56 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105176
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Wed 2011-07-13 23:38:56 +0200
message:
  Clarify manual and `add-hook' doc string about buffer-local hooks
modified:
  doc/emacs/ChangeLog
  doc/emacs/custom.texi
  lisp/ChangeLog
  lisp/subr.el
=== modified file 'doc/emacs/ChangeLog'
--- a/doc/emacs/ChangeLog       2011-07-13 17:55:04 +0000
+++ b/doc/emacs/ChangeLog       2011-07-13 21:38:56 +0000
@@ -1,3 +1,7 @@
+2011-07-13  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * custom.texi (Hooks): Mention buffer-local hooks (bug#6218).
+
 2011-07-13  Glenn Morris  <address@hidden>
 
        * dired.texi (Dired Enter): Mention --dired.  (Bug#9039)

=== modified file 'doc/emacs/custom.texi'
--- a/doc/emacs/custom.texi     2011-07-10 04:05:33 +0000
+++ b/doc/emacs/custom.texi     2011-07-13 21:38:56 +0000
@@ -820,6 +820,12 @@
 can clear out individual functions by calling @code{remove-hook}, or
 do @code{(setq @var{hook-variable} nil)} to remove everything.
 
address@hidden buffer-local hooks
+  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.
+
 @node Locals
 @subsection Local Variables
 

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-07-13 21:27:13 +0000
+++ b/lisp/ChangeLog    2011-07-13 21:38:56 +0000
@@ -1,5 +1,8 @@
 2011-07-13  Lars Magne Ingebrigtsen  <address@hidden>
 
+       * subr.el (add-hook): Clarify section about buffer-local hooks
+       (bug#6218).
+
        * dired.el (dired-flagged): Clarify doc string (bug#6117).
 
 2011-07-13  Juanma Barranquero  <address@hidden>

=== modified file 'lisp/subr.el'
--- a/lisp/subr.el      2011-07-12 07:26:48 +0000
+++ b/lisp/subr.el      2011-07-13 21:38:56 +0000
@@ -1262,10 +1262,10 @@
 FUNCTION is added at the end.
 
 The optional fourth argument, LOCAL, if non-nil, says to modify
-the hook's buffer-local value rather than its default value.
-This makes the hook buffer-local if needed, and it makes t a member
-of the buffer-local value.  That acts as a flag to run the hook
-functions in the default value as well as in the local value.
+the hook's buffer-local value rather than its global value.
+This makes the hook buffer-local, and it makes t a member of the
+buffer-local value.  That acts as a flag to run the hook
+functions of the global value as well as in the local value.
 
 HOOK should be a symbol, and FUNCTION may be any valid function.  If
 HOOK is void, it is first set to nil.  If HOOK's value is a single


reply via email to

[Prev in Thread] Current Thread [Next in Thread]