diff options
| author | Glenn Morris | 2012-02-01 00:32:31 -0800 |
|---|---|---|
| committer | Glenn Morris | 2012-02-01 00:32:31 -0800 |
| commit | 7a9a2fc6c85fb27a7b7deb60b6de4f7db84b59e8 (patch) | |
| tree | fe140004fa993f01018b03b605849266f34d4c49 | |
| parent | e2cef717da50fcb5c1e3a58b35b34dc13a5f3fb1 (diff) | |
| download | emacs-7a9a2fc6c85fb27a7b7deb60b6de4f7db84b59e8.tar.gz emacs-7a9a2fc6c85fb27a7b7deb60b6de4f7db84b59e8.zip | |
Document locally disabling globalized minor modes in the lispref
* doc/lispref/modes.texi (Defining Minor Modes):
Mention disabling global minor modes on a per-major-mode basis.
* etc/NEWS: Clarify entry.
| -rw-r--r-- | doc/lispref/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/modes.texi | 7 | ||||
| -rw-r--r-- | etc/NEWS | 5 |
3 files changed, 15 insertions, 2 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index e2ea774fd48..6a8b7750f0b 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-02-01 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * modes.texi (Defining Minor Modes): | ||
| 4 | Mention disabling global minor modes on a per-major-mode basis. | ||
| 5 | |||
| 1 | 2012-01-31 Chong Yidong <cyd@gnu.org> | 6 | 2012-01-31 Chong Yidong <cyd@gnu.org> |
| 2 | 7 | ||
| 3 | * syntax.texi (Parsing Expressions): Clarify intro (Bug#10657). | 8 | * syntax.texi (Parsing Expressions): Clarify intro (Bug#10657). |
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 5536006ecbe..6f99ddc3972 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -1521,8 +1521,15 @@ starts, for example by providing a @code{:require} keyword. | |||
| 1521 | 1521 | ||
| 1522 | Use @code{:group @var{group}} in @var{keyword-args} to specify the | 1522 | Use @code{:group @var{group}} in @var{keyword-args} to specify the |
| 1523 | custom group for the mode variable of the global minor mode. | 1523 | custom group for the mode variable of the global minor mode. |
| 1524 | |||
| 1525 | When you define a globalized minor mode, you should generally also | ||
| 1526 | define a non-globalized version to toggle the mode on an individual | ||
| 1527 | buffer basis. This allows users to disable a globally enabled minor | ||
| 1528 | mode in a specific major mode if they wish, by deactivating the local | ||
| 1529 | minor mode in the major mode's hook. | ||
| 1524 | @end defmac | 1530 | @end defmac |
| 1525 | 1531 | ||
| 1532 | |||
| 1526 | @node Mode Line Format | 1533 | @node Mode Line Format |
| 1527 | @section Mode-Line Format | 1534 | @section Mode-Line Format |
| 1528 | @cindex mode line | 1535 | @cindex mode line |
| @@ -1290,8 +1290,9 @@ on-the-fly spell checking for comments and strings. | |||
| 1290 | *** New hook `change-major-mode-after-body-hook', run by | 1290 | *** New hook `change-major-mode-after-body-hook', run by |
| 1291 | `run-mode-hooks' just before any other mode hooks. | 1291 | `run-mode-hooks' just before any other mode hooks. |
| 1292 | 1292 | ||
| 1293 | *** Enabled globalized minor modes can be disabled in specific modes, | 1293 | *** Enabled globalized minor modes can be disabled in specific major modes. |
| 1294 | by running (FOO-mode-hook 0) via a mode hook. | 1294 | If the global mode is global-FOO-mode, then run (FOO-mode -1) in the |
| 1295 | major mode's hook, where FOO-mode toggles the mode on a per-buffer basis. | ||
| 1295 | 1296 | ||
| 1296 | +++ | 1297 | +++ |
| 1297 | *** `define-minor-mode' accepts a new keyword :variable. | 1298 | *** `define-minor-mode' accepts a new keyword :variable. |