# HG changeset patch # User Richard M. Stallman # Date 745299908 0 # Node ID 0c4a8158f0629652c36f628b622bef6df33222a4 # Parent 5495e1a7a79c090d06b974a0b20430d5e6b98bb7 (compilation-parse-errors): Don't add multiple errors for one source line. diff -r 5495e1a7a79c -r 0c4a8158f062 lisp/progmodes/compile.el --- 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.