(Defining Minor Modes): Explain effect of command
defined with define-global-minor-mode on new buffers.
This commit is contained in:
parent
d00767411f
commit
14bafd7ea7
1 changed files with 6 additions and 3 deletions
|
@ -1480,12 +1480,15 @@ See the command \\[hungry-electric-delete]."
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
@defmac define-global-minor-mode global-mode mode turn-on keyword-args@dots{}
|
@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
|
This defines a global toggle named @var{global-mode} whose meaning is
|
||||||
is to enable the buffer-local minor mode @var{mode} in every buffer.
|
to enable or disable the buffer-local minor mode @var{mode} in all
|
||||||
To turn on the minor mode in a buffer, it uses the function
|
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
|
@var{turn-on}; to turn off the minor mode, it calls @code{mode} with
|
||||||
@minus{}1 as argument.
|
@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
|
Use @code{:group @var{group}} in @var{keyword-args} to specify the
|
||||||
custom group for the mode variable of the global minor mode.
|
custom group for the mode variable of the global minor mode.
|
||||||
@end defmac
|
@end defmac
|
||||||
|
|
Loading…
Add table
Reference in a new issue