comparison lisp/emulation/viper-cmd.el @ 87678:ae3fe9150b36

2008-01-09 Michael Kifer <kifer@cs.stonybrook.edu> * ediff*.el: commented out declare-function. "make bootstrap" stops with an error and emacs does not compile with those things in. Besides, declare-function is not defined in XEmacs. * ediff-util (eqiff-quit): autoraise minibuffer. * ediff-diff (ediff-convert-fine-diffs-to-overlays): make it a defin * viper*.el: commented out declare-function -- not defined in XEmacs. * viper-ex.el (viper-info-on-file): take care of indiret buffers. * viper.el (viper-set-hooks, set-cursor-color): set viper-vi-state-cursor-color.
author Michael Kifer <kifer@cs.stonybrook.edu>
date Wed, 09 Jan 2008 06:16:07 +0000
parents 107ccd98fa12
children f2c8fd594360
comparison
equal deleted inserted replaced
87677:f001e1c2f823 87678:ae3fe9150b36
2771 (- (viper-chars-in-region pt (point)))))) 2771 (- (viper-chars-in-region pt (point))))))
2772 2772
2773 (defun viper-next-line-carefully (arg) 2773 (defun viper-next-line-carefully (arg)
2774 (condition-case nil 2774 (condition-case nil
2775 ;; do not use forward-line! need to keep column 2775 ;; do not use forward-line! need to keep column
2776 (with-no-warnings (next-line arg)) 2776 (if (featurep 'emacs)
2777 (with-no-warnings (next-line arg))
2778 (next-line arg))
2777 (error nil))) 2779 (error nil)))
2778 2780
2779 2781
2780 2782
2781 ;;; Word command 2783 ;;; Word command
3071 (viper-leave-region-active) 3073 (viper-leave-region-active)
3072 (let ((val (viper-p-val arg)) 3074 (let ((val (viper-p-val arg))
3073 (com (viper-getCom arg))) 3075 (com (viper-getCom arg)))
3074 (if com (viper-move-marker-locally 'viper-com-point (point))) 3076 (if com (viper-move-marker-locally 'viper-com-point (point)))
3075 ;; do not use forward-line! need to keep column 3077 ;; do not use forward-line! need to keep column
3076 (with-no-warnings (next-line val)) 3078 (if (featurep 'emacs)
3079 (with-no-warnings (next-line val))
3080 (next-line val))
3077 (if viper-ex-style-motion 3081 (if viper-ex-style-motion
3078 (if (and (eolp) (not (bolp))) (backward-char 1))) 3082 (if (and (eolp) (not (bolp))) (backward-char 1)))
3079 (setq this-command 'next-line) 3083 (setq this-command 'next-line)
3080 (if com (viper-execute-com 'viper-next-line val com)))) 3084 (if com (viper-execute-com 'viper-next-line val com))))
3081 3085
3082 (declare-function widget-type "wid-edit" (widget)) 3086 ;; declare-function is not defined in XEmacs
3083 (declare-function widget-button-press "wid-edit" (pos &optional event)) 3087 ;;(declare-function widget-type "wid-edit" (widget))
3084 (declare-function viper-set-hooks "viper" ()) 3088 ;;(declare-function widget-button-press "wid-edit" (pos &optional event))
3089 ;;(declare-function viper-set-hooks "viper" ())
3085 3090
3086 (defun viper-next-line-at-bol (arg) 3091 (defun viper-next-line-at-bol (arg)
3087 "Next line at beginning of line. 3092 "Next line at beginning of line.
3088 If point is on a widget or a button, simulate clicking on that widget/button." 3093 If point is on a widget or a button, simulate clicking on that widget/button."
3089 (interactive "P") 3094 (interactive "P")
3118 (viper-leave-region-active) 3123 (viper-leave-region-active)
3119 (let ((val (viper-p-val arg)) 3124 (let ((val (viper-p-val arg))
3120 (com (viper-getCom arg))) 3125 (com (viper-getCom arg)))
3121 (if com (viper-move-marker-locally 'viper-com-point (point))) 3126 (if com (viper-move-marker-locally 'viper-com-point (point)))
3122 ;; do not use forward-line! need to keep column 3127 ;; do not use forward-line! need to keep column
3123 (with-no-warnings (previous-line val)) 3128 (if (featurep 'emacs)
3129 (with-no-warnings (previous-line val))
3130 (previous-line val))
3124 (if viper-ex-style-motion 3131 (if viper-ex-style-motion
3125 (if (and (eolp) (not (bolp))) (backward-char 1))) 3132 (if (and (eolp) (not (bolp))) (backward-char 1)))
3126 (setq this-command 'previous-line) 3133 (setq this-command 'previous-line)
3127 (if com (viper-execute-com 'viper-previous-line val com)))) 3134 (if com (viper-execute-com 'viper-previous-line val com))))
3128 3135