]> git.eshelyaron.com Git - emacs.git/commitdiff
Expand all viper-cond-compile-for-xemacs-or-emacs calls to a featurep test.
authorGlenn Morris <rgm@gnu.org>
Sat, 1 Mar 2008 20:11:00 +0000 (20:11 +0000)
committerGlenn Morris <rgm@gnu.org>
Sat, 1 Mar 2008 20:11:00 +0000 (20:11 +0000)
(viper-add-keymap): Use mapc rather than mapcar on Emacs.

lisp/emulation/viper-keym.el

index 05c90f995abe35b8751e1a2243913958dddc9df0..87727f7e03343375cfcd2bdce5aafef2061f4a64 100644 (file)
@@ -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