aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-08-14 03:45:08 +0000
committerRichard M. Stallman1993-08-14 03:45:08 +0000
commitba2700dbbee127141f9c42ae70287d58ab071269 (patch)
treebcbf9ed5ae31133b4426dfae12be4abcf4eb1e22
parent1d7158ce480f6f9de86870905bf45a5a633f5502 (diff)
downloademacs-ba2700dbbee127141f9c42ae70287d58ab071269.tar.gz
emacs-ba2700dbbee127141f9c42ae70287d58ab071269.zip
(compilation-parse-errors): Don't add multiple errors for one source line.
-rw-r--r--lisp/progmodes/compile.el16
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 592eb7b0c13..752d278033c 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1077,12 +1077,16 @@ See variable `compilation-parse-errors-function' for the interface it uses."
1077 ;; location, and the file and line number of the error. 1077 ;; location, and the file and line number of the error.
1078 (save-excursion 1078 (save-excursion
1079 (beginning-of-line 1) 1079 (beginning-of-line 1)
1080 (setq compilation-error-list 1080 (let ((this (cons (point-marker)
1081 (cons (cons (point-marker) 1081 (cons filename linenum))))
1082 (cons filename linenum)) 1082 ;; Don't add the same source line more than once.
1083 compilation-error-list))) 1083 (if (equal (cdr this) (cdr (car compilation-error-list)))
1084 (setq compilation-num-errors-found 1084 nil
1085 (1+ compilation-num-errors-found)) 1085 (setq compilation-error-list
1086 (cons this
1087 compilation-error-list))
1088 (setq compilation-num-errors-found
1089 (1+ compilation-num-errors-found)))))
1086 (and find-at-least (>= compilation-num-errors-found 1090 (and find-at-least (>= compilation-num-errors-found
1087 find-at-least) 1091 find-at-least)
1088 ;; We have found as many new errors as the user wants. 1092 ;; We have found as many new errors as the user wants.