From fe4f1247e5e4bae8f81ba56041d9731c91bd99a6 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 1 Mar 2008 20:11:00 +0000 Subject: [PATCH] Expand all viper-cond-compile-for-xemacs-or-emacs calls to a featurep test. (viper-add-keymap): Use mapc rather than mapcar on Emacs. --- lisp/emulation/viper-keym.el | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el index 05c90f995ab..87727f7e033 100644 --- a/lisp/emulation/viper-keym.el +++ b/lisp/emulation/viper-keym.el @@ -681,14 +681,12 @@ Arguments: (major-mode viper-state keymap)" (defun viper-add-keymap (mapsrc mapdst) "Add contents of mapsrc to mapdst. It is assumed that mapsrc is sparse." - (viper-cond-compile-for-xemacs-or-emacs - ;; xemacs - (map-keymap (lambda (key binding) (define-key mapdst key binding)) - mapsrc) - ;; emacs - (mapcar (lambda (p) (define-key mapdst (vector (car p)) (cdr p))) - (cdr mapsrc)) - )) + (if (featurep 'xemacs) + ;; Emacs 22 has map-keymap. + (map-keymap (lambda (key binding) (define-key mapdst key binding)) + mapsrc) + (mapc (lambda (p) (define-key mapdst (vector (car p)) (cdr p))) + (cdr mapsrc)))) (defun viper-modify-keymap (map alist) "Modifies MAP with bindings specified in the ALIST. The alist has the -- 2.39.2