viper-emacs-kbd-minor-mode
ch)
(cond ((and viper-special-input-method
- (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
(condition-case nil
;; do not use forward-line! need to keep column
(let ((line-move-visual nil))
- (if (featurep 'emacs)
- (with-no-warnings (next-line arg))
- (next-line arg)))
+ (with-no-warnings
+ (next-line arg)))
(error nil)))
(if com (viper-move-marker-locally 'viper-com-point (point)))
;; do not use forward-line! need to keep column
(let ((line-move-visual nil))
- (if (featurep 'emacs)
- (with-no-warnings (next-line val))
- (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)
(if com (viper-move-marker-locally 'viper-com-point (point)))
;; do not use forward-line! need to keep column
(let ((line-move-visual nil))
- (if (featurep 'emacs)
- (with-no-warnings (previous-line val))
- (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)
) ; if
;; XEmacs doesn't have set-text-properties, but there buffer-substring
;; doesn't return properties together with the string, so it's not needed.
- (if (featurep 'emacs)
- (set-text-properties 0 (length result) nil result))
- result
- ))
+ (set-text-properties 0 (length result) nil result)
+ result))
(defun viper-mouse-click-get-word (click count click-count)
()
(setq button-spec
(cond ((memq 1 key)
- (if (featurep 'emacs)
- (if (eq 'up event-type)
- "mouse-1" "down-mouse-1")
- (if (eq 'up event-type)
- 'button1up 'button1)))
+ (if (eq 'up event-type)
+ "mouse-1" "down-mouse-1"))
((memq 2 key)
- (if (featurep 'emacs)
- (if (eq 'up event-type)
- "mouse-2" "down-mouse-2")
- (if (eq 'up event-type)
- 'button2up 'button2)))
+ (if (eq 'up event-type)
+ "mouse-2" "down-mouse-2"))
((memq 3 key)
- (if (featurep 'emacs)
- (if (eq 'up event-type)
- "mouse-3" "down-mouse-3")
- (if (eq 'up event-type)
- 'button3up 'button3)))
+ (if (eq 'up event-type)
+ "mouse-3" "down-mouse-3"))
(t (error
"%S: invalid button number, %S" key-var key)))
meta-spec
- (if (memq 'meta key)
- (if (featurep 'emacs) "M-" 'meta)
- (if (featurep 'emacs) "" nil))
+ (if (memq 'meta key) "M-" "")
shift-spec
- (if (memq 'shift key)
- (if (featurep 'emacs) "S-" 'shift)
- (if (featurep 'emacs) "" nil))
+ (if (memq 'shift key) "S-" "")
control-spec
- (if (memq 'control key)
- (if (featurep 'emacs) "C-" 'control)
- (if (featurep 'emacs) "" nil)))
-
- (setq key-spec (if (featurep 'emacs)
- (vector
- (intern
- (concat
- control-spec meta-spec shift-spec button-spec)))
- (vector
- (delq
- nil
- (list
- control-spec meta-spec shift-spec button-spec)))))
- )))
+ (if (memq 'control key) "C-" ""))
+
+ (setq key-spec
+ (vector
+ (intern (concat control-spec meta-spec
+ shift-spec button-spec)))))))
(defun viper-unbind-mouse-search-key ()
(if viper-mouse-up-search-key-parsed