changeset 96187:c8bbd45f39e0

(easy-mmode-set-keymap-parents): Evaluate definition when compiling.
author Glenn Morris <rgm@gnu.org>
date Sat, 21 Jun 2008 23:01:01 +0000
parents c66f10196d81
children 147544bdb96f
files lisp/emacs-lisp/easy-mmode.el
diffstat 1 files changed, 12 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/easy-mmode.el	Sat Jun 21 23:00:49 2008 +0000
+++ b/lisp/emacs-lisp/easy-mmode.el	Sat Jun 21 23:01:01 2008 +0000
@@ -388,17 +388,18 @@
 ;;; easy-mmode-defmap
 ;;;
 
-(if (fboundp 'set-keymap-parents)
-    (defalias 'easy-mmode-set-keymap-parents 'set-keymap-parents)
-  (defun easy-mmode-set-keymap-parents (m parents)
-    (set-keymap-parent
-     m
-     (cond
-      ((not (consp parents)) parents)
-      ((not (cdr parents)) (car parents))
-      (t (let ((m (copy-keymap (pop parents))))
-	   (easy-mmode-set-keymap-parents m parents)
-	   m))))))
+(eval-and-compile
+  (if (fboundp 'set-keymap-parents)
+      (defalias 'easy-mmode-set-keymap-parents 'set-keymap-parents)
+    (defun easy-mmode-set-keymap-parents (m parents)
+      (set-keymap-parent
+       m
+       (cond
+        ((not (consp parents)) parents)
+        ((not (cdr parents)) (car parents))
+        (t (let ((m (copy-keymap (pop parents))))
+             (easy-mmode-set-keymap-parents m parents)
+             m)))))))
 
 ;;;###autoload
 (defun easy-mmode-define-keymap (bs &optional name m args)