summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2002-10-07 22:49:39 +0000
committerRichard M. Stallman <rms@gnu.org>2002-10-07 22:49:39 +0000
commita6ce686959bdae6ac006e07f1a72482fa4c3012a (patch)
tree33e08047b0db9afbe3809bd599444e28f1a98165 /lisp/emacs-lisp
parent543335974da5e0c4cb716bf98541c61b2847c9e5 (diff)
downloademacs-a6ce686959bdae6ac006e07f1a72482fa4c3012a.tar.gz
emacs-a6ce686959bdae6ac006e07f1a72482fa4c3012a.tar.bz2
emacs-a6ce686959bdae6ac006e07f1a72482fa4c3012a.zip
(define-minor-mode): Doc fix.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/easy-mmode.el19
1 files changed, 14 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 8d814ea1e3f..898afddaf31 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -88,14 +88,23 @@ used (see below).
BODY contains code that will be executed each time the mode is (dis)activated.
It will be executed after any toggling but before running the hooks.
- BODY can start with a list of CL-style keys specifying additional arguments.
- The following keyword arguments are supported:
-:group GROUP Group name to use for any generated `defcustom'.
+ Before the actual body code, you can write
+ keyword arguments (alternating keywords and values).
+ These following keyword arguments are supported:
+:group GROUP Custom group name to use in all generated `defcustom' forms.
:global GLOBAL If non-nil specifies that the minor mode is not meant to be
- buffer-local. By default, the variable is made buffer-local.
+ buffer-local, so don't make the variable MODE buffer-local.
+ By default, the mode is buffer-local.
:init-value VAL Same as the INIT-VALUE argument.
:lighter SPEC Same as the LIGHTER argument.
-:require SYM Same as defcustom's :require argument."
+:require SYM Same as in `defcustom'.
+
+For example, you could write
+ (define-minor-mode foo-mode \"If enabled, foo on you!\"
+ nil \"Foo \" foo-keymap
+ :require 'foo :global t :group 'inconvenience
+ ...BODY CODE...)"
+
;; Allow skipping the first three args.
(cond
((keywordp init-value)