emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/ediff-wind.el


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/ediff-wind.el
Date: Fri, 04 Apr 2003 01:21:54 -0500

Index: emacs/lisp/ediff-wind.el
diff -c emacs/lisp/ediff-wind.el:1.35 emacs/lisp/ediff-wind.el:1.36
*** emacs/lisp/ediff-wind.el:1.35       Sun Oct 27 21:08:02 2002
--- emacs/lisp/ediff-wind.el    Tue Feb  4 06:14:35 2003
***************
*** 24,30 ****
  ;;; Commentary:
  
  ;;; Code:
!        
  (provide 'ediff-wind)
  
  ;; Compiler pacifier
--- 24,30 ----
  ;;; Commentary:
  
  ;;; Code:
! 
  (provide 'ediff-wind)
  
  ;; Compiler pacifier
***************
*** 281,287 ****
                )
          )
      ))
!       
  
  ;; Select the lowest window on the frame.
  (defun ediff-select-lowest-window ()
--- 281,287 ----
                )
          )
      ))
! 
  
  ;; Select the lowest window on the frame.
  (defun ediff-select-lowest-window ()
***************
*** 301,307 ****
             (progn
               (setq bottom-edge next-bottom-edge)
               (setq lowest-window this-window)))
!        
         (select-window this-window)
         (if (eq last-window this-window)
             (progn
--- 301,307 ----
             (progn
               (setq bottom-edge next-bottom-edge)
               (setq lowest-window this-window)))
! 
         (select-window this-window)
         (if (eq last-window this-window)
             (progn
***************
*** 322,332 ****
    (run-hooks 'ediff-before-setup-windows-hook)
    (if (eq (selected-window) (minibuffer-window))
        (other-window 1))
!       
    ;; in case user did a no-no on a tty
    (or (ediff-window-display-p)
        (setq ediff-window-setup-function 'ediff-setup-windows-plain))
!   
    (or (ediff-keep-window-config control-buffer)
        (funcall
         (ediff-with-current-buffer control-buffer ediff-window-setup-function)
--- 322,332 ----
    (run-hooks 'ediff-before-setup-windows-hook)
    (if (eq (selected-window) (minibuffer-window))
        (other-window 1))
! 
    ;; in case user did a no-no on a tty
    (or (ediff-window-display-p)
        (setq ediff-window-setup-function 'ediff-setup-windows-plain))
! 
    (or (ediff-keep-window-config control-buffer)
        (funcall
         (ediff-with-current-buffer control-buffer ediff-window-setup-function)
***************
*** 344,350 ****
         buffer-A buffer-B buffer-C control-buffer)
      (ediff-setup-windows-plain-compare
       buffer-A buffer-B buffer-C control-buffer)))
!      
  (defun ediff-setup-windows-plain-merge (buf-A buf-B buf-C control-buffer)
    ;; skip dedicated and unsplittable frames
    (ediff-destroy-control-frame control-buffer)
--- 344,350 ----
         buffer-A buffer-B buffer-C control-buffer)
      (ediff-setup-windows-plain-compare
       buffer-A buffer-B buffer-C control-buffer)))
! 
  (defun ediff-setup-windows-plain-merge (buf-A buf-B buf-C control-buffer)
    ;; skip dedicated and unsplittable frames
    (ediff-destroy-control-frame control-buffer)
***************
*** 360,402 ****
      (split-window-vertically)
      (ediff-select-lowest-window)
      (ediff-setup-control-buffer control-buffer)
!     
      ;; go to the upper window and split it betw A, B, and possibly C
      (other-window 1)
      (setq merge-window-lines
          (max 2 (round (* (window-height) merge-window-share))))
      (switch-to-buffer buf-A)
      (setq wind-A (selected-window))
!     
      ;; XEmacs used to have a lot of trouble with display
      ;; It did't set things right unless we tell it to sit still
      ;; 19.12 seems ok.
      ;;(if ediff-xemacs-p (sit-for 0))
!     
      (split-window-vertically (max 2 (- (window-height) merge-window-lines)))
      (if (eq (selected-window) wind-A)
        (other-window 1))
      (setq wind-C (selected-window))
      (switch-to-buffer buf-C)
!     
      (select-window wind-A)
      (funcall split-window-function)
!                 
      (if (eq (selected-window) wind-A)
        (other-window 1))
      (switch-to-buffer buf-B)
      (setq wind-B (selected-window))
!         
      (ediff-with-current-buffer control-buffer
        (setq ediff-window-A wind-A
            ediff-window-B wind-B
            ediff-window-C wind-C))
!     
      (ediff-select-lowest-window)
      (ediff-setup-control-buffer control-buffer)
      ))
  
!      
  ;; This function handles all comparison jobs, including 3way jobs
  (defun ediff-setup-windows-plain-compare (buf-A buf-B buf-C control-buffer)
    ;; skip dedicated and unsplittable frames
--- 360,402 ----
      (split-window-vertically)
      (ediff-select-lowest-window)
      (ediff-setup-control-buffer control-buffer)
! 
      ;; go to the upper window and split it betw A, B, and possibly C
      (other-window 1)
      (setq merge-window-lines
          (max 2 (round (* (window-height) merge-window-share))))
      (switch-to-buffer buf-A)
      (setq wind-A (selected-window))
! 
      ;; XEmacs used to have a lot of trouble with display
      ;; It did't set things right unless we tell it to sit still
      ;; 19.12 seems ok.
      ;;(if ediff-xemacs-p (sit-for 0))
! 
      (split-window-vertically (max 2 (- (window-height) merge-window-lines)))
      (if (eq (selected-window) wind-A)
        (other-window 1))
      (setq wind-C (selected-window))
      (switch-to-buffer buf-C)
! 
      (select-window wind-A)
      (funcall split-window-function)
! 
      (if (eq (selected-window) wind-A)
        (other-window 1))
      (switch-to-buffer buf-B)
      (setq wind-B (selected-window))
! 
      (ediff-with-current-buffer control-buffer
        (setq ediff-window-A wind-A
            ediff-window-B wind-B
            ediff-window-C wind-C))
! 
      (ediff-select-lowest-window)
      (ediff-setup-control-buffer control-buffer)
      ))
  
! 
  ;; This function handles all comparison jobs, including 3way jobs
  (defun ediff-setup-windows-plain-compare (buf-A buf-B buf-C control-buffer)
    ;; skip dedicated and unsplittable frames
***************
*** 419,425 ****
      (split-window-vertically)
      (ediff-select-lowest-window)
      (ediff-setup-control-buffer control-buffer)
!     
      ;; go to the upper window and split it betw A, B, and possibly C
      (other-window 1)
      (switch-to-buffer buf-A)
--- 419,425 ----
      (split-window-vertically)
      (ediff-select-lowest-window)
      (ediff-setup-control-buffer control-buffer)
! 
      ;; go to the upper window and split it betw A, B, and possibly C
      (other-window 1)
      (switch-to-buffer buf-A)
***************
*** 430,448 ****
                     (window-height wind-A)
                   (window-width wind-A))
                 3)))
!     
      ;; XEmacs used to have a lot of trouble with display
      ;; It did't set things right unless we told it to sit still
      ;; 19.12 seems ok.
      ;;(if ediff-xemacs-p (sit-for 0))
!     
      (funcall split-window-function wind-width-or-height)
!                 
      (if (eq (selected-window) wind-A)
        (other-window 1))
      (switch-to-buffer buf-B)
      (setq wind-B (selected-window))
!         
      (if three-way-comparison
        (progn
          (funcall split-window-function) ; equally
--- 430,448 ----
                     (window-height wind-A)
                   (window-width wind-A))
                 3)))
! 
      ;; XEmacs used to have a lot of trouble with display
      ;; It did't set things right unless we told it to sit still
      ;; 19.12 seems ok.
      ;;(if ediff-xemacs-p (sit-for 0))
! 
      (funcall split-window-function wind-width-or-height)
! 
      (if (eq (selected-window) wind-A)
        (other-window 1))
      (switch-to-buffer buf-B)
      (setq wind-B (selected-window))
! 
      (if three-way-comparison
        (progn
          (funcall split-window-function) ; equally
***************
*** 450,473 ****
              (other-window 1))
          (switch-to-buffer buf-C)
          (setq wind-C (selected-window))))
