# HG changeset patch # User Stefan Monnier # Date 1125935002 0 # Node ID 4bc5f5d3e625a8cff2a6016742b2490baa507bc6 # Parent 73213f30cd5b168d8511bbc81a654cf57b135f11 (compilation-goto-locus): Take into account iconified frames when determining whether the buffer is already visible. Don't reset window height if the window already existed. diff -r 73213f30cd5b -r 4bc5f5d3e625 lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Mon Sep 05 15:39:26 2005 +0000 +++ b/lisp/progmodes/compile.el Mon Sep 05 15:43:22 2005 +0000 @@ -1688,14 +1688,18 @@ ;; Show compilation buffer in other window, scrolled to this error. (let* ((pop-up-windows t) ;; Use an existing window if it is in a visible frame. - (w (or (get-buffer-window (marker-buffer msg) 'visible) - ;; Pop up a window. - (display-buffer (marker-buffer msg)))) + (pre-existing (get-buffer-window (marker-buffer msg) 0)) + (w (let ((display-buffer-reuse-frames t)) + ;; Pop up a window. + (display-buffer (marker-buffer msg)))) (highlight-regexp (with-current-buffer (marker-buffer msg) ;; also do this while we change buffer (compilation-set-window w msg) compilation-highlight-regexp))) - (compilation-set-window-height w) + ;; Ideally, the window-size should be passed to `display-buffer' (via + ;; something like special-display-buffer) so it's only used when + ;; creating a new window. + (unless pre-existing (compilation-set-window-height w)) (when highlight-regexp (if (timerp next-error-highlight-timer)