From 2827a3c1bf2f17c4a0a4949973a1a19fd79a52b1 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 10 Nov 2001 23:19:54 +0000 Subject: [PATCH] (compile-goto-error): Fix previous change in the case where subsequent errors have not been parsed yet because they are in a different source file. --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/compile.el | 26 ++++++++++++++++++-------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 88ed85b2af7..68aaedb3882 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2001-11-10 Richard M. Stallman + + * progmodes/compile.el (compile-goto-error): Fix previous change + in the case where subsequent errors have not been parsed yet + because they are in a different source file. + 2001-11-10 Peter Kleiweg * progmodes/ps-mode.el (ps-mode-font-lock-keywords-1): Merge diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 34dc39370ca..2ab31cb764e 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1425,12 +1425,15 @@ at the end of the line." ;; compilation-next-error-locus. (or (null (marker-buffer (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) (caar (cdr compilation-error-list)))))) + (>= (point) + ;; Don't skip too far: the text between + ;; two errors belongs to the first. This + ;; in-between text might be other errors + ;; on the same line (see + ;; compilation-skip-to-next-location). + (if (null (cdr compilation-error-list)) + compilation-parsing-end + (caar (cdr compilation-error-list))))))) (setq compilation-error-list (cdr compilation-error-list))) (or compilation-error-list (error "No error to go to"))) @@ -1462,8 +1465,15 @@ other kinds of prefix arguments are ignored." ;; compilation-next-error-locus. (or (null (marker-buffer (caar compilation-error-list))) (and (> (point) (caar compilation-error-list)) - (cdr compilation-error-list) - (>= (point) (caar (cdr compilation-error-list)))))) + (>= (point) + ;; Don't skip too far: the text between + ;; two errors belongs to the first. This + ;; in-between text might be other errors + ;; on the same line (see + ;; compilation-skip-to-next-location). + (if (null (cdr compilation-error-list)) + compilation-parsing-end + (caar (cdr compilation-error-list))))))) (setq compilation-error-list (cdr compilation-error-list))) (push-mark) -- 2.39.5