]> git.eshelyaron.com Git - emacs.git/commitdiff
(compilation-goto-locus): Handle case where *compilation*
authorRichard M. Stallman <rms@gnu.org>
Thu, 19 May 1994 21:50:30 +0000 (21:50 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 19 May 1994 21:50:30 +0000 (21:50 +0000)
is in a dedicated window.

lisp/progmodes/compile.el

index ca34beeb670202b26bbd55ed068f06712974244b..e9fc213c98b813c3e73d94ac7e712efe552fad3b 100644 (file)
@@ -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.