changeset 40902:95bf86aa6120

(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.
author Richard M. Stallman <rms@gnu.org>
date Sat, 10 Nov 2001 23:19:43 +0000
parents f2a856e8a39c
children b84721a8fb60
files lisp/progmodes/compile.el
diffstat 1 files changed, 18 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/compile.el	Sat Nov 10 19:36:51 2001 +0000
+++ b/lisp/progmodes/compile.el	Sat Nov 10 23:19:43 2001 +0000
@@ -1425,12 +1425,15 @@
 		;; 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 @@
 	      ;; 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)