emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r107041: Document locally disabling g


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107041: Document locally disabling globalized minor modes in the lispref
Date: Wed, 01 Feb 2012 00:32:31 -0800
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107041
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2012-02-01 00:32:31 -0800
message:
  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.
modified:
  doc/lispref/ChangeLog
  doc/lispref/modes.texi
  etc/NEWS
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2012-01-31 06:51:33 +0000
+++ b/doc/lispref/ChangeLog     2012-02-01 08:32:31 +0000
@@ -1,3 +1,8 @@
+2012-02-01  Glenn Morris  <address@hidden>
+
+       * modes.texi (Defining Minor Modes):
+       Mention disabling global minor modes on a per-major-mode basis.
+
 2012-01-31  Chong Yidong  <address@hidden>
 
        * syntax.texi (Parsing Expressions): Clarify intro (Bug#10657).

=== modified file 'doc/lispref/modes.texi'
--- a/doc/lispref/modes.texi    2012-01-31 05:03:09 +0000
+++ b/doc/lispref/modes.texi    2012-02-01 08:32:31 +0000
@@ -1521,8 +1521,15 @@
 
 Use @code{:group @var{group}} in @var{keyword-args} to specify the
 custom group for the mode variable of the global minor mode.
+
+When you define a globalized minor mode, you should generally also
+define a non-globalized version to toggle the mode on an individual
+buffer basis.  This allows users to disable a globally enabled minor
+mode in a specific major mode if they wish, by deactivating the local
+minor mode in the major mode's hook.
 @end defmac
 
+
 @node Mode Line Format
 @section Mode-Line Format
 @cindex mode line

=== modified file 'etc/NEWS'
--- a/etc/NEWS  2012-01-31 05:03:09 +0000
+++ b/etc/NEWS  2012-02-01 08:32:31 +0000
@@ -1290,8 +1290,9 @@
 *** New hook `change-major-mode-after-body-hook', run by
 `run-mode-hooks' just before any other mode hooks.
 
-*** Enabled globalized minor modes can be disabled in specific modes,
-by running (FOO-mode-hook 0) via a mode hook.
+*** Enabled globalized minor modes can be disabled in specific major modes.
+If the global mode is global-FOO-mode, then run (FOO-mode -1) in the
+major mode's hook, where FOO-mode toggles the mode on a per-buffer basis.
 
 +++
 *** `define-minor-mode' accepts a new keyword :variable.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]