changeset 4612:0c4a8158f062

(compilation-parse-errors): Don't add multiple errors for one source line.
author Richard M. Stallman <rms@gnu.org>
date Sat, 14 Aug 1993 03:45:08 +0000
parents 5495e1a7a79c
children eb2af4aa80e4
files lisp/progmodes/compile.el
diffstat 1 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/compile.el	Sat Aug 14 03:36:02 1993 +0000
+++ b/lisp/progmodes/compile.el	Sat Aug 14 03:45:08 1993 +0000
@@ -1077,12 +1077,16 @@
 	       ;; 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.