]> git.eshelyaron.com Git - emacs.git/commitdiff
(compile-goto-error): Fix previous change in the case where subsequent
authorRichard M. Stallman <rms@gnu.org>
Sat, 10 Nov 2001 23:19:54 +0000 (23:19 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 10 Nov 2001 23:19:54 +0000 (23:19 +0000)
errors have not been parsed yet because they are in a different source file.

lisp/ChangeLog
lisp/progmodes/compile.el

index 88ed85b2af7b6d5558293a6dc3f110a34520d5db..68aaedb38823b949e662ea1693607a46e4570ef4 100644 (file)
@@ -1,3 +1,9 @@
+2001-11-10  Richard M. Stallman  <rms@gnu.org>
+
+       * 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  <kleiweg@let.rug.nl>
 
        * progmodes/ps-mode.el (ps-mode-font-lock-keywords-1): Merge
index 34dc39370ca84e6bd89a0b1a039db7d105b195e6..2ab31cb764e4cf80f4e89abc3e277780c57d30b7 100644 (file)
@@ -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)