aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/compile.el
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2001-10-12 17:43:05 +0000
committerStefan Monnier <[email protected]>2001-10-12 17:43:05 +0000
commit8f36a284bc2552ba32bccfa9597194b253eece96 (patch)
tree899a1bdc07668ff2164943daba20c71f9d8815d4 /lisp/progmodes/compile.el
parente5700b527e860accf4a3199144fe53cb0e5011d8 (diff)
(compile-mouse-goto-error, compile-goto-error):
Consider the text between two errors as belonging to the first error. (compilation-goto-locus): Use pop-to-buffer rather than switch-to-buffer-other-frame.
Diffstat (limited to 'lisp/progmodes/compile.el')
-rw-r--r--lisp/progmodes/compile.el17
1 files changed, 12 insertions, 5 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index b972adea76..da4d398ec2 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1415,7 +1415,13 @@ at the end of the line."
;; failed to find the relevant file. See
;; compilation-next-error-locus.
(or (null (marker-buffer (caar compilation-error-list)))
- (> (point) (caar compilation-error-list))))
+ (and (> (point) (caar compilation-error-list))
+ (cdr compilation-error-list)
+ ;; Don't skip too far: the text between two errors
+ ;; belongs to the first. Especially since this
+ ;; in-between text might be other errors on the same
+ ;; line (see compilation-skip-to-next-location).
+ (>= (point) (caadr compilation-error-list)))))
(setq compilation-error-list (cdr compilation-error-list)))
(or compilation-error-list
(error "No error to go to")))
@@ -1446,7 +1452,9 @@ other kinds of prefix arguments are ignored."
;; failed to find the relevant file. See
;; compilation-next-error-locus.
(or (null (marker-buffer (caar compilation-error-list)))
- (> (point) (caar compilation-error-list))))
+ (and (> (point) (caar compilation-error-list))
+ (cdr compilation-error-list)
+ (>= (point) (caadr compilation-error-list)))))
(setq compilation-error-list (cdr compilation-error-list)))
(push-mark)
@@ -1701,9 +1709,8 @@ Selects a window with point at SOURCE, with another window displaying ERROR."
;; display the source in another window.
(let ((pop-up-windows t))
(pop-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)))
+ (if (window-dedicated-p (selected-window))
+ (pop-to-buffer (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