comparison lisp/progmodes/compile.el @ 7567:4d808a6268a3

(compilation-goto-locus): Handle case where *compilation* is in a dedicated window.
author Richard M. Stallman <rms@gnu.org>
date Thu, 19 May 1994 21:50:30 +0000
parents cbe3820953c6
children 2032401dcc86
comparison
equal deleted inserted replaced
7566:8a0a7fb9f7d4 7567:4d808a6268a3
953 953
954 (defun compilation-goto-locus (next-error) 954 (defun compilation-goto-locus (next-error)
955 "Jump to an error locus returned by `compilation-next-error-locus'. 955 "Jump to an error locus returned by `compilation-next-error-locus'.
956 Takes one argument, a cons (ERROR . SOURCE) of two markers. 956 Takes one argument, a cons (ERROR . SOURCE) of two markers.
957 Selects a window with point at SOURCE, with another window displaying ERROR." 957 Selects a window with point at SOURCE, with another window displaying ERROR."
958 (switch-to-buffer (marker-buffer (cdr next-error))) 958 (if (and (window-dedicated-p (selected-window))
959 (eq (selected-window) (frame-root-window)))
960 (switch-to-buffer-other-frame (marker-buffer (cdr next-error)))
961 (switch-to-buffer (marker-buffer (cdr next-error))))
959 (goto-char (cdr next-error)) 962 (goto-char (cdr next-error))
960 ;; If narrowing got in the way of 963 ;; If narrowing got in the way of
961 ;; going to the right place, widen. 964 ;; going to the right place, widen.
962 (or (= (point) (marker-position (cdr next-error))) 965 (or (= (point) (marker-position (cdr next-error)))
963 (progn 966 (progn