(viper-add-keymap): Use mapc rather than mapcar on Emacs.
(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