changeset 72579:5ab6646918c5

2006-08-30 Michael Kifer <kifer@cs.stonybrook.edu> * 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.
author Michael Kifer <kifer@cs.stonybrook.edu>
date Thu, 31 Aug 2006 03:39:42 +0000
parents a9874901ba07
children 2da08bd76792
files lisp/ChangeLog lisp/emulation/viper-cmd.el
diffstat 2 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Aug 30 21:10:10 2006 +0000
+++ b/lisp/ChangeLog	Thu Aug 31 03:39:42 2006 +0000
@@ -1,3 +1,9 @@
+2006-08-30  Michael Kifer  <kifer@cs.stonybrook.edu>
+	
+	* 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  <monnier@iro.umontreal.ca>
 
 	* progmodes/python.el (python-eldoc-function): Re-enable quit while
--- a/lisp/emulation/viper-cmd.el	Wed Aug 30 21:10:10 2006 +0000
+++ b/lisp/emulation/viper-cmd.el	Thu Aug 31 03:39:42 2006 +0000
@@ -892,12 +892,17 @@
 	      (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 @@
 
 ;; 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