aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-03-01 20:11:00 +0000
committerGlenn Morris2008-03-01 20:11:00 +0000
commitfe4f1247e5e4bae8f81ba56041d9731c91bd99a6 (patch)
tree5baff720fff22302a093b4ba1d86591221dafe02
parentb94f99c8043811dc9a41b0e6e4b95a8233abf1c2 (diff)
downloademacs-fe4f1247e5e4bae8f81ba56041d9731c91bd99a6.tar.gz
emacs-fe4f1247e5e4bae8f81ba56041d9731c91bd99a6.zip
Expand all viper-cond-compile-for-xemacs-or-emacs calls to a featurep test.
(viper-add-keymap): Use mapc rather than mapcar on Emacs.
-rw-r--r--lisp/emulation/viper-keym.el14
1 files 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)"
681 681
682(defun viper-add-keymap (mapsrc mapdst) 682(defun viper-add-keymap (mapsrc mapdst)
683 "Add contents of mapsrc to mapdst. It is assumed that mapsrc is sparse." 683 "Add contents of mapsrc to mapdst. It is assumed that mapsrc is sparse."
684 (viper-cond-compile-for-xemacs-or-emacs 684 (if (featurep 'xemacs)
685 ;; xemacs 685 ;; Emacs 22 has map-keymap.
686 (map-keymap (lambda (key binding) (define-key mapdst key binding)) 686 (map-keymap (lambda (key binding) (define-key mapdst key binding))
687 mapsrc) 687 mapsrc)
688 ;; emacs 688 (mapc (lambda (p) (define-key mapdst (vector (car p)) (cdr p)))
689 (mapcar (lambda (p) (define-key mapdst (vector (car p)) (cdr p))) 689 (cdr mapsrc))))
690 (cdr mapsrc))
691 ))
692 690
693(defun viper-modify-keymap (map alist) 691(defun viper-modify-keymap (map alist)
694 "Modifies MAP with bindings specified in the ALIST. The alist has the 692 "Modifies MAP with bindings specified in the ALIST. The alist has the