!         
      (ediff-with-current-buffer control-buffer
        (setq ediff-window-A wind-A
            ediff-window-B wind-B
            ediff-window-C wind-C))
!     
      ;; It is unlikely that we will want to implement 3way window comparison.
      ;; So, only buffers A and B are used here.
      (if ediff-windows-job
        (progn
          (set-window-start wind-A wind-A-start)
          (set-window-start wind-B wind-B-start)))
!   
      (ediff-select-lowest-window)
      (ediff-setup-control-buffer control-buffer)
      ))
  
!     
  ;; dispatch an appropriate window setup function
  (defun ediff-setup-windows-multiframe (buf-A buf-B buf-C control-buf)
    (ediff-with-current-buffer control-buf
--- 450,473 ----
              (other-window 1))
          (switch-to-buffer buf-C)
          (setq wind-C (selected-window))))
! 
      (ediff-with-current-buffer control-buffer
        (setq ediff-window-A wind-A
            ediff-window-B wind-B
            ediff-window-C wind-C))
! 
      ;; It is unlikely that we will want to implement 3way window comparison.
      ;; So, only buffers A and B are used here.
      (if ediff-windows-job
        (progn
          (set-window-start wind-A wind-A-start)
          (set-window-start wind-B wind-B-start)))
! 
      (ediff-select-lowest-window)
      (ediff-setup-control-buffer control-buffer)
      ))
  
