changeset 92377:20e7f613b637

Expand all viper-cond-compile-for-xemacs-or-emacs calls to a featurep test. (viper-add-keymap): Use mapc rather than mapcar on Emacs.
author Glenn Morris <rgm@gnu.org>
date Sat, 01 Mar 2008 20:11:00 +0000
parents b3d5b908c444
children da8218af4a5d
files lisp/emulation/viper-keym.el
diffstat 1 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emulation/viper-keym.el	Sat Mar 01 20:10:26 2008 +0000
+++ b/lisp/emulation/viper-keym.el	Sat Mar 01 20:11:00 2008 +0000
@@ -681,14 +681,12 @@
 
 (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