From e89a7d771b61197e1d0a1fb70a940218fb7652d9 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 19 May 1994 21:50:30 +0000 Subject: [PATCH] (compilation-goto-locus): Handle case where *compilation* is in a dedicated window. --- lisp/progmodes/compile.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index ca34beeb670..e9fc213c98b 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -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. -- 2.39.5