]> git.eshelyaron.com Git - emacs.git/commitdiff
(compilation-parse-errors): Don't add multiple errors for one source line.
authorRichard M. Stallman <rms@gnu.org>
Sat, 14 Aug 1993 03:45:08 +0000 (03:45 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 14 Aug 1993 03:45:08 +0000 (03:45 +0000)
lisp/progmodes/compile.el

index 592eb7b0c13036b3127bbc10583f5c6ca70d86ee..752d278033ce369dd5e63873c4d8169c14a96a8a 100644 (file)
@@ -1077,12 +1077,16 @@ See variable `compilation-parse-errors-function' for the interface it uses."
               ;; location, and the file and line number of the error.
               (save-excursion
                 (beginning-of-line 1)
-                (setq compilation-error-list
-                      (cons (cons (point-marker)
-                                  (cons filename linenum))
-                            compilation-error-list)))
-              (setq compilation-num-errors-found
-                    (1+ compilation-num-errors-found))
+                (let ((this (cons (point-marker)
+                                  (cons filename linenum))))
+                  ;; Don't add the same source line more than once.
+                  (if (equal (cdr this) (cdr (car compilation-error-list)))
+                      nil
+                    (setq compilation-error-list
+                          (cons this
+                                compilation-error-list))
+                    (setq compilation-num-errors-found
+                          (1+ compilation-num-errors-found)))))
               (and find-at-least (>= compilation-num-errors-found
                                      find-at-least)
                    ;; We have found as many new errors as the user wants.