diff options
| author | Stefan Monnier | 2005-09-05 15:43:22 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2005-09-05 15:43:22 +0000 |
| commit | 7bbbd31fed9e2070c8e2ecbe857a7aba8c4172a3 (patch) | |
| tree | e79619cd8834b332813517c494dfdd5d95a3a09a | |
| parent | 928f12c976fbfb9bfc2570e8f664262e78212dfa (diff) | |
| download | emacs-7bbbd31fed9e2070c8e2ecbe857a7aba8c4172a3.tar.gz emacs-7bbbd31fed9e2070c8e2ecbe857a7aba8c4172a3.zip | |
(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.
| -rw-r--r-- | lisp/progmodes/compile.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 6321216dcce..f0836cbf2b0 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -1688,14 +1688,18 @@ and overlay is highlighted between MK and END-MK." | |||
| 1688 | ;; Show compilation buffer in other window, scrolled to this error. | 1688 | ;; Show compilation buffer in other window, scrolled to this error. |
| 1689 | (let* ((pop-up-windows t) | 1689 | (let* ((pop-up-windows t) |
| 1690 | ;; Use an existing window if it is in a visible frame. | 1690 | ;; Use an existing window if it is in a visible frame. |
| 1691 | (w (or (get-buffer-window (marker-buffer msg) 'visible) | 1691 | (pre-existing (get-buffer-window (marker-buffer msg) 0)) |
| 1692 | ;; Pop up a window. | 1692 | (w (let ((display-buffer-reuse-frames t)) |
| 1693 | (display-buffer (marker-buffer msg)))) | 1693 | ;; Pop up a window. |
| 1694 | (display-buffer (marker-buffer msg)))) | ||
| 1694 | (highlight-regexp (with-current-buffer (marker-buffer msg) | 1695 | (highlight-regexp (with-current-buffer (marker-buffer msg) |
| 1695 | ;; also do this while we change buffer | 1696 | ;; also do this while we change buffer |
| 1696 | (compilation-set-window w msg) | 1697 | (compilation-set-window w msg) |
| 1697 | compilation-highlight-regexp))) | 1698 | compilation-highlight-regexp))) |
| 1698 | (compilation-set-window-height w) | 1699 | ;; Ideally, the window-size should be passed to `display-buffer' (via |
| 1700 | ;; something like special-display-buffer) so it's only used when | ||
| 1701 | ;; creating a new window. | ||
| 1702 | (unless pre-existing (compilation-set-window-height w)) | ||
| 1699 | 1703 | ||
| 1700 | (when highlight-regexp | 1704 | (when highlight-regexp |
| 1701 | (if (timerp next-error-highlight-timer) | 1705 | (if (timerp next-error-highlight-timer) |