[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lispref/modes.texi,v
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/lispref/modes.texi,v |
Date: |
Sat, 03 Feb 2007 17:11:39 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 07/02/03 17:11:39
Index: modes.texi
===================================================================
RCS file: /sources/emacs/emacs/lispref/modes.texi,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -b -r1.163 -r1.164
--- modes.texi 16 Jan 2007 03:28:53 -0000 1.163
+++ modes.texi 3 Feb 2007 17:11:39 -0000 1.164
@@ -1387,9 +1387,18 @@
Definitions}.
@item :global @var{global}
-If address@hidden specifies that the minor mode should be global. By
-default, minor modes defined with @code{define-minor-mode} are
-buffer-local.
+If address@hidden, this specifies that the minor mode should be global
+rather than buffer-local. It defaults to @code{nil}.
+
+One of the effects of making a minor mode global is that the
address@hidden variable becomes a customization variable; toggling it
+through the Custom interface to turn the mode on and off, and its
+value can be saved for future Emacs sessions (@pxref{Saving
+Customizations,,, emacs, The GNU Emacs Manual}. For the saved
+variable to work, you should ensure that the @code{define-minor-mode}
+form is evaluated each time Emacs starts; for packages that are not
+part of Emacs, the easiest way to do this is to specify a
address@hidden:require} keyword.
@item :init-value @var{init-value}
This is equivalent to specifying @var{init-value} positionally.
@@ -1479,7 +1488,7 @@
:group 'hunger)
@end smallexample
address@hidden define-global-minor-mode global-mode mode turn-on address@hidden
address@hidden define-globalized-minor-mode global-mode mode turn-on
address@hidden
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
@@ -1491,6 +1500,12 @@
Fundamental mode; but it does not detect the creation of a new buffer
in Fundamental mode.
+This defines the customization option @var{global-mode}
(@pxref{Customization}),
+which can be toggled in the Custom interface to turn the minor mode on
+and off. As with @code{define-minor-mode}, you should ensure that the
address@hidden form is evaluated each time Emacs
+starts, for example by providing a @code{:require} keyword.
+
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
- [Emacs-diffs] Changes to emacs/lispref/modes.texi,v,
Chong Yidong <=