aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2012-02-07 00:26:54 -0800
committerGlenn Morris2012-02-07 00:26:54 -0800
commit60d47423d1f05071b96857860a8281b318931bee (patch)
tree1174c0c7270f250aea285d4acc6599d74f943d61 /lisp
parentbba26374d0465e50338493a43eaa35312f8612d2 (diff)
downloademacs-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/ChangeLog3
-rw-r--r--lisp/emacs-lisp/easy-mmode.el10
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 @@
12012-02-07 Glenn Morris <rgm@gnu.org> 12012-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
90MODE (you can override this with the :variable keyword, see below). 90MODE (you can override this with the :variable keyword, see below).
91DOC is the documentation for the mode toggle command. 91DOC is the documentation for the mode toggle command.
92 92
93The defined mode command takes one optional (prefix) argument.
94Interactively with no prefix argument it toggles the mode.
95With a prefix argument, it enables the mode if the argument is
96positive and otherwise disables it. When called from Lisp, it
97enables the mode if the argument is omitted or nil, and toggles
98the mode if the argument is `toggle'. If DOC is nil this
99function adds a basic doc-string stating these facts.
100
93Optional INIT-VALUE is the initial value of the mode's variable. 101Optional INIT-VALUE is the initial value of the mode's variable.
94Optional LIGHTER is displayed in the modeline when the mode is on. 102Optional LIGHTER is displayed in the modeline when the mode is on.
95Optional KEYMAP is the default keymap bound to the mode keymap. 103Optional 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.
243With a prefix argument ARG, enable %s if ARG is 251With a prefix argument ARG, enable %s if ARG is
244positive, and disable it otherwise. If called from Lisp, enable 252positive, and disable it otherwise. If called from Lisp, enable
245the mode if ARG is omitted or nil. 253the 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.