# HG changeset patch # User Glenn Morris # Date 1204402260 0 # Node ID 20e7f613b63727aa2eccb900e8ee393c66f481a6 # Parent b3d5b908c444f1b0126145b0874582aaf767a88d 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 -r b3d5b908c444 -r 20e7f613b637 lisp/emulation/viper-keym.el --- 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