1688 |
;; Show compilation buffer in other window, scrolled to this error. |
;; Show compilation buffer in other window, scrolled to this error. |
1689 |
(let* ((pop-up-windows t) |
(let* ((pop-up-windows t) |
1690 |
;; Use an existing window if it is in a visible frame. |
;; Use an existing window if it is in a visible frame. |
1691 |
(w (or (get-buffer-window (marker-buffer msg) 'visible) |
(pre-existing (get-buffer-window (marker-buffer msg) 0)) |
1692 |
;; Pop up a window. |
(w (let ((display-buffer-reuse-frames t)) |
1693 |
(display-buffer (marker-buffer msg)))) |
;; Pop up a window. |
1694 |
|
(display-buffer (marker-buffer msg)))) |
1695 |
(highlight-regexp (with-current-buffer (marker-buffer msg) |
(highlight-regexp (with-current-buffer (marker-buffer msg) |
1696 |
;; also do this while we change buffer |
;; also do this while we change buffer |
1697 |
(compilation-set-window w msg) |
(compilation-set-window w msg) |
1698 |
compilation-highlight-regexp))) |
compilation-highlight-regexp))) |
1699 |
(compilation-set-window-height w) |
;; 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)) |
1703 |
|
|
1704 |
(when highlight-regexp |
(when highlight-regexp |
1705 |
(if (timerp next-error-highlight-timer) |
(if (timerp next-error-highlight-timer) |