diff options
author | Glenn Morris <rgm@gnu.org> | 2008-06-21 23:01:01 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2008-06-21 23:01:01 +0000 |
commit | 210c6549fa0f26f510e4cd4fc774f944d84f37d7 (patch) | |
tree | 03217f0133be72b54f63549dc7b5bc2127e53f85 /lisp/emacs-lisp | |
parent | e8f28744e2074a4a8821a19c956c97c0068005dd (diff) | |
download | emacs-210c6549fa0f26f510e4cd4fc774f944d84f37d7.tar.gz emacs-210c6549fa0f26f510e4cd4fc774f944d84f37d7.tar.bz2 emacs-210c6549fa0f26f510e4cd4fc774f944d84f37d7.zip |
(easy-mmode-set-keymap-parents): Evaluate definition when compiling.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 23 |
1 files 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) |