Subject: Re: bug#19170: 25.0.50; enhancement request: `compare-windows' use across frames

From: Juri Linkov <[email-masked]>
Date: Tue, 25 Nov 2014 00:19:32 +0200

> (None of the current behavior should be lost, in particular, behavior
> per `compare-windows-sync'.)

Thanks for the bug report.  The patch below fixes it in
`compare-windows-sync' to use the same frame-selecting logic
like existed for a long time in `compare-windows':

diff --git a/lisp/vc/compare-w.el b/lisp/vc/compare-w.el
index 25d4cf7..26f8be4 100644
--- a/lisp/vc/compare-w.el
+++ b/lisp/vc/compare-w.el
@@ -304,6 +304,9 @@ on third call it again advances points to the next difference and so on."
   (if (not compare-windows-sync-point)
       (let* ((w1 (selected-window))
              (w2 (next-window w1))
+             (w2 (if (eq w2 (selected-window))
+		     (next-window (selected-window) nil 'visible)
+		   w2))
              (b2 (window-buffer w2))
              (point-max2 (with-current-buffer b2 (point-max)))
              (op2 (window-point w2))