diff options
| author | Glenn Morris | 2012-02-07 00:26:54 -0800 |
|---|---|---|
| committer | Glenn Morris | 2012-02-07 00:26:54 -0800 |
| commit | 60d47423d1f05071b96857860a8281b318931bee (patch) | |
| tree | 1174c0c7270f250aea285d4acc6599d74f943d61 /lisp | |
| parent | bba26374d0465e50338493a43eaa35312f8612d2 (diff) | |
| download | emacs-60d47423d1f05071b96857860a8281b318931bee.tar.gz emacs-60d47423d1f05071b96857860a8281b318931bee.zip | |
Doc updates for define-minor-mode argument behavior
* doc/lispref/modes.texi (Defining Minor Modes):
Expand on args of defined minor modes.
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode):
Doc fixes for the macro and the mode it defines.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 66025e2ec91..f69b94fdb7b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2012-02-07 Glenn Morris <rgm@gnu.org> | 1 | 2012-02-07 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * emacs-lisp/easy-mmode.el (define-minor-mode): | ||
| 4 | Doc fixes for the macro and the mode it defines. | ||
| 5 | |||
| 3 | * image.el (imagemagick-types-inhibit): Doc fix. | 6 | * image.el (imagemagick-types-inhibit): Doc fix. |
| 4 | 7 | ||
| 5 | * cus-start.el (imagemagick-render-type): Add it. | 8 | * cus-start.el (imagemagick-render-type): Add it. |
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index d871f6f1212..dbacba6cd29 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el | |||
| @@ -90,6 +90,14 @@ This defines the toggle command MODE and (by default) a control variable | |||
| 90 | MODE (you can override this with the :variable keyword, see below). | 90 | MODE (you can override this with the :variable keyword, see below). |
| 91 | DOC is the documentation for the mode toggle command. | 91 | DOC is the documentation for the mode toggle command. |
| 92 | 92 | ||
| 93 | The defined mode command takes one optional (prefix) argument. | ||
| 94 | Interactively with no prefix argument it toggles the mode. | ||
| 95 | With a prefix argument, it enables the mode if the argument is | ||
| 96 | positive and otherwise disables it. When called from Lisp, it | ||
| 97 | enables the mode if the argument is omitted or nil, and toggles | ||
| 98 | the mode if the argument is `toggle'. If DOC is nil this | ||
| 99 | function adds a basic doc-string stating these facts. | ||
| 100 | |||
| 93 | Optional INIT-VALUE is the initial value of the mode's variable. | 101 | 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. | 102 | Optional LIGHTER is displayed in the modeline when the mode is on. |
| 95 | Optional KEYMAP is the default keymap bound to the mode keymap. | 103 | Optional KEYMAP is the default keymap bound to the mode keymap. |
| @@ -242,7 +250,7 @@ or call the function `%s'.")))) | |||
| 242 | (format (concat "Toggle %s on or off. | 250 | (format (concat "Toggle %s on or off. |
| 243 | With a prefix argument ARG, enable %s if ARG is | 251 | With a prefix argument ARG, enable %s if ARG is |
| 244 | positive, and disable it otherwise. If called from Lisp, enable | 252 | positive, and disable it otherwise. If called from Lisp, enable |
| 245 | the mode if ARG is omitted or nil. | 253 | the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'. |
| 246 | \\{%s}") pretty-name pretty-name keymap-sym)) | 254 | \\{%s}") pretty-name pretty-name keymap-sym)) |
| 247 | ;; Use `toggle' rather than (if ,mode 0 1) so that using | 255 | ;; Use `toggle' rather than (if ,mode 0 1) so that using |
| 248 | ;; repeat-command still does the toggling correctly. | 256 | ;; repeat-command still does the toggling correctly. |