diff lisp/emacs-lisp/easy-mmode.el @ 112347:67bea318ed68

Merge from emacs-23 branch, up to r100386.
author Glenn Morris <rgm@gnu.org>
date Mon, 17 Jan 2011 18:49:59 -0800
parents 417b1e4d63cd 32f10f475431
children
line wrap: on
line diff
--- a/lisp/emacs-lisp/easy-mmode.el	Mon Jan 17 18:35:23 2011 -0800
+++ b/lisp/emacs-lisp/easy-mmode.el	Mon Jan 17 18:49:59 2011 -0800
@@ -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),
-  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 @@
 	     (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))