Commit e89a7d77 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(compilation-goto-locus): Handle case where *compilation*

is in a dedicated window.
parent 5844e1c4
......@@ -955,7 +955,10 @@ The current buffer should be the desired compilation output buffer."
"Jump to an error locus returned by `compilation-next-error-locus'.
Takes one argument, a cons (ERROR . SOURCE) of two markers.
Selects a window with point at SOURCE, with another window displaying ERROR."
(switch-to-buffer (marker-buffer (cdr next-error)))
(if (and (window-dedicated-p (selected-window))
(eq (selected-window) (frame-root-window)))
(switch-to-buffer-other-frame (marker-buffer (cdr next-error)))
(switch-to-buffer (marker-buffer (cdr next-error))))
(goto-char (cdr next-error))
;; If narrowing got in the way of
;; going to the right place, widen.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment