From: Glenn Morris Date: Sat, 1 Mar 2008 20:11:00 +0000 (+0000) Subject: Expand all viper-cond-compile-for-xemacs-or-emacs calls to a featurep test. X-Git-Tag: emacs-pretest-23.0.90~7537 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fe4f1247e5e4bae8f81ba56041d9731c91bd99a6;p=emacs.git Expand all viper-cond-compile-for-xemacs-or-emacs calls to a featurep test. (viper-add-keymap): Use mapc rather than mapcar on Emacs. --- 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