aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2007-01-02 20:57:30 +0000
committerRichard M. Stallman2007-01-02 20:57:30 +0000
commit14bafd7ea7daae51a55707a66c8ab27533033aad (patch)
treee0221db7908fe470b18e576483ef0d1400482f68
parentd00767411fac6b7c50f1b0954ce48e9e98852da1 (diff)
downloademacs-14bafd7ea7daae51a55707a66c8ab27533033aad.tar.gz
emacs-14bafd7ea7daae51a55707a66c8ab27533033aad.zip
(Defining Minor Modes): Explain effect of command
defined with define-global-minor-mode on new buffers.
-rw-r--r--lispref/modes.texi9
1 files changed, 6 insertions, 3 deletions
diff --git a/lispref/modes.texi b/lispref/modes.texi
index 29c316d625d..c5fd0159ac2 100644
--- a/lispref/modes.texi
+++ b/lispref/modes.texi
@@ -1480,12 +1480,15 @@ See the command \\[hungry-electric-delete]."
1480@end smallexample 1480@end smallexample
1481 1481
1482@defmac define-global-minor-mode global-mode mode turn-on keyword-args@dots{} 1482@defmac define-global-minor-mode global-mode mode turn-on keyword-args@dots{}
1483This defines a global minor mode named @var{global-mode} whose meaning 1483This defines a global toggle named @var{global-mode} whose meaning is
1484is to enable the buffer-local minor mode @var{mode} in every buffer. 1484to enable or disable the buffer-local minor mode @var{mode} in all
1485To turn on the minor mode in a buffer, it uses the function 1485buffers. To turn on the minor mode in a buffer, it uses the function
1486@var{turn-on}; to turn off the minor mode, it calls @code{mode} with 1486@var{turn-on}; to turn off the minor mode, it calls @code{mode} with
1487@minus{}1 as argument. 1487@minus{}1 as argument.
1488 1488
1489Globally enabling the mode also affects buffers subsequently created
1490by visiting files, but not buffers subsequently created in other ways.
1491
1489Use @code{:group @var{group}} in @var{keyword-args} to specify the 1492Use @code{:group @var{group}} in @var{keyword-args} to specify the
1490custom group for the mode variable of the global minor mode. 1493custom group for the mode variable of the global minor mode.
1491@end defmac 1494@end defmac