viper-emacs-kbd-minor-mode
ch)
(cond ((and viper-special-input-method
- viper-emacs-p
+ (featurep 'emacs)
(fboundp 'quail-input-method))
;; (let ...) is used to restore unread-command-events to the
;; original state. We don't want anything left in there after
(1- (length quail-current-str)))))
))
((and viper-special-input-method
- viper-xemacs-p
+ (featurep 'xemacs)
(fboundp 'quail-start-translation))
;; same as above but for XEmacs, which doesn't have
;; quail-input-method
(t
;;(setq ch (read-char-exclusive))
(setq ch (aref (read-key-sequence nil) 0))
- (if viper-xemacs-p
+ (if (featurep 'xemacs)
(setq ch (event-to-character ch)))
;; replace ^M with the newline
(if (eq ch ?\C-m) (setq ch ?\n))
(progn
;;(setq ch (read-char-exclusive))
(setq ch (aref (read-key-sequence nil) 0))
- (if viper-xemacs-p
+ (if (featurep 'xemacs)
(setq ch (event-to-character ch))))
)
(insert ch))
)
(setq last-command-event
- (viper-copy-event (if viper-xemacs-p
+ (viper-copy-event (if (featurep 'xemacs)
(character-to-event ch) ch)))
) ; let
(error nil)
;; and return ESC as the key-sequence
(viper-set-unread-command-events (viper-subseq keyseq 1))
(setq last-input-event event
- keyseq (if viper-emacs-p
+ keyseq (if (featurep 'emacs)
"\e"
(vector (character-to-event ?\e)))))
- ((and viper-xemacs-p
+ ((and (featurep 'xemacs)
(key-press-event-p first-key)
(equal '(meta) key-mod))
(viper-set-unread-command-events
(setq last-command-char char)
(setq last-command-event
(viper-copy-event
- (if viper-xemacs-p (character-to-event char) char)))
+ (if (featurep 'xemacs) (character-to-event char) char)))
(condition-case err
(funcall cmd-to-exec-at-end cmd-info)
(error
(defun viper-next-line-carefully (arg)
(condition-case nil
;; do not use forward-line! need to keep column
- (next-line arg)
+ (with-no-warnings (next-line arg))
(error nil)))
(com (viper-getCom arg)))
(if com (viper-move-marker-locally 'viper-com-point (point)))
;; do not use forward-line! need to keep column
- (next-line val)
+ (with-no-warnings (next-line val))
(if viper-ex-style-motion
(if (and (eolp) (not (bolp))) (backward-char 1)))
(setq this-command 'next-line)
(com (viper-getCom arg)))
(if com (viper-move-marker-locally 'viper-com-point (point)))
;; do not use forward-line! need to keep column
- (previous-line val)
+ (with-no-warnings (previous-line val))
(if viper-ex-style-motion
(if (and (eolp) (not (bolp))) (backward-char 1)))
(setq this-command 'previous-line)