aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kifer2002-10-12 07:13:59 +0000
committerMichael Kifer2002-10-12 07:13:59 +0000
commit2e955a8b51cf21b6f5383ef77cd32d0d58fcabc1 (patch)
treef5f1b62b8cdf403e7781941617a26ae1fc4fafcd
parentd6da15ec7ba78a2c49f4fa4bc2de2d6aee379318 (diff)
downloademacs-2e955a8b51cf21b6f5383ef77cd32d0d58fcabc1.tar.gz
emacs-2e955a8b51cf21b6f5383ef77cd32d0d58fcabc1.zip
2002-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
* ediff-init.el (ediff-frame-char-height): use frame-selected-window. * ediff-util.el (ediff-file-checked-in-p): changed progn with and * ediff-wind.el (ediff-skip-unsuitable-frames): distinguish selected frame from frame of selected window (ediff-frame-has-dedicated-windows): don't select any frames to avoid changing selected windows (ediff-setup-control-frame): make sure auto-rase is properly set for the control frame
-rw-r--r--lisp/ChangeLog13
-rw-r--r--lisp/ediff-init.el2
-rw-r--r--lisp/ediff-util.el6
-rw-r--r--lisp/ediff-wind.el52
4 files changed, 42 insertions, 31 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f2bf55ad6ed..5bf234e6fa6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,16 @@
12002-10-12 Michael Kifer <kifer@cs.stonybrook.edu>
2
3 * ediff-init.el (ediff-frame-char-height): use frame-selected-window.
4
5 * ediff-util.el (ediff-file-checked-in-p): changed progn with and
6
7 * ediff-wind.el (ediff-skip-unsuitable-frames): distinguish selected
8 frame from frame of selected window
9 (ediff-frame-has-dedicated-windows): don't select any frames to avoid
10 changing selected windows
11 (ediff-setup-control-frame): make sure auto-rase is properly set for
12 the control frame
13
12002-10-10 Simon Josefsson <jas@extundo.com> 142002-10-10 Simon Josefsson <jas@extundo.com>
2 15
3 * browse-url.el (browse-url-mozilla): Doc fix. 16 * browse-url.el (browse-url-mozilla): Doc fix.
diff --git a/lisp/ediff-init.el b/lisp/ediff-init.el
index 01c9b1e129a..58a37e2566d 100644
--- a/lisp/ediff-init.el
+++ b/lisp/ediff-init.el
@@ -1550,7 +1550,7 @@ This default should work without changes."
1550 1550
1551(defsubst ediff-frame-char-height (frame) 1551(defsubst ediff-frame-char-height (frame)
1552 (ediff-cond-compile-for-xemacs-or-emacs 1552 (ediff-cond-compile-for-xemacs-or-emacs
1553 (glyph-height ediff-H-glyph (selected-window frame)) ; xemacs cse 1553 (glyph-height ediff-H-glyph (frame-selected-window frame)) ; xemacs case
1554 (frame-char-height frame) ; emacs case 1554 (frame-char-height frame) ; emacs case
1555 ) 1555 )
1556 ) 1556 )
diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el
index 64d19c5ee69..865f14a41c5 100644
--- a/lisp/ediff-util.el
+++ b/lisp/ediff-util.el
@@ -1137,9 +1137,9 @@ of the current buffer."
1137 ;; CVS files are considered not checked in 1137 ;; CVS files are considered not checked in
1138 (not (memq (vc-backend file) '(nil CVS))) 1138 (not (memq (vc-backend file) '(nil CVS)))
1139 (if (fboundp 'vc-state) 1139 (if (fboundp 'vc-state)
1140 (progn 1140 (and
1141 (not (memq (vc-state file) '(edited needs-merge))) 1141 (not (memq (vc-state file) '(edited needs-merge)))
1142 (not (stringp (vc-state file)))) 1142 (not (stringp (vc-state file))))
1143 ;; XEmacs has no vc-state 1143 ;; XEmacs has no vc-state
1144 (not (vc-locking-user file))) 1144 (not (vc-locking-user file)))
1145 )) 1145 ))
diff --git a/lisp/ediff-wind.el b/lisp/ediff-wind.el
index ae65b1d6f51..723ae577767 100644
--- a/lisp/ediff-wind.el
+++ b/lisp/ediff-wind.el
@@ -157,7 +157,7 @@ In this case, Ediff will use those frames to display these buffers."
157 '(scrollbar-width . 0) ; XEmacs only 157 '(scrollbar-width . 0) ; XEmacs only
158 '(menu-bar-lines . 0) ; Emacs only 158 '(menu-bar-lines . 0) ; Emacs only
159 '(tool-bar-lines . 0) ; Emacs 21+ only 159 '(tool-bar-lines . 0) ; Emacs 21+ only
160 ;; don't lower and auto-raise 160 ;; don't lower but auto-raise
161 '(auto-lower . nil) 161 '(auto-lower . nil)
162 '(auto-raise . t) 162 '(auto-raise . t)
163 '(visibility . nil) 163 '(visibility . nil)
@@ -821,7 +821,7 @@ into icons, regardless of the window manager."
821 (setq ediff-window-A wind-A 821 (setq ediff-window-A wind-A
822 ediff-window-B wind-B 822 ediff-window-B wind-B
823 ediff-window-C wind-C) 823 ediff-window-C wind-C)
824 824
825 (setq frame-A (window-frame ediff-window-A) 825 (setq frame-A (window-frame ediff-window-A)
826 designated-minibuffer-frame 826 designated-minibuffer-frame
827 (window-frame (minibuffer-window frame-A)))) 827 (window-frame (minibuffer-window frame-A))))
@@ -840,44 +840,38 @@ into icons, regardless of the window manager."
840;; create a new splittable frame if none is found 840;; create a new splittable frame if none is found
841(defun ediff-skip-unsuitable-frames (&optional ok-unsplittable) 841(defun ediff-skip-unsuitable-frames (&optional ok-unsplittable)
842 (if (ediff-window-display-p) 842 (if (ediff-window-display-p)
843 ;;(let (last-window) 843 (let ((wind-frame (window-frame (selected-window)))
844 (let (seen-windows) 844 seen-windows)
845 ;; (memq ... seen-windows) has quadratic behavior,
846 ;; but (eq ... last-window) runs into an emacs bug where next-window
847 ;; gets stuck in a loop if the only frame is the minibuffer.
848 ;;
849 ;;(while (and (not (eq (selected-window) last-window))
850 (while (and (not (memq (selected-window) seen-windows)) 845 (while (and (not (memq (selected-window) seen-windows))
851 (or 846 (or
852 (ediff-frame-has-dedicated-windows (selected-frame)) 847 (ediff-frame-has-dedicated-windows wind-frame)
853 (ediff-frame-iconified-p (selected-frame)) 848 (ediff-frame-iconified-p wind-frame)
854 ;; skip small windows 849 ;; skip small windows
855 (< (frame-height (selected-frame)) 850 (< (frame-height wind-frame)
856 (* 3 window-min-height)) 851 (* 3 window-min-height))
857 (if ok-unsplittable 852 (if ok-unsplittable
858 nil 853 nil
859 (ediff-frame-unsplittable-p (selected-frame))))) 854 (ediff-frame-unsplittable-p wind-frame))))
860 ;; remember where started 855 ;; remember history
861 ;;(or last-window (setq last-window (selected-window)))
862 (setq seen-windows (cons (selected-window) seen-windows)) 856 (setq seen-windows (cons (selected-window) seen-windows))
863 ;; try new window 857 ;; try new window
864 (other-window 1 t)) 858 (other-window 1 t)
865 ;;(if (eq (selected-window) last-window) 859 (setq wind-frame (window-frame (selected-window)))
860 )
866 (if (memq (selected-window) seen-windows) 861 (if (memq (selected-window) seen-windows)
867 ;; fed up, no appropriate frame 862 ;; fed up, no appropriate frames
868 (progn 863 (setq wind-frame (make-frame '((unsplittable)))))
869 (select-frame (make-frame '((unsplittable))))))))) 864
865 (select-frame wind-frame)
866 )))
870 867
871(defun ediff-frame-has-dedicated-windows (frame) 868(defun ediff-frame-has-dedicated-windows (frame)
872 (let ((cur-fr (selected-frame)) 869 (let (ans)
873 ans)
874 (select-frame frame)
875 (walk-windows 870 (walk-windows
876 (lambda (wind) (if (window-dedicated-p wind) 871 (lambda (wind) (if (window-dedicated-p wind)
877 (setq ans t))) 872 (setq ans t)))
878 'ignore-minibuffer 873 'ignore-minibuffer
879 frame) 874 frame)
880 (select-frame cur-fr)
881 ans)) 875 ans))
882 876
883;; window is ok, if it is only one window on the frame, not counting the 877;; window is ok, if it is only one window on the frame, not counting the
@@ -961,9 +955,13 @@ into icons, regardless of the window manager."
961 (cons 'width fwidth) 955 (cons 'width fwidth)
962 (cons 'height fheight)) 956 (cons 'height fheight))
963 ) 957 )
964 (if ediff-use-long-help-message 958
965 (setq adjusted-parameters 959 ;; adjust autoraise
966 (cons '(auto-raise . nil) adjusted-parameters))) 960 (setq adjusted-parameters
961 (cons (if ediff-use-long-help-message
962 '(auto-raise . nil)
963 '(auto-raise . t))
964 adjusted-parameters))
967 965
968 ;; In XEmacs, buffer menubar needs to be killed before frame parameters 966 ;; In XEmacs, buffer menubar needs to be killed before frame parameters
969 ;; are changed. 967 ;; are changed.