From 05c4a38a2505b7b0534373017faddfb8d472e9e3 Mon Sep 17 00:00:00 2001 From: Michael Kifer Date: Thu, 31 Aug 2006 03:39:42 +0000 Subject: [PATCH] 2006-08-30 Michael Kifer * viper-cmd.el (viper-special-read-and-insert-char): convert events to chars if XEmacs. (viper-after-change-undo-hook): check if undo-in-progress is bound. --- lisp/ChangeLog | 6 ++++++ lisp/emulation/viper-cmd.el | 11 ++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a82cdbb83d8..4d8887a0d59 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2006-08-30 Michael Kifer + + * viper-cmd.el (viper-special-read-and-insert-char): convert events to + chars if XEmacs. + (viper-after-change-undo-hook): check if undo-in-progress is bound. + 2006-08-30 Stefan Monnier * progmodes/python.el (python-eldoc-function): Re-enable quit while diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index af757a2a55c..1685b829f64 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 -- 2.39.2