aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-08-09 12:09:14 +0000
committerRichard M. Stallman2005-08-09 12:09:14 +0000
commit32808f83562a90037e5ae45e21159cb4b53a7f95 (patch)
tree24008e4482ee93cd72e8b39e22cb88894f4e2421
parent0fb9f9aed49a6b8ab60d716acbf6014508c4c5df (diff)
downloademacs-32808f83562a90037e5ae45e21159cb4b53a7f95.tar.gz
emacs-32808f83562a90037e5ae45e21159cb4b53a7f95.zip
(Defining Minor Modes): Explain when init-value can be non-nil.
-rw-r--r--lispref/modes.texi11
1 files changed, 10 insertions, 1 deletions
diff --git a/lispref/modes.texi b/lispref/modes.texi
index 053e7a511e8..098a2d57068 100644
--- a/lispref/modes.texi
+++ b/lispref/modes.texi
@@ -1373,7 +1373,8 @@ symbol). It defines a command named @var{mode} to toggle the minor
1373mode, with @var{doc} as its documentation string. It also defines a 1373mode, with @var{doc} as its documentation string. It also defines a
1374variable named @var{mode}, which is set to @code{t} or @code{nil} by 1374variable named @var{mode}, which is set to @code{t} or @code{nil} by
1375enabling or disabling the mode. The variable is initialized to 1375enabling or disabling the mode. The variable is initialized to
1376@var{init-value}. 1376@var{init-value}. Except in unusual circumstances (see below), this
1377value must be @code{nil}.
1377 1378
1378The string @var{lighter} says what to display in the mode line 1379The string @var{lighter} says what to display in the mode line
1379when the mode is enabled; if it is @code{nil}, the mode is not displayed 1380when the mode is enabled; if it is @code{nil}, the mode is not displayed
@@ -1424,6 +1425,14 @@ as setting the variable named @var{mode} and then executes the
1424variable @code{@var{mode}-hook}. 1425variable @code{@var{mode}-hook}.
1425@end defmac 1426@end defmac
1426 1427
1428 The initial value must be @code{nil} except in cases where (1) the
1429mode is preloaded in Emacs, or (2) it is painless to for loading to
1430enable the mode even though the user did not request it. For
1431instance, if the mode has no effect unless something else is enabled,
1432and will always be loaded by that time, enabling it by default is
1433harmless. But these are unusual circumstances. Normally, the
1434initial value must be @code{nil}.
1435
1427@findex easy-mmode-define-minor-mode 1436@findex easy-mmode-define-minor-mode
1428 The name @code{easy-mmode-define-minor-mode} is an alias 1437 The name @code{easy-mmode-define-minor-mode} is an alias
1429for this macro. 1438for this macro.