diff options
| author | Richard M. Stallman | 2002-10-07 22:49:39 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-10-07 22:49:39 +0000 |
| commit | a6ce686959bdae6ac006e07f1a72482fa4c3012a (patch) | |
| tree | 33e08047b0db9afbe3809bd599444e28f1a98165 | |
| parent | 543335974da5e0c4cb716bf98541c61b2847c9e5 (diff) | |
| download | emacs-a6ce686959bdae6ac006e07f1a72482fa4c3012a.tar.gz emacs-a6ce686959bdae6ac006e07f1a72482fa4c3012a.zip | |
(define-minor-mode): Doc fix.
| -rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 19 |
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). | |||
| 88 | 88 | ||
| 89 | BODY contains code that will be executed each time the mode is (dis)activated. | 89 | BODY contains code that will be executed each time the mode is (dis)activated. |
| 90 | It will be executed after any toggling but before running the hooks. | 90 | It will be executed after any toggling but before running the hooks. |
| 91 | BODY can start with a list of CL-style keys specifying additional arguments. | 91 | Before the actual body code, you can write |
| 92 | The following keyword arguments are supported: | 92 | keyword arguments (alternating keywords and values). |
| 93 | :group GROUP Group name to use for any generated `defcustom'. | 93 | These following keyword arguments are supported: |
| 94 | :group GROUP Custom group name to use in all generated `defcustom' forms. | ||
| 94 | :global GLOBAL If non-nil specifies that the minor mode is not meant to be | 95 | :global GLOBAL If non-nil specifies that the minor mode is not meant to be |
| 95 | buffer-local. By default, the variable is made buffer-local. | 96 | buffer-local, so don't make the variable MODE buffer-local. |
| 97 | By default, the mode is buffer-local. | ||
| 96 | :init-value VAL Same as the INIT-VALUE argument. | 98 | :init-value VAL Same as the INIT-VALUE argument. |
| 97 | :lighter SPEC Same as the LIGHTER argument. | 99 | :lighter SPEC Same as the LIGHTER argument. |
| 98 | :require SYM Same as defcustom's :require argument." | 100 | :require SYM Same as in `defcustom'. |
| 101 | |||
| 102 | For example, you could write | ||
| 103 | (define-minor-mode foo-mode \"If enabled, foo on you!\" | ||
| 104 | nil \"Foo \" foo-keymap | ||
| 105 | :require 'foo :global t :group 'inconvenience | ||
| 106 | ...BODY CODE...)" | ||
| 107 | |||
| 99 | ;; Allow skipping the first three args. | 108 | ;; Allow skipping the first three args. |
| 100 | (cond | 109 | (cond |
| 101 | ((keywordp init-value) | 110 | ((keywordp init-value) |