diff options
author | Alan Mackenzie <acm@muc.de> | 2011-10-28 14:35:39 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2011-10-28 14:35:39 +0000 |
commit | 93b5b3bdc8b734132c530acd6ffae1196c0865bc (patch) | |
tree | da8ed72a56bfbf65d6f3cd9bdc3fa5d123dc4873 /lisp/emacs-lisp/easy-mmode.el | |
parent | 020716e178cdae443a3630c4307023cb3fc4c350 (diff) | |
parent | bc97a826f8ea89a269f6043be3148930f023e2b2 (diff) | |
download | emacs-93b5b3bdc8b734132c530acd6ffae1196c0865bc.tar.gz emacs-93b5b3bdc8b734132c530acd6ffae1196c0865bc.tar.bz2 emacs-93b5b3bdc8b734132c530acd6ffae1196c0865bc.zip |
Boring merge from savannah.
Diffstat (limited to 'lisp/emacs-lisp/easy-mmode.el')
-rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index b1cb0615e43..bf9f2c9d6ed 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -94,8 +94,9 @@ 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), 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. + arguments for `easy-mmode-define-keymap'. If you supply a KEYMAP + argument that is not a symbol, this macro defines the variable + MODE-map and gives it the value that KEYMAP specifies. 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. @@ -367,11 +368,13 @@ See `%s' for more information on %s." (progn (add-hook 'after-change-major-mode-hook ',MODE-enable-in-buffers) - (add-hook 'fundamental-mode-hook ',MODE-enable-in-buffers) + (add-hook 'change-major-mode-after-body-hook + ',MODE-enable-in-buffers) (add-hook 'find-file-hook ',MODE-check-buffers) (add-hook 'change-major-mode-hook ',MODE-cmhh)) (remove-hook 'after-change-major-mode-hook ',MODE-enable-in-buffers) - (remove-hook 'fundamental-mode-hook ',MODE-enable-in-buffers) + (remove-hook 'change-major-mode-after-body-hook + ',MODE-enable-in-buffers) (remove-hook 'find-file-hook ',MODE-check-buffers) (remove-hook 'change-major-mode-hook ',MODE-cmhh)) |