From 210c6549fa0f26f510e4cd4fc774f944d84f37d7 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 21 Jun 2008 23:01:01 +0000 Subject: [PATCH] (easy-mmode-set-keymap-parents): Evaluate definition when compiling. --- lisp/emacs-lisp/easy-mmode.el | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 92b314c4110..f2b467383d6 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -388,17 +388,18 @@ See `%s' for more information on %s." ;;; 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) -- 2.39.2