diff options
Diffstat (limited to 'lisp/emulation/viper-cmd.el')
-rw-r--r-- | lisp/emulation/viper-cmd.el | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index af757a2a55c..61d99e6c78d 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -892,12 +892,17 @@ Vi's prefix argument will be used. Otherwise, the prefix argument passed to (t ;;(setq ch (read-char-exclusive)) (setq ch (aref (read-key-sequence nil) 0)) + (if viper-xemacs-p + (setq ch (event-to-character ch))) ;; replace ^M with the newline (if (eq ch ?\C-m) (setq ch ?\n)) ;; Make sure ^V and ^Q work as quotation chars (if (memq ch '(?\C-v ?\C-q)) - ;;(setq ch (read-char-exclusive)) - (setq ch (aref (read-key-sequence nil) 0)) + (progn + ;;(setq ch (read-char-exclusive)) + (setq ch (aref (read-key-sequence nil) 0)) + (if viper-xemacs-p + (setq ch (event-to-character ch)))) ) (insert ch)) ) @@ -1750,7 +1755,7 @@ invokes the command before that, etc." ;; Hook used in viper-undo (defun viper-after-change-undo-hook (beg end len) - (if undo-in-progress + (if (and (boundp 'undo-in-progress) undo-in-progress) (setq undo-beg-posn beg undo-end-posn (or end beg)) ;; some other hooks may be changing various text properties in @@ -3093,7 +3098,7 @@ If point is on a widget or a button, simulate clicking on that widget/button." (and (consp widget) (get (widget-type widget) 'widget-type)))) (widget-button-press (point)) - (if (button-at (point)) + (if (and (fboundp 'button-at) (fboundp 'push-button) (button-at (point))) (push-button) ;; not a widget or a button (viper-leave-region-active) |