! 
  ;; dispatch an appropriate window setup function
  (defun ediff-setup-windows-multiframe (buf-A buf-B buf-C control-buf)
    (ediff-with-current-buffer control-buf
***************
*** 475,481 ****
    (if ediff-merge-job
        (ediff-setup-windows-multiframe-merge buf-A buf-B buf-C control-buf)
      (ediff-setup-windows-multiframe-compare buf-A buf-B buf-C control-buf)))
!     
  (defun ediff-setup-windows-multiframe-merge (buf-A buf-B buf-C control-buf)
  ;;; Algorithm:
  ;;;   1. Never use frames that have dedicated windows in them---it is bad to
--- 475,481 ----
    (if ediff-merge-job
        (ediff-setup-windows-multiframe-merge buf-A buf-B buf-C control-buf)
      (ediff-setup-windows-multiframe-compare buf-A buf-B buf-C control-buf)))
! 
  (defun ediff-setup-windows-multiframe-merge (buf-A buf-B buf-C control-buf)
  ;;; Algorithm:
  ;;;   1. Never use frames that have dedicated windows in them---it is bad to
***************
*** 491,497 ****
    ;;   Skip dedicated or iconified frames.
    ;;   Unsplittable frames are taken care of later.
    (ediff-skip-unsuitable-frames 'ok-unsplittable)
!   
    (let* ((window-min-height 1)
         (wind-A (ediff-get-visible-buffer-window buf-A))
         (wind-B (ediff-get-visible-buffer-window buf-B))
--- 491,497 ----
    ;;   Skip dedicated or iconified frames.
    ;;   Unsplittable frames are taken care of later.
    (ediff-skip-unsuitable-frames 'ok-unsplittable)
! 
    (let* ((window-min-height 1)
         (wind-A (ediff-get-visible-buffer-window buf-A))
         (wind-B (ediff-get-visible-buffer-window buf-B))
***************
*** 531,537 ****
         merge-window-lines
         designated-minibuffer-frame
         done-A done-B done-C)
!     
      ;; buf-A on its own
      (if (and (window-live-p wind-A)
             (null use-same-frame) ; implies wind-A is suitable
--- 531,537 ----
         merge-window-lines
         designated-minibuffer-frame
         done-A done-B done-C)
! 
      ;; buf-A on its own
      (if (and (window-live-p wind-A)
             (null use-same-frame) ; implies wind-A is suitable
***************
*** 542,548 ****
          (delete-other-windows)
          (setq wind-A (selected-window))
          (setq done-A t)))
!     
      ;; buf-B on its own
      (if (and (window-live-p wind-B)
             (null use-same-frame) ; implies wind-B is suitable
--- 542,548 ----
          (delete-other-windows)
          (setq wind-A (selected-window))
          (setq done-A t)))
! 
      ;; buf-B on its own
      (if (and (window-live-p wind-B)
             (null use-same-frame) ; implies wind-B is suitable
***************
*** 553,559 ****
          (delete-other-windows)
          (setq wind-B (selected-window))
          (setq done-B t)))
!         
      ;; buf-C on its own
      (if (and (window-live-p wind-C)
             (ediff-window-ok-for-display wind-C)
--- 553,559 ----
          (delete-other-windows)
          (setq wind-B (selected-window))
          (setq done-B t)))
! 
      ;; buf-C on its own
      (if (and (window-live-p wind-C)
             (ediff-window-ok-for-display wind-C)
***************
*** 564,570 ****
          (delete-other-windows)
          (setq wind-C (selected-window))
          (setq done-C t)))
!     
      (if (and use-same-frame-for-AB  ; implies wind A and B are suitable
             (window-live-p wind-A))
        (progn
--- 564,570 ----
          (delete-other-windows)
          (setq wind-C (selected-window))
          (setq done-C t)))
! 
      (if (and use-same-frame-for-AB  ; implies wind A and B are suitable
             (window-live-p wind-A))
        (progn
***************
*** 572,587 ****
          (select-window wind-A)
          (delete-other-windows)
          (setq wind-A (selected-window))
!         
          (funcall split-window-function)
          (if (eq (selected-window) wind-A)
              (other-window 1))
          (switch-to-buffer buf-B)
          (setq wind-B (selected-window))
!         
          (setq done-A t
                done-B t)))
!     
      (if use-same-frame
        (let ((window-min-height 1))
          (if (and (eq frame-A frame-B)
--- 572,587 ----
          (select-window wind-A)
          (delete-other-windows)
          (setq wind-A (selected-window))
! 
          (funcall split-window-function)
          (if (eq (selected-window) wind-A)
              (other-window 1))
          (switch-to-buffer buf-B)
          (setq wind-B (selected-window))
! 
          (setq done-A t
                done-B t)))
! 
      (if use-same-frame
        (let ((window-min-height 1))
          (if (and (eq frame-A frame-B)
***************
*** 595,621 ****
                (max 2 (round (* (window-height) merge-window-share))))
          (switch-to-buffer buf-A)
          (setq wind-A (selected-window))
!         
          (split-window-vertically
           (max 2 (- (window-height) merge-window-lines)))
          (if (eq (selected-window) wind-A)
              (other-window 1))
          (setq wind-C (selected-window))
          (switch-to-buffer buf-C)
!         
          (select-window wind-A)
!         
          (funcall split-window-function)
          (if (eq (selected-window) wind-A)
              (other-window 1))
          (switch-to-buffer buf-B)
          (setq wind-B (selected-window))
!         
          (setq done-A t
                done-B t
                done-C t)
          ))
!     
      (or done-A  ; Buf A to be set in its own frame,
              ;;; or it was set before because use-same-frame = 1
        (progn
--- 595,621 ----
                (max 2 (round (* (window-height) merge-window-share))))
          (switch-to-buffer buf-A)
          (setq wind-A (selected-window))
! 
          (split-window-vertically
           (max 2 (- (window-height) merge-window-lines)))
          (if (eq (selected-window) wind-A)
              (other-window 1))
          (setq wind-C (selected-window))
          (switch-to-buffer buf-C)
! 
          (select-window wind-A)
! 
          (funcall split-window-function)
          (if (eq (selected-window) wind-A)
              (other-window 1))
          (switch-to-buffer buf-B)
          (setq wind-B (selected-window))
! 
          (setq done-A t
                done-B t
                done-C t)
          ))
! 
      (or done-A  ; Buf A to be set in its own frame,
              ;;; or it was set before because use-same-frame = 1
        (progn
***************
*** 636,642 ****
          (switch-to-buffer buf-B)
          (setq wind-B (selected-window))
          ))
!     
      (or done-C  ; Buf C to be set in its own frame,
              ;;; or it was set before because use-same-frame = 1
        (progn
--- 636,642 ----
          (switch-to-buffer buf-B)
          (setq wind-B (selected-window))
          ))
! 
      (or done-C  ; Buf C to be set in its own frame,
              ;;; or it was set before because use-same-frame = 1
        (progn
***************
*** 647,653 ****
          (switch-to-buffer buf-C)
          (setq wind-C (selected-window))
          ))
!     
      (ediff-with-current-buffer control-buf
        (setq ediff-window-A wind-A
            ediff-window-B wind-B
--- 647,653 ----
          (switch-to-buffer buf-C)
          (setq wind-C (selected-window))
          ))
! 
      (ediff-with-current-buffer control-buf
        (setq ediff-window-A wind-A
            ediff-window-B wind-B
***************
*** 655,665 ****
        (setq frame-A (window-frame ediff-window-A)
            designated-minibuffer-frame
            (window-frame (minibuffer-window frame-A))))
!     
      (ediff-setup-control-frame control-buf designated-minibuffer-frame)
      ))
  
!   
  ;; Window setup for all comparison jobs, including 3way comparisons
  (defun ediff-setup-windows-multiframe-compare (buf-A buf-B buf-C control-buf)
  ;;; Algorithm:
--- 655,665 ----
        (setq frame-A (window-frame ediff-window-A)
            designated-minibuffer-frame
            (window-frame (minibuffer-window frame-A))))
! 
      (ediff-setup-control-frame control-buf designated-minibuffer-frame)
      ))
  
! 
  ;; Window setup for all comparison jobs, including 3way comparisons
  (defun ediff-setup-windows-multiframe-compare (buf-A buf-B buf-C control-buf)
  ;;; Algorithm:
***************
*** 673,683 ****
  ;;;    and the selected frame isn't splittable, we create a new frame and
  ;;;    put both buffers there, event if one of this buffers is visible in
  ;;;    another frame.
!   
    ;; Skip dedicated or iconified frames.
    ;; Unsplittable frames are taken care of later.
    (ediff-skip-unsuitable-frames 'ok-unsplittable)
!   
    (let* ((window-min-height 1)
         (wind-A (ediff-get-visible-buffer-window buf-A))
         (wind-B (ediff-get-visible-buffer-window buf-B))
--- 673,683 ----
  ;;;    and the selected frame isn't splittable, we create a new frame and
  ;;;    put both buffers there, event if one of this buffers is visible in
  ;;;    another frame.
! 
    ;; Skip dedicated or iconified frames.
    ;; Unsplittable frames are taken care of later.
    (ediff-skip-unsuitable-frames 'ok-unsplittable)
! 
    (let* ((window-min-height 1)
         (wind-A (ediff-get-visible-buffer-window buf-A))
         (wind-B (ediff-get-visible-buffer-window buf-B))
***************
*** 716,722 ****
         wind-A-start wind-B-start
         designated-minibuffer-frame
         done-A done-B done-C)
!     
      (ediff-with-current-buffer control-buf
        (setq wind-A-start (ediff-overlay-start
                          (ediff-get-value-according-to-buffer-type
--- 716,722 ----
         wind-A-start wind-B-start
         designated-minibuffer-frame
         done-A done-B done-C)
! 
      (ediff-with-current-buffer control-buf
        (setq wind-A-start (ediff-overlay-start
                          (ediff-get-value-according-to-buffer-type
***************
*** 724,730 ****
            wind-B-start (ediff-overlay-start
                          (ediff-get-value-according-to-buffer-type
                           'B ediff-narrow-bounds))))
!     
      (if (and (window-live-p wind-A) (null use-same-frame)) ; buf-A on its own
        (progn
          ;; buffer buf-A is seen in live wind-A
--- 724,730 ----
            wind-B-start (ediff-overlay-start
                          (ediff-get-value-according-to-buffer-type
                           'B ediff-narrow-bounds))))
! 
      (if (and (window-live-p wind-A) (null use-same-frame)) ; buf-A on its own
        (progn
          ;; buffer buf-A is seen in live wind-A
***************
*** 732,738 ****
          (delete-other-windows)
          (setq wind-A (selected-window))
          (setq done-A t)))
!     
      (if (and (window-live-p wind-B) (null use-same-frame)) ; buf B on its own
        (progn
          ;; buffer buf-B is seen in live wind-B
--- 732,738 ----
          (delete-other-windows)
          (setq wind-A (selected-window))
          (setq done-A t)))
! 
      (if (and (window-live-p wind-B) (null use-same-frame)) ; buf B on its own
        (progn
          ;; buffer buf-B is seen in live wind-B
***************
*** 740,746 ****
          (delete-other-windows)
          (setq wind-B (selected-window))
          (setq done-B t)))
!         
      (if (and (window-live-p wind-C) (null use-same-frame)) ; buf C on its own
        (progn
          ;; buffer buf-C is seen in live wind-C
--- 740,746 ----
          (delete-other-windows)
          (setq wind-B (selected-window))
          (setq done-B t)))
! 
      (if (and (window-live-p wind-C) (null use-same-frame)) ; buf C on its own
        (progn
          ;; buffer buf-C is seen in live wind-C
***************
*** 748,754 ****
          (delete-other-windows)
          (setq wind-C (selected-window))
          (setq done-C t)))
!     
      (if use-same-frame
        (let (wind-width-or-height) ; this affects 3way setups only
          (if (and (eq frame-A frame-B) (frame-live-p frame-A))
--- 748,754 ----
          (delete-other-windows)
          (setq wind-C (selected-window))
          (setq done-C t)))
! 
      (if use-same-frame
        (let (wind-width-or-height) ; this affects 3way setups only
          (if (and (eq frame-A frame-B) (frame-live-p frame-A))
***************
*** 758,764 ****
          (delete-other-windows)
          (switch-to-buffer buf-A)
          (setq wind-A (selected-window))
!         
          (if three-way-comparison
              (setq wind-width-or-height
                    (/
--- 758,764 ----
          (delete-other-windows)
          (switch-to-buffer buf-A)
          (setq wind-A (selected-window))
! 
          (if three-way-comparison
              (setq wind-width-or-height
                    (/
***************
*** 766,778 ****
                         (window-height wind-A)
                       (window-width wind-A))
                     3)))
!         
          (funcall split-window-function wind-width-or-height)
          (if (eq (selected-window) wind-A)
              (other-window 1))
          (switch-to-buffer buf-B)
          (setq wind-B (selected-window))
!         
          (if three-way-comparison
              (progn
                (funcall split-window-function) ; equally
--- 766,778 ----
                         (window-height wind-A)
                       (window-width wind-A))
                     3)))
! 
          (funcall split-window-function wind-width-or-height)
          (if (eq (selected-window) wind-A)
              (other-window 1))
          (switch-to-buffer buf-B)
          (setq wind-B (selected-window))
! 
          (if three-way-comparison
              (progn
                (funcall split-window-function) ; equally
***************
*** 784,790 ****
                done-B t
                done-C t)
          ))
!     
      (or done-A  ; Buf A to be set in its own frame
              ;;; or it was set before because use-same-frame = 1
        (progn
--- 784,790 ----
                done-B t
                done-C t)
          ))
! 
      (or done-A  ; Buf A to be set in its own frame
              ;;; or it was set before because use-same-frame = 1
        (progn
***************
*** 805,811 ****
          (switch-to-buffer buf-B)
          (setq wind-B (selected-window))
          ))
!     
      (if three-way-comparison
        (or done-C  ; Buf C to be set in its own frame
                  ;;; or it was set before because use-same-frame = 1
--- 805,811 ----
          (switch-to-buffer buf-B)
          (setq wind-B (selected-window))
          ))
! 
      (if three-way-comparison
        (or done-C  ; Buf C to be set in its own frame
                  ;;; or it was set before because use-same-frame = 1
***************
*** 817,823 ****
              (switch-to-buffer buf-C)
              (setq wind-C (selected-window))
              )))
!     
      (ediff-with-current-buffer control-buf
        (setq ediff-window-A wind-A
            ediff-window-B wind-B
--- 817,823 ----
              (switch-to-buffer buf-C)
              (setq wind-C (selected-window))
              )))
! 
      (ediff-with-current-buffer control-buf
        (setq ediff-window-A wind-A
            ediff-window-B wind-B
***************
*** 826,839 ****
        (setq frame-A (window-frame ediff-window-A)
            designated-minibuffer-frame
            (window-frame (minibuffer-window frame-A))))
!     
      ;; It is unlikely that we'll implement a version of ediff-windows that
      ;; would compare 3 windows at once.  So, we don't use buffer C here.
      (if ediff-windows-job
        (progn
          (set-window-start wind-A wind-A-start)
          (set-window-start wind-B wind-B-start)))
!     
      (ediff-setup-control-frame control-buf designated-minibuffer-frame)
      ))
  
--- 826,839 ----
        (setq frame-A (window-frame ediff-window-A)
            designated-minibuffer-frame
            (window-frame (minibuffer-window frame-A))))
! 
      ;; It is unlikely that we'll implement a version of ediff-windows that
      ;; would compare 3 windows at once.  So, we don't use buffer C here.
      (if ediff-windows-job
        (progn
          (set-window-start wind-A wind-A-start)
          (set-window-start wind-B wind-B-start)))
! 
      (ediff-setup-control-frame control-buf designated-minibuffer-frame)
      ))
  
***************
*** 868,874 ****
  
  (defun ediff-frame-has-dedicated-windows (frame)
    (let (ans)
!     (walk-windows 
       (lambda (wind) (if (window-dedicated-p wind)
                        (setq ans t)))
       'ignore-minibuffer
--- 868,874 ----
  
  (defun ediff-frame-has-dedicated-windows (frame)
    (let (ans)
!     (walk-windows
       (lambda (wind) (if (window-dedicated-p wind)
                        (setq ans t)))
       'ignore-minibuffer
***************
*** 896,902 ****
        ctl-frame old-ctl-frame lines
        ;; user-grabbed-mouse
        fheight fwidth adjusted-parameters)
!       
      (ediff-with-current-buffer ctl-buffer
        (ediff-cond-compile-for-xemacs-or-emacs
         (set-buffer-menubar nil) ; xemacs
--- 896,902 ----
        ctl-frame old-ctl-frame lines
        ;; user-grabbed-mouse
        fheight fwidth adjusted-parameters)
! 
      (ediff-with-current-buffer ctl-buffer
        (ediff-cond-compile-for-xemacs-or-emacs
         (set-buffer-menubar nil) ; xemacs
***************
*** 904,910 ****
         )
        ;;(setq user-grabbed-mouse (ediff-user-grabbed-mouse))
        (run-hooks 'ediff-before-setup-control-frame-hook))
!   
      (setq old-ctl-frame (ediff-with-current-buffer ctl-buffer 
ediff-control-frame))
      (ediff-with-current-buffer ctl-buffer
        (setq ctl-frame (if (frame-live-p old-ctl-frame)
--- 904,910 ----
         )
        ;;(setq user-grabbed-mouse (ediff-user-grabbed-mouse))
        (run-hooks 'ediff-before-setup-control-frame-hook))
! 
      (setq old-ctl-frame (ediff-with-current-buffer ctl-buffer 
ediff-control-frame))
      (ediff-with-current-buffer ctl-buffer
        (setq ctl-frame (if (frame-live-p old-ctl-frame)
***************
*** 920,947 ****
           )
        (error))
        )
!     
      (setq ctl-frame-iconified-p (ediff-frame-iconified-p ctl-frame))
      (select-frame ctl-frame)
      (if (window-dedicated-p (selected-window))
        ()
        (delete-other-windows)
        (switch-to-buffer ctl-buffer))
!       
      ;; must be before ediff-setup-control-buffer
      ;; just a precaution--we should be in ctl-buffer already
      (ediff-with-current-buffer ctl-buffer
        (make-local-variable 'frame-title-format)
        (make-local-variable 'frame-icon-title-format)  ; XEmacs
        (make-local-variable 'icon-title-format))       ; Emacs
!     
      (ediff-setup-control-buffer ctl-buffer)
      (setq dont-iconify-ctl-frame
          (not (string= ediff-help-message ediff-brief-help-message)))
      (setq deiconify-ctl-frame
          (and (eq this-command 'ediff-toggle-help)
               dont-iconify-ctl-frame))
!     
      ;; 1 more line for the modeline
      (setq lines (1+ (count-lines (point-min) (point-max)))
          fheight lines
--- 920,947 ----
           )
        (error))
        )
! 
      (setq ctl-frame-iconified-p (ediff-frame-iconified-p ctl-frame))
      (select-frame ctl-frame)
      (if (window-dedicated-p (selected-window))
        ()
        (delete-other-windows)
        (switch-to-buffer ctl-buffer))
! 
      ;; must be before ediff-setup-control-buffer
      ;; just a precaution--we should be in ctl-buffer already
      (ediff-with-current-buffer ctl-buffer
        (make-local-variable 'frame-title-format)
        (make-local-variable 'frame-icon-title-format)  ; XEmacs
        (make-local-variable 'icon-title-format))       ; Emacs
! 
      (ediff-setup-control-buffer ctl-buffer)
      (setq dont-iconify-ctl-frame
          (not (string= ediff-help-message ediff-brief-help-message)))
      (setq deiconify-ctl-frame
          (and (eq this-command 'ediff-toggle-help)
               dont-iconify-ctl-frame))
! 
      ;; 1 more line for the modeline
      (setq lines (1+ (count-lines (point-min) (point-max)))
          fheight lines
***************
*** 963,969 ****
                    '(auto-raise . nil)
                  '(auto-raise . t))
                adjusted-parameters))
!     
      ;; In XEmacs, buffer menubar needs to be killed before frame parameters
      ;; are changed.
      (if (ediff-has-toolbar-support-p)
--- 963,969 ----
                    '(auto-raise . nil)
                  '(auto-raise . t))
                adjusted-parameters))
! 
      ;; In XEmacs, buffer menubar needs to be killed before frame parameters
      ;; are changed.
      (if (ediff-has-toolbar-support-p)
***************
*** 980,986 ****
         nil ; emacs
         )
        )
!     
      ;; Under OS/2 (emx) we have to call modify frame parameters twice, in 
order
      ;; to make sure that at least once we do it for non-iconified frame.  If
      ;; appears that in the OS/2 port of Emacs, one can't modify frame
--- 980,986 ----
         nil ; emacs
         )
        )
! 
      ;; Under OS/2 (emx) we have to call modify frame parameters twice, in 
order
      ;; to make sure that at least once we do it for non-iconified frame.  If
      ;; appears that in the OS/2 port of Emacs, one can't modify frame
***************
*** 988,1015 ****
      ;; windows-nt.
      (if (memq system-type '(emx windows-nt windows-95))
        (modify-frame-parameters ctl-frame adjusted-parameters))
!       
      ;; make or zap toolbar (if not requested)
      (ediff-make-bottom-toolbar ctl-frame)
!     
      (goto-char (point-min))
  
      (modify-frame-parameters ctl-frame adjusted-parameters)
      (make-frame-visible ctl-frame)
!     
      ;; This works around a bug in 19.25 and earlier.  There, if frame gets
      ;; iconified, the current buffer changes to that of the frame that
      ;; becomes exposed as a result of this iconification.
      ;; So, we make sure the current buffer doesn't change.
      (select-frame ctl-frame)
      (ediff-refresh-control-frame)
!     
      (cond ((and ediff-prefer-iconified-control-frame
                (not ctl-frame-iconified-p) (not dont-iconify-ctl-frame))
           (iconify-frame ctl-frame))
          ((or deiconify-ctl-frame (not ctl-frame-iconified-p))
           (raise-frame ctl-frame)))
!     
      (set-window-dedicated-p (selected-window) t)
  
      ;; Now move the frame.  We must do it separately due to an obscure bug in
--- 988,1015 ----
      ;; windows-nt.
      (if (memq system-type '(emx windows-nt windows-95))
        (modify-frame-parameters ctl-frame adjusted-parameters))
! 
      ;; make or zap toolbar (if not requested)
      (ediff-make-bottom-toolbar ctl-frame)
! 
      (goto-char (point-min))
  
      (modify-frame-parameters ctl-frame adjusted-parameters)
      (make-frame-visible ctl-frame)
! 
      ;; This works around a bug in 19.25 and earlier.  There, if frame gets
      ;; iconified, the current buffer changes to that of the frame that
      ;; becomes exposed as a result of this iconification.
      ;; So, we make sure the current buffer doesn't change.
      (select-frame ctl-frame)
      (ediff-refresh-control-frame)
! 
      (cond ((and ediff-prefer-iconified-control-frame
                (not ctl-frame-iconified-p) (not dont-iconify-ctl-frame))
           (iconify-frame ctl-frame))
          ((or deiconify-ctl-frame (not ctl-frame-iconified-p))
           (raise-frame ctl-frame)))
! 
      (set-window-dedicated-p (selected-window) t)
  
      ;; Now move the frame.  We must do it separately due to an obscure bug in
***************
*** 1017,1023 ****
      (modify-frame-parameters
       ctl-frame
       (funcall ediff-control-frame-position-function ctl-buffer fwidth 
fheight))
!       
      ;; synchronize so the cursor will move to control frame
      ;; per RMS suggestion
      (if (ediff-window-display-p)
--- 1017,1023 ----
      (modify-frame-parameters
       ctl-frame
       (funcall ediff-control-frame-position-function ctl-buffer fwidth 
fheight))
! 
      ;; synchronize so the cursor will move to control frame
      ;; per RMS suggestion
      (if (ediff-window-display-p)
***************
*** 1032,1038 ****
        (ediff-reset-mouse ctl-frame
                           (or (eq this-command 'ediff-quit)
                               (not (eq ediff-grab-mouse t)))))
!       
      (if ediff-xemacs-p
        (ediff-with-current-buffer ctl-buffer
          (ediff-cond-compile-for-xemacs-or-emacs
--- 1032,1038 ----
        (ediff-reset-mouse ctl-frame
                           (or (eq this-command 'ediff-quit)
                               (not (eq ediff-grab-mouse t)))))
! 
      (if ediff-xemacs-p
        (ediff-with-current-buffer ctl-buffer
          (ediff-cond-compile-for-xemacs-or-emacs
***************
*** 1042,1053 ****
          (add-hook
           'select-frame-hook 'ediff-xemacs-select-frame-hook nil 'local)
          ))
!       
      (ediff-with-current-buffer ctl-buffer
        (run-hooks 'ediff-after-setup-control-frame-hook))
      ))
  
!     
  (defun ediff-destroy-control-frame (ctl-buffer)
    (ediff-with-current-buffer ctl-buffer
      (if (and (ediff-window-display-p) (frame-live-p ediff-control-frame))
--- 1042,1053 ----
          (add-hook
           'select-frame-hook 'ediff-xemacs-select-frame-hook nil 'local)
          ))
! 
      (ediff-with-current-buffer ctl-buffer
        (run-hooks 'ediff-after-setup-control-frame-hook))
      ))
  
! 
  (defun ediff-destroy-control-frame (ctl-buffer)
    (ediff-with-current-buffer ctl-buffer
      (if (and (ediff-window-display-p) (frame-live-p ediff-control-frame))
***************
*** 1062,1068 ****
    (ediff-skip-unsuitable-frames)
    ;;(ediff-reset-mouse nil)
    )
!     
  
  ;; finds a good place to clip control frame
  (defun ediff-make-frame-position (ctl-buffer ctl-frame-width ctl-frame-height)
--- 1062,1068 ----
    (ediff-skip-unsuitable-frames)
    ;;(ediff-reset-mouse nil)
    )
! 
  
  ;; finds a good place to clip control frame
  (defun ediff-make-frame-position (ctl-buffer ctl-frame-width ctl-frame-height)
***************
*** 1075,1081 ****
           (ctl-frame ediff-control-frame)
           horizontal-adjustment upward-adjustment
           ctl-frame-top ctl-frame-left)
!       
        ;; Multiple control frames are clipped based on the value of
        ;; ediff-control-buffer-number.  This is done in order not to obscure
        ;; other active control panels.
--- 1075,1081 ----
           (ctl-frame ediff-control-frame)
           horizontal-adjustment upward-adjustment
           ctl-frame-top ctl-frame-left)
! 
        ;; Multiple control frames are clipped based on the value of
        ;; ediff-control-buffer-number.  This is done in order not to obscure
        ;; other active control panels.
***************
*** 1107,1122 ****
        ;; keep ctl frame within the visible bounds
        (setq ctl-frame-top (max ctl-frame-top 1)
            ctl-frame-left (max ctl-frame-left 1))
!       
        (list (cons 'top ctl-frame-top)
            (cons 'left ctl-frame-left))
        )))
!                              
  (defun ediff-xemacs-select-frame-hook ()
    (if (and (equal (selected-frame) ediff-control-frame)
           (not ediff-use-long-help-message))
        (raise-frame ediff-control-frame)))
!       
  (defun ediff-make-wide-display ()
    "Construct an alist of parameters for the wide display.
  Saves the old frame parameters in `ediff-wide-display-orig-parameters'.
--- 1107,1122 ----
        ;; keep ctl frame within the visible bounds
        (setq ctl-frame-top (max ctl-frame-top 1)
            ctl-frame-left (max ctl-frame-left 1))
! 
        (list (cons 'top ctl-frame-top)
            (cons 'left ctl-frame-left))
        )))
! 
  (defun ediff-xemacs-select-frame-hook ()
    (if (and (equal (selected-frame) ediff-control-frame)
           (not ediff-use-long-help-message))
        (raise-frame ediff-control-frame)))
! 
  (defun ediff-make-wide-display ()
    "Construct an alist of parameters for the wide display.
  Saves the old frame parameters in `ediff-wide-display-orig-parameters'.
***************
*** 1135,1149 ****
          ediff-wide-display-frame frame-A)
      (modify-frame-parameters frame-A (list (cons 'left cw)
                                                 (cons 'width wd)))))
!   
!       
  
  ;; Revise the mode line to display which difference we have selected
  ;; Also resets modelines of buffers A/B, since they may be clobbered by
  ;; anothe invocations of Ediff.
  (defun ediff-refresh-mode-lines ()
    (let (buf-A-state-diff buf-B-state-diff buf-C-state-diff buf-C-state-merge)
!     
      (if (ediff-valid-difference-p)
        (setq
         buf-C-state-diff (ediff-get-state-of-diff ediff-current-difference 'C)
--- 1135,1149 ----
          ediff-wide-display-frame frame-A)
      (modify-frame-parameters frame-A (list (cons 'left cw)
                                                 (cons 'width wd)))))
! 
! 
  
  ;; Revise the mode line to display which difference we have selected
  ;; Also resets modelines of buffers A/B, since they may be clobbered by
  ;; anothe invocations of Ediff.
  (defun ediff-refresh-mode-lines ()
    (let (buf-A-state-diff buf-B-state-diff buf-C-state-diff buf-C-state-merge)
! 
      (if (ediff-valid-difference-p)
        (setq
         buf-C-state-diff (ediff-get-state-of-diff ediff-current-difference 'C)
***************
*** 1172,1178 ****
        (setq buf-A-state-diff ""
            buf-B-state-diff ""
            buf-C-state-diff ""))
!     
      ;; control buffer format
      (setq mode-line-format
          (if (ediff-narrow-control-frame-p)
--- 1172,1178 ----
        (setq buf-A-state-diff ""
            buf-B-state-diff ""
            buf-C-state-diff ""))
! 
      ;; control buffer format
      (setq mode-line-format
          (if (ediff-narrow-control-frame-p)
***************
*** 1185,1194 ****
            (ediff-make-wide-control-buffer-id)))
      ;; Force mode-line redisplay
      (force-mode-line-update)
!     
      (if (and (ediff-window-display-p) (frame-live-p ediff-control-frame))
        (ediff-refresh-control-frame))
!     
      (ediff-with-current-buffer ediff-buffer-A
        (setq ediff-diff-status buf-A-state-diff)
        (ediff-strip-mode-line-format)
--- 1185,1194 ----
            (ediff-make-wide-control-buffer-id)))
      ;; Force mode-line redisplay
      (force-mode-line-update)
! 
      (if (and (ediff-window-display-p) (frame-live-p ediff-control-frame))
        (ediff-refresh-control-frame))
! 
      (ediff-with-current-buffer ediff-buffer-A
        (setq ediff-diff-status buf-A-state-diff)
        (ediff-strip-mode-line-format)
***************
*** 1225,1232 ****
                            (t ""))
                      mode-line-format))))
      ))
!     
!   
  (defun ediff-refresh-control-frame ()
    (if ediff-emacs-p
        ;; set frame/icon titles for Emacs
--- 1225,1232 ----
                            (t ""))
                      mode-line-format))))
      ))
! 
! 
  (defun ediff-refresh-control-frame ()
    (if ediff-emacs-p
        ;; set frame/icon titles for Emacs
***************
*** 1240,1247 ****
          frame-icon-title-format (ediff-make-narrow-control-buffer-id))
      ;; force an update of the frame title
      (modify-frame-parameters ediff-control-frame '(()))))
!    
!   
  (defun ediff-make-narrow-control-buffer-id (&optional skip-name)
    (concat
     (if skip-name
--- 1240,1247 ----
          frame-icon-title-format (ediff-make-narrow-control-buffer-id))
      ;; force an update of the frame title
      (modify-frame-parameters ediff-control-frame '(()))))
! 
! 
  (defun ediff-make-narrow-control-buffer-id (&optional skip-name)
    (concat
     (if skip-name
***************
*** 1260,1266 ****
    (concat
     (cdr (assoc 'name ediff-control-frame-parameters))
     ediff-control-buffer-suffix))
!                 
  (defun ediff-make-wide-control-buffer-id ()
    (cond ((< ediff-current-difference 0)
         (list (format "%%b   At start of %d diffs"
--- 1260,1266 ----
    (concat
     (cdr (assoc 'name ediff-control-frame-parameters))
     ediff-control-buffer-suffix))
! 
  (defun ediff-make-wide-control-buffer-id ()
    (cond ((< ediff-current-difference 0)
         (list (format "%%b   At start of %d diffs"
***************
*** 1281,1290 ****
        (if ediff-xemacs-p
          (get-buffer-window buff t)
        (get-buffer-window buff 'visible))))
!       
  
  ;;; Functions to decide when to redraw windows
!   
  (defun ediff-keep-window-config (control-buf)
    (and (eq control-buf (current-buffer))
         (/= (buffer-size) 0)
--- 1281,1290 ----
        (if ediff-xemacs-p
          (get-buffer-window buff t)
        (get-buffer-window buff 'visible))))
! 
  
  ;;; Functions to decide when to redraw windows
! 
  (defun ediff-keep-window-config (control-buf)
    (and (eq control-buf (current-buffer))
         (/= (buffer-size) 0)
***************
*** 1293,1299 ****
               (A-wind ediff-window-A)
               (B-wind ediff-window-B)
               (C-wind ediff-window-C))
!         
           (and
            (ediff-window-visible-p A-wind)
            (ediff-window-visible-p B-wind)
--- 1293,1299 ----
               (A-wind ediff-window-A)
               (B-wind ediff-window-B)
               (C-wind ediff-window-C))
! 
           (and
            (ediff-window-visible-p A-wind)
            (ediff-window-visible-p B-wind)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]