summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/easy-mmode.el
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2011-10-28 13:56:09 +0000
committerAlan Mackenzie <acm@muc.de>2011-10-28 13:56:09 +0000
commitc0f13227ab16ad9a87a16182e9d9ace5d2f7a6d9 (patch)
tree5b6aad37a5ab5a4d0591a0159b7041dba54f43b5 /lisp/emacs-lisp/easy-mmode.el
parent536610a433e6edc0b3f831272c4e0424ebebee46 (diff)
parent44b0122fbb0af5606471d9667ce6352696d259b8 (diff)
downloademacs-c0f13227ab16ad9a87a16182e9d9ace5d2f7a6d9.tar.gz
emacs-c0f13227ab16ad9a87a16182e9d9ace5d2f7a6d9.tar.bz2
emacs-c0f13227ab16ad9a87a16182e9d9ace5d2f7a6d9.zip
Merge in random stuff from savannah.
Diffstat (limited to 'lisp/emacs-lisp/easy-mmode.el')
-rw-r--r--lisp/emacs-lisp/easy-mmode.el11
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))