diff options
Diffstat (limited to 'lispref/modes.texi')
-rw-r--r-- | lispref/modes.texi | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lispref/modes.texi b/lispref/modes.texi index 29c316d625d..1d96568fc1d 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi @@ -1,7 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2002, -@c 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001, +@c 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../info/modes @node Modes, Documentation, Keymaps, Top @@ -1480,12 +1480,17 @@ 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, and buffers that use a major mode other than +Fundamental mode; but it does not detect the creation of a new buffer +in Fundamental mode. + 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 |