Commit ba2700db authored by Richard M. Stallman's avatar Richard M. Stallman

(compilation-parse-errors): Don't add multiple errors for one source line.

parent 1d7158ce
......@@ -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.
(beginning-of-line 1)
(setq compilation-error-list
(cons (cons (point-marker)
(cons filename linenum))
(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)))
(setq compilation-error-list
(cons this
(setq compilation-num-errors-found
(1+ compilation-num-errors-found)))))
(and find-at-least (>= compilation-num-errors-found
;; We have found as many new errors as the user wants.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment