diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 969b0c6997a..2d381534228 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2011-01-18 Stefan Monnier <monnier@iro.umontreal.ca> + * emacs-lisp/easy-mmode.el (define-minor-mode): Don't re-evaluate the + keymap expression. Improve docstring. + +2011-01-18 Stefan Monnier <monnier@iro.umontreal.ca> + * electric.el (electric-indent-post-self-insert-function): Don't auto-indent for indent-to-left-margin, it's too often counter-productive. diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 3d18d8e1cca..7f7198c36c9 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -94,8 +94,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. @@ -274,7 +275,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))) ,(if (not (symbolp mode)) |