From: Richard M. Stallman Date: Sat, 10 Nov 2001 23:19:54 +0000 (+0000) Subject: (compile-goto-error): Fix previous change in the case where subsequent X-Git-Tag: ttn-vms-21-2-B4~18683 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2827a3c1bf2f17c4a0a4949973a1a19fd79a52b1;p=emacs.git (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. --- 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)