aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emacs-lisp/easy-mmode.el
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2011-01-17 16:42:23 -0500
committerStefan Monnier <[email protected]>2011-01-17 16:42:23 -0500
commit1a1fcbe13fbf6d5bef27016e016c5f03dd3965d6 (patch)
treea5fc102db9bdaead2c836a580ffc3ccefaa34b63 /lisp/emacs-lisp/easy-mmode.el
parent0514b4be5148fe07965ce5cec08598da8c8699e3 (diff)
* emacs-lisp/easy-mmode.el (define-minor-mode): Don't re-evaluate the
keymap expression. Improve docstring.
Diffstat (limited to 'lisp/emacs-lisp/easy-mmode.el')
-rw-r--r--lisp/emacs-lisp/easy-mmode.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index f22cc2c362..3876e291d1 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -93,8 +93,9 @@ Optional INIT-VALUE is the initial value of the mode's variable.
Optional LIGHTER is displayed in the modeline when the mode is on.
Optional KEYMAP is the default keymap bound to the mode keymap.
If non-nil, it should be a variable name (whose value is a keymap),
- a keymap, or a list of arguments for `easy-mmode-define-keymap'.
- If KEYMAP is a keymap or list, this also defines the variable MODE-map.
+ or an expression that returns either a keymap or a list of
+ arguments for `easy-mmode-define-keymap'. If KEYMAP is not a symbol,
+ this also defines the variable MODE-map.
BODY contains code to execute each time the mode is enabled or disabled.
It is executed after toggling the mode, and before running MODE-hook.
@@ -256,7 +257,7 @@ With zero or negative ARG turn mode off.
(let ((m ,keymap))
(cond ((keymapp m) m)
((listp m) (easy-mmode-define-keymap m))
- (t (error "Invalid keymap %S" ,keymap))))
+ (t (error "Invalid keymap %S" m))))
,(format "Keymap for `%s'." mode-name)))
(add-minor-mode ',mode ',lighter