diff options
| author | Chong Yidong | 2010-08-22 15:30:26 -0400 |
|---|---|---|
| committer | Chong Yidong | 2010-08-22 15:30:26 -0400 |
| commit | bc7d7ea63ba9d98b3ecc3b6decf4392a651dcbfb (patch) | |
| tree | 5780ba9db2ad2249e4f2a401bc96952181a7c3a4 | |
| parent | 41a20de9f4bc77586ed2e7cb4c21cb7f89baaea8 (diff) | |
| download | emacs-bc7d7ea63ba9d98b3ecc3b6decf4392a651dcbfb.tar.gz emacs-bc7d7ea63ba9d98b3ecc3b6decf4392a651dcbfb.zip | |
Doc fix for define-minor-mode (Bug#6880).
* doc/lispref/modes.texi (Defining Minor Modes): Doc fix (Bug#6880).
* emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix (Bug#6880).
| -rw-r--r-- | doc/lispref/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/lispref/modes.texi | 12 | ||||
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 30 |
4 files changed, 31 insertions, 19 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 9379301ea4a..399c07d13f5 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-08-22 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * modes.texi (Defining Minor Modes): Doc fix (Bug#6880). | ||
| 4 | |||
| 1 | 2010-08-19 Chong Yidong <cyd@stupidchicken.com> | 5 | 2010-08-19 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 6 | ||
| 3 | * objects.texi (Bool-Vector Type): Minor definition tweak (Bug#6878). | 7 | * objects.texi (Bool-Vector Type): Minor definition tweak (Bug#6878). |
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 3953da59b93..12f16b67663 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -1411,14 +1411,20 @@ The string @var{lighter} says what to display in the mode line | |||
| 1411 | when the mode is enabled; if it is @code{nil}, the mode is not displayed | 1411 | when the mode is enabled; if it is @code{nil}, the mode is not displayed |
| 1412 | in the mode line. | 1412 | in the mode line. |
| 1413 | 1413 | ||
| 1414 | The optional argument @var{keymap} specifies the keymap for the minor mode. | 1414 | The optional argument @var{keymap} specifies the keymap for the minor |
| 1415 | It can be a variable name, whose value is the keymap, or it can be an alist | 1415 | mode. If non-@code{nil}, it should be a variable name (whose value is |
| 1416 | specifying bindings in this form: | 1416 | a keymap), a keymap, or an alist of the form |
| 1417 | 1417 | ||
| 1418 | @example | 1418 | @example |
| 1419 | (@var{key-sequence} . @var{definition}) | 1419 | (@var{key-sequence} . @var{definition}) |
| 1420 | @end example | 1420 | @end example |
| 1421 | 1421 | ||
| 1422 | @noindent | ||
| 1423 | where each @var{key-sequence} and @var{definition} are arguments | ||
| 1424 | suitable for passing to @code{define-key} (@pxref{Changing Key | ||
| 1425 | Bindings}). If @var{keymap} is a keymap or an alist, this also | ||
| 1426 | defines the variable @code{@var{mode}-map}. | ||
| 1427 | |||
| 1422 | The above three arguments @var{init-value}, @var{lighter}, and | 1428 | The above three arguments @var{init-value}, @var{lighter}, and |
| 1423 | @var{keymap} can be (partially) omitted when @var{keyword-args} are | 1429 | @var{keymap} can be (partially) omitted when @var{keyword-args} are |
| 1424 | used. The @var{keyword-args} consist of keywords followed by | 1430 | used. The @var{keyword-args} consist of keywords followed by |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3905bf6db80..45a7cf2c87e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-08-22 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix (Bug#6880). | ||
| 4 | |||
| 1 | 2010-08-21 Vinicius Jose Latorre <viniciusjl@ig.com.br> | 5 | 2010-08-21 Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 2 | 6 | ||
| 3 | * whitespace.el: Fix slow cursor movement (Bug#6172). Reported by | 7 | * whitespace.el: Fix slow cursor movement (Bug#6172). Reported by |
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 13e08667839..a48816f99c6 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el | |||
| @@ -86,25 +86,23 @@ replacing its case-insensitive matches with the literal string in LIGHTER." | |||
| 86 | ;;;###autoload | 86 | ;;;###autoload |
| 87 | (defmacro define-minor-mode (mode doc &optional init-value lighter keymap &rest body) | 87 | (defmacro define-minor-mode (mode doc &optional init-value lighter keymap &rest body) |
| 88 | "Define a new minor mode MODE. | 88 | "Define a new minor mode MODE. |
| 89 | This function defines the associated control variable MODE, keymap MODE-map, | 89 | This defines the control variable MODE and the toggle command MODE. |
| 90 | and toggle command MODE. | ||
| 91 | |||
| 92 | DOC is the documentation for the mode toggle command. | 90 | DOC is the documentation for the mode toggle command. |
| 91 | |||
| 93 | Optional INIT-VALUE is the initial value of the mode's variable. | 92 | Optional INIT-VALUE is the initial value of the mode's variable. |
| 94 | Optional LIGHTER is displayed in the modeline when the mode is on. | 93 | Optional LIGHTER is displayed in the modeline when the mode is on. |
| 95 | Optional KEYMAP is the default (defvar) keymap bound to the mode keymap. | 94 | Optional KEYMAP is the default keymap bound to the mode keymap. |
| 96 | If it is a list, it is passed to `easy-mmode-define-keymap' | 95 | If non-nil, it should be a variable name (whose value is a keymap), |
| 97 | in order to build a valid keymap. It's generally better to use | 96 | a keymap, or a list of arguments for `easy-mmode-define-keymap'. |
| 98 | a separate MODE-map variable than to use this argument. | 97 | If KEYMAP is a keymap or list, this also defines the variable MODE-map. |
| 99 | The above three arguments can be skipped if keyword arguments are | 98 | |
| 100 | used (see below). | 99 | BODY contains code to execute each time the mode is enabled or disabled. |
| 101 | 100 | It is executed after toggling the mode, and before running MODE-hook. | |
| 102 | BODY contains code to execute each time the mode is activated or deactivated. | 101 | Before the actual body code, you can write keyword arguments, i.e. |
| 103 | It is executed after toggling the mode, | 102 | alternating keywords and values. These following special keywords |
| 104 | and before running the hook variable `MODE-hook'. | 103 | are supported (other keywords are passed to `defcustom' if the minor |
| 105 | Before the actual body code, you can write keyword arguments (alternating | 104 | mode is global): |
| 106 | keywords and values). These following keyword arguments are supported (other | 105 | |
| 107 | keywords will be passed to `defcustom' if the minor mode is global): | ||
| 108 | :group GROUP Custom group name to use in all generated `defcustom' forms. | 106 | :group GROUP Custom group name to use in all generated `defcustom' forms. |
| 109 | Defaults to MODE without the possible trailing \"-mode\". | 107 | Defaults to MODE without the possible trailing \"-mode\". |
| 110 | Don't use this default group name unless you have written a | 108 | Don't use this default group name unless you have written a |