diff options
| author | Lute Kamstra | 2005-02-24 14:20:14 +0000 |
|---|---|---|
| committer | Lute Kamstra | 2005-02-24 14:20:14 +0000 |
| commit | f24be0a7621a5c29bd809ca8ad6c7e40097a2376 (patch) | |
| tree | 206052dd4bac9635a570855cd0ed7ef4d39356ac | |
| parent | 48a3600355ff9727c23ffd4b17e6a9c80023910b (diff) | |
| download | emacs-f24be0a7621a5c29bd809ca8ad6c7e40097a2376.tar.gz emacs-f24be0a7621a5c29bd809ca8ad6c7e40097a2376.zip | |
(Defining Minor Modes): Explain that INIT-VALUE, LIGHTER, and KEYMAP
can be omitted when KEYWORD-ARGS are used.
| -rw-r--r-- | lispref/modes.texi | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lispref/modes.texi b/lispref/modes.texi index 62f152e1d41..530044ac037 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi | |||
| @@ -1100,7 +1100,7 @@ characters are reserved for major modes.) | |||
| 1100 | The macro @code{define-minor-mode} offers a convenient way of | 1100 | The macro @code{define-minor-mode} offers a convenient way of |
| 1101 | implementing a mode in one self-contained definition. | 1101 | implementing a mode in one self-contained definition. |
| 1102 | 1102 | ||
| 1103 | @defmac define-minor-mode mode doc [init-value [lighter [keymap keyword-args... body...]]] | 1103 | @defmac define-minor-mode mode doc [init-value [lighter [keymap]]] keyword-args... body... |
| 1104 | @tindex define-minor-mode | 1104 | @tindex define-minor-mode |
| 1105 | This macro defines a new minor mode whose name is @var{mode} (a | 1105 | This macro defines a new minor mode whose name is @var{mode} (a |
| 1106 | symbol). It defines a command named @var{mode} to toggle the minor | 1106 | symbol). It defines a command named @var{mode} to toggle the minor |
| @@ -1121,8 +1121,10 @@ specifying bindings in this form: | |||
| 1121 | (@var{key-sequence} . @var{definition}) | 1121 | (@var{key-sequence} . @var{definition}) |
| 1122 | @end example | 1122 | @end example |
| 1123 | 1123 | ||
| 1124 | The @var{keyword-args} consist of keywords followed by corresponding | 1124 | The above three arguments @var{init-value}, @var{lighter}, and |
| 1125 | values. A few keywords have special meanings: | 1125 | @var{keymap} can be (partially) omitted when @var{keyword-args} are |
| 1126 | used. The @var{keyword-args} consist of keywords followed by | ||
| 1127 | corresponding values. A few keywords have special meanings: | ||
| 1126 | 1128 | ||
| 1127 | @table @code | 1129 | @table @code |
| 1128 | @item :global @var{global} | 1130 | @item :global @var{global} |