# HG changeset patch # User Roland McGrath # Date 717817547 0 # Node ID bbf7e139412b3636b814651d9aa18b93a276e889 # Parent bfd04f61eb167956750be36c468ca087230213ce (compilation-parse-errors): After we get enough errors to stop early, toss the last one (which is for a different file), so we don't lose the same way on the next run. diff -r bfd04f61eb16 -r bbf7e139412b lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Wed Sep 30 01:11:20 1992 +0000 +++ b/lisp/progmodes/compile.el Wed Sep 30 01:45:47 1992 +0000 @@ -918,7 +918,7 @@ (setq alist (cdr alist))) (if alist (setq alist (car alist)) - (error "Impossible regexp match!")) + (error "compilation-parse-errors: Impossible regexp match!")) ;; Extract the file name and line number from the error message. (let ((filename @@ -952,7 +952,16 @@ ;; in this buffer that might change. (not (equal (car (cdr (nth 0 compilation-error-list))) (car (cdr (nth 1 compilation-error-list))))) - (setq found-desired t))) + (progn + ;; Discard the error just parsed, so that the next + ;; parsing run can get it and the following errors in + ;; the same file all at once. If we didn't do this, we + ;; would have the same problem we are trying to avoid + ;; with the test above, just delayed until the next run! + (setq compilation-error-list (cdr compilation-error-list)) + (goto-char (match-beginning 0)) + (setq found-desired t))) + ) (t (error "compilation-parse-errors: impossible regexp match!")))