# HG changeset patch # User Richard M. Stallman # Date 769384230 0 # Node ID 4d808a6268a38d37242cf7904b3ff0e9721d0b74 # Parent 8a0a7fb9f7d4b3029288d65c0fd09d17d98e728e (compilation-goto-locus): Handle case where *compilation* is in a dedicated window. diff -r 8a0a7fb9f7d4 -r 4d808a6268a3 lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Thu May 19 21:48:59 1994 +0000 +++ b/lisp/progmodes/compile.el Thu May 19 21:50:30 1994 +0000 @@ -955,7 +955,10 @@ "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.