diff options
| author | Stefan Monnier | 2011-01-17 16:42:23 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2011-01-17 16:42:23 -0500 |
| commit | 1a1fcbe13fbf6d5bef27016e016c5f03dd3965d6 (patch) | |
| tree | a5fc102db9bdaead2c836a580ffc3ccefaa34b63 | |
| parent | 0514b4be5148fe07965ce5cec08598da8c8699e3 (diff) | |
| download | emacs-1a1fcbe13fbf6d5bef27016e016c5f03dd3965d6.tar.gz emacs-1a1fcbe13fbf6d5bef27016e016c5f03dd3965d6.zip | |
* emacs-lisp/easy-mmode.el (define-minor-mode): Don't re-evaluate the
keymap expression. Improve docstring.
| -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 0ff810a1230..0cb79fe8c29 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-01-17 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/easy-mmode.el (define-minor-mode): Don't re-evaluate the | ||
| 4 | keymap expression. Improve docstring. | ||
| 5 | |||
| 1 | 2011-01-15 Mark Diekhans <markd@soe.ucsc.edu> | 6 | 2011-01-15 Mark Diekhans <markd@soe.ucsc.edu> |
| 2 | 7 | ||
| 3 | * files.el (backup-buffer): Make last-resort backup file in | 8 | * files.el (backup-buffer): Make last-resort backup file in |
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index f22cc2c362d..3876e291d1b 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. | |||
| 93 | Optional LIGHTER is displayed in the modeline when the mode is on. | 93 | Optional LIGHTER is displayed in the modeline when the mode is on. |
| 94 | Optional KEYMAP is the default keymap bound to the mode keymap. | 94 | Optional KEYMAP is the default keymap bound to the mode keymap. |
| 95 | If non-nil, it should be a variable name (whose value is a keymap), | 95 | If non-nil, it should be a variable name (whose value is a keymap), |
| 96 | a keymap, or a list of arguments for `easy-mmode-define-keymap'. | 96 | or an expression that returns either a keymap or a list of |
| 97 | If KEYMAP is a keymap or list, this also defines the variable MODE-map. | 97 | arguments for `easy-mmode-define-keymap'. If KEYMAP is not a symbol, |
| 98 | this also defines the variable MODE-map. | ||
| 98 | 99 | ||
| 99 | BODY contains code to execute each time the mode is enabled or disabled. | 100 | BODY contains code to execute each time the mode is enabled or disabled. |
| 100 | It is executed after toggling the mode, and before running MODE-hook. | 101 | It is executed after toggling the mode, and before running MODE-hook. |
| @@ -256,7 +257,7 @@ With zero or negative ARG turn mode off. | |||
| 256 | (let ((m ,keymap)) | 257 | (let ((m ,keymap)) |
| 257 | (cond ((keymapp m) m) | 258 | (cond ((keymapp m) m) |
| 258 | ((listp m) (easy-mmode-define-keymap m)) | 259 | ((listp m) (easy-mmode-define-keymap m)) |
| 259 | (t (error "Invalid keymap %S" ,keymap)))) | 260 | (t (error "Invalid keymap %S" m)))) |
| 260 | ,(format "Keymap for `%s'." mode-name))) | 261 | ,(format "Keymap for `%s'." mode-name))) |
| 261 | 262 | ||
| 262 | (add-minor-mode ',mode ',lighter | 263 | (add-minor-mode ',mode ',lighter |