]> code.delx.au - gnu-emacs/commitdiff
(Defining Minor Modes): Explain effect of command
authorRichard M. Stallman <rms@gnu.org>
Tue, 2 Jan 2007 20:57:30 +0000 (20:57 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 2 Jan 2007 20:57:30 +0000 (20:57 +0000)
defined with define-global-minor-mode on new buffers.

lispref/modes.texi

index 29c316d625de35516769c6f96da8a4a30a47dfaa..c5fd0159ac2cc5b7fb8a9ada7e04262f13b8da08 100644 (file)
@@ -1480,12 +1480,15 @@ See the command \\[hungry-electric-delete]."
 @end smallexample
 
 @defmac define-global-minor-mode global-mode mode turn-on keyword-args@dots{}
-This defines a global minor mode named @var{global-mode} whose meaning
-is to enable the buffer-local minor mode @var{mode} in every buffer.
-To turn on the minor mode in a buffer, it uses the function
+This defines a global toggle named @var{global-mode} whose meaning is
+to enable or disable the buffer-local minor mode @var{mode} in all
+buffers.  To turn on the minor mode in a buffer, it uses the function
 @var{turn-on}; to turn off the minor mode, it calls @code{mode} with
 @minus{}1 as argument.
 
+Globally enabling the mode also affects buffers subsequently created
+by visiting files, but not buffers subsequently created in other ways.
+
 Use @code{:group @var{group}} in @var{keyword-args} to specify the
 custom group for the mode variable of the global minor mode.
 @end defmac