summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMichael Kifer <kifer@cs.stonybrook.edu>2002-02-10 06:46:12 +0000
committerMichael Kifer <kifer@cs.stonybrook.edu>2002-02-10 06:46:12 +0000
commitdb52ec2a354443e3ba56f32e1e052832519f799e (patch)
treeed86ae03977f76db973ad5e5be78267d046997aa /lisp
parentb44d93f71e206f942c6d4577eb747501926f947d (diff)
downloademacs-db52ec2a354443e3ba56f32e1e052832519f799e.tar.gz
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ediff-init.el8
-rw-r--r--lisp/ediff-util.el3
-rw-r--r--lisp/ediff-wind.el4
-rw-r--r--lisp/emulation/viper-util.el18
-rw-r--r--lisp/emulation/viper.el6
5 files changed, 23 insertions, 16 deletions
diff --git a/lisp/ediff-init.el b/lisp/ediff-init.el
index 729d6f76e19..ae6d05ab40a 100644
--- a/lisp/ediff-init.el
+++ b/lisp/ediff-init.el
@@ -87,6 +87,14 @@ that Ediff doesn't know about.")
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)
diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el
index c7f0be3638d..e1dbdc7f336 100644
--- a/lisp/ediff-util.el
+++ b/lisp/ediff-util.el
@@ -2628,7 +2628,8 @@ delete this buffer in another session as well."
;; 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)))
diff --git a/lisp/ediff-wind.el b/lisp/ediff-wind.el
index ede3e569ae0..8d8334705d2 100644
--- a/lisp/ediff-wind.el
+++ b/lisp/ediff-wind.el
@@ -968,8 +968,8 @@ into icons, regardless of the window manager."
(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))
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el
index 817db016ef4..bb748fcadfc 100644
--- a/lisp/emulation/viper-util.el
+++ b/lisp/emulation/viper-util.el
@@ -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))
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index 65c426da535..a0de2e27275 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -982,14 +982,12 @@ remains buffer-local."
(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)