diff options
| author | Richard M. Stallman | 2007-01-02 20:57:30 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2007-01-02 20:57:30 +0000 |
| commit | 14bafd7ea7daae51a55707a66c8ab27533033aad (patch) | |
| tree | e0221db7908fe470b18e576483ef0d1400482f68 | |
| parent | d00767411fac6b7c50f1b0954ce48e9e98852da1 (diff) | |
| download | emacs-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.texi | 9 |
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{} |
| 1483 | This defines a global minor mode named @var{global-mode} whose meaning | 1483 | This defines a global toggle named @var{global-mode} whose meaning is |
| 1484 | is to enable the buffer-local minor mode @var{mode} in every buffer. | 1484 | to enable or disable the buffer-local minor mode @var{mode} in all |
| 1485 | To turn on the minor mode in a buffer, it uses the function | 1485 | buffers. 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 | ||
| 1489 | Globally enabling the mode also affects buffers subsequently created | ||
| 1490 | by visiting files, but not buffers subsequently created in other ways. | ||
| 1491 | |||
| 1489 | Use @code{:group @var{group}} in @var{keyword-args} to specify the | 1492 | Use @code{:group @var{group}} in @var{keyword-args} to specify the |
| 1490 | custom group for the mode variable of the global minor mode. | 1493 | custom group for the mode variable of the global minor mode. |
| 1491 | @end defmac | 1494 | @end defmac |