changeset 43220:69c91aaa067a

2002-02-10 Michael Kifer <kifer@cs.stonybrook.edu> * viper-util.el (viper-read-key-sequence): fixed so it'll read fast key sequences in emacs native mode (viper-events-to-keys): deleted * viper.el (describe-key, describe-key-briefly): get rid of viper-events-to-keys. * ediff-init.el (ediff-has-gutter-support): Steven Turnbull's patch. * ediff-wind.el (ediff-setup-control-frame): Use ediff-has-gutter-support. * ediff-util.el (ediff-dispose-of-variant-according-to-user): check if buff is alive. * ediff.el: typo in comment.
author Michael Kifer <kifer@cs.stonybrook.edu>
date Sun, 10 Feb 2002 06:46:12 +0000
parents 1e589b2b35e9
children fadb49348c98
files ChangeLog lisp/ediff-init.el lisp/ediff-util.el lisp/ediff-wind.el lisp/emulation/viper-util.el lisp/emulation/viper.el man/ediff.texi
diffstat 7 files changed, 43 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Feb 09 22:58:25 2002 +0000
+++ b/ChangeLog	Sun Feb 10 06:46:12 2002 +0000
@@ -1,3 +1,22 @@
+2002-02-10  Michael Kifer  <kifer@cs.stonybrook.edu>
+	
+	* viper-util.el (viper-read-key-sequence): fixed so it'll read
+	fast key sequences in emacs native mode
+	(viper-events-to-keys): deleted
+	
+	* viper.el (describe-key, describe-key-briefly): get rid of
+	viper-events-to-keys.
+
+	* ediff-init.el (ediff-has-gutter-support): Steven Turnbull's patch.
+	
+	* ediff-wind.el (ediff-setup-control-frame): Use
+	ediff-has-gutter-support.
+	
+	* ediff-util.el (ediff-dispose-of-variant-according-to-user):
+	check if buff is alive.
+	
+	* ediff.el: typo in comment.
+	
 2002-02-08  Richard M. Stallman  <rms@gnu.org>
 
 	* Makefile.in (maybe_bootstrap): Add an infinite sleep-loop.
--- a/lisp/ediff-init.el	Sat Feb 09 22:58:25 2002 +0000
+++ b/lisp/ediff-init.el	Sun Feb 10 06:46:12 2002 +0000
@@ -87,6 +87,14 @@
    nil ; emacs form
    ))
 
+
+(defun ediff-has-gutter-support-p ()
+  (ediff-cond-compile-for-xemacs-or-emacs
+   (and (featurep 'gutter) (console-on-window-system-p)) ; xemacs form
+   nil ; emacs form
+   ))
+
+
 (defun ediff-use-toolbar-p ()
   (and (ediff-has-toolbar-support-p)	;Can it do it ?
        (boundp 'ediff-use-toolbar-p)
--- a/lisp/ediff-util.el	Sat Feb 09 22:58:25 2002 +0000
+++ b/lisp/ediff-util.el	Sun Feb 10 06:46:12 2002 +0000
@@ -2628,7 +2628,8 @@
 ;; BUFF is the buffer, BUFF-TYPE is either 'A, or 'B, 'C, 'Ancestor
 (defun ediff-dispose-of-variant-according-to-user (buff bufftype ask keep-variants)
   ;; if this is indirect buffer, kill it and substitute with direct buf
-  (if (ediff-with-current-buffer buff ediff-temp-indirect-buffer)
+  (if (and (ediff-buffer-live-p buff)
+	   (ediff-with-current-buffer buff ediff-temp-indirect-buffer))
       (let ((wind (ediff-get-visible-buffer-window buff))
 	    (base (buffer-base-buffer buff))
 	    (modified-p (buffer-modified-p buff)))
--- a/lisp/ediff-wind.el	Sat Feb 09 22:58:25 2002 +0000
+++ b/lisp/ediff-wind.el	Sun Feb 10 06:46:12 2002 +0000
@@ -968,8 +968,8 @@
     (if (ediff-has-toolbar-support-p)
 	(ediff-cond-compile-for-xemacs-or-emacs
 	 (progn ; xemacs
-	   (set-specifier top-toolbar-height (list ctl-frame 2))
-	   (set-specifier top-gutter (list ctl-frame nil))
+	   (if (ediff-has-gutter-support-p)
+	       (set-specifier top-gutter (list ctl-frame nil)))
 	   (sit-for 0)
 	   (set-specifier top-toolbar-height (list ctl-frame 0))
 	   ;;(set-specifier bottom-toolbar-height (list ctl-frame 0))
--- a/lisp/emulation/viper-util.el	Sat Feb 09 22:58:25 2002 +0000
+++ b/lisp/emulation/viper-util.el	Sun Feb 10 06:46:12 2002 +0000
@@ -925,12 +925,6 @@
       ))
 
     
-(defsubst viper-events-to-keys (events)
-  (viper-cond-compile-for-xemacs-or-emacs
-   (events-to-keys events) ; xemacs
-   events ; emacs
-   ))
-		  
     
 ;; it is suggested that an event must be copied before it is assigned to
 ;; last-command-event in XEmacs
@@ -969,15 +963,21 @@
 		  (elt (listify-key-sequence keyseq) 0)))
     (if (viper-ESC-event-p event)
 	(let (unread-command-events)
-	  (viper-set-unread-command-events keyseq)
 	  (if (viper-fast-keysequence-p)
 	      (let ((viper-vi-global-user-minor-mode  nil)
 		    (viper-vi-local-user-minor-mode  nil)
+		    (viper-vi-intercept-minor-mode nil)
+		    (viper-insert-intercept-minor-mode nil)
 		    (viper-replace-minor-mode nil) ; actually unnecessary
 		    (viper-insert-global-user-minor-mode  nil)
 		    (viper-insert-local-user-minor-mode  nil))
-		(setq keyseq (read-key-sequence prompt continue-echo))) 
-	    (setq keyseq (read-key-sequence prompt continue-echo)))))
+		;; Note: set unread-command-events only after testing for fast
+		;; keysequence. Otherwise, viper-fast-keysequence-p will be
+		;; always t -- whether there is anything after ESC or not
+		(viper-set-unread-command-events keyseq)
+		(setq keyseq (read-key-sequence nil))) 
+	    (viper-set-unread-command-events keyseq)
+	    (setq keyseq (read-key-sequence nil)))))
     keyseq))
 
 
--- a/lisp/emulation/viper.el	Sat Feb 09 22:58:25 2002 +0000
+++ b/lisp/emulation/viper.el	Sun Feb 10 06:46:12 2002 +0000
@@ -982,14 +982,12 @@
 
   (defadvice describe-key (before viper-read-keyseq-ad protect activate)
     "Force to read key via `viper-read-key-sequence'."
-    (interactive (list (viper-events-to-keys
-			(viper-read-key-sequence "Describe key: ")))))
+    (interactive (list (viper-read-key-sequence "Describe key: "))))
   
   (defadvice describe-key-briefly
     (before viper-read-keyseq-ad protect activate)
     "Force to read key via `viper-read-key-sequence'."
-    (interactive (list (viper-events-to-keys
-			(viper-read-key-sequence "Describe key briefly: ")))))
+    (interactive (list (viper-read-key-sequence "Describe key briefly: "))))
   
   
   (defadvice find-file (before viper-add-suffix-advice activate)
--- a/man/ediff.texi	Sat Feb 09 22:58:25 2002 +0000
+++ b/man/ediff.texi	Sun Feb 10 06:46:12 2002 +0000
@@ -2458,6 +2458,7 @@
 Chuck Thompson (cthomp@@cs.uiuc.edu),
 Ray Tomlinson (tomlinso@@bbn.com),
 Raymond Toy (toy@@rtp.ericsson.se),
+Stephen J. Turnbull  (stephen@@xemacs.org),
 Jan Vroonhof (vroonhof@@math.ethz.ch),
 Colin Walters (walters@@cis.ohio-state.edu),
 Philippe Waroquiers (philippe.waroquiers@@eurocontrol.be),