diff options
| author | Roland McGrath | 1992-09-30 01:45:47 +0000 |
|---|---|---|
| committer | Roland McGrath | 1992-09-30 01:45:47 +0000 |
| commit | 41acdfa97af4c90bc06395f9a7dcaae419b711fc (patch) | |
| tree | 6c9d3218d0198ab6d6d9e22ee7287f78918ed620 | |
| parent | 7855e674d72674171da39af1f4206f091e5d15c8 (diff) | |
| download | emacs-41acdfa97af4c90bc06395f9a7dcaae419b711fc.tar.gz emacs-41acdfa97af4c90bc06395f9a7dcaae419b711fc.zip | |
(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.
| -rw-r--r-- | lisp/progmodes/compile.el | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 39b62179b7d..42585599699 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -918,7 +918,7 @@ See variable `compilation-parse-errors-function' for the interface it uses." | |||
| 918 | (setq alist (cdr alist))) | 918 | (setq alist (cdr alist))) |
| 919 | (if alist | 919 | (if alist |
| 920 | (setq alist (car alist)) | 920 | (setq alist (car alist)) |
| 921 | (error "Impossible regexp match!")) | 921 | (error "compilation-parse-errors: Impossible regexp match!")) |
| 922 | 922 | ||
| 923 | ;; Extract the file name and line number from the error message. | 923 | ;; Extract the file name and line number from the error message. |
| 924 | (let ((filename | 924 | (let ((filename |
| @@ -952,7 +952,16 @@ See variable `compilation-parse-errors-function' for the interface it uses." | |||
| 952 | ;; in this buffer that might change. | 952 | ;; in this buffer that might change. |
| 953 | (not (equal (car (cdr (nth 0 compilation-error-list))) | 953 | (not (equal (car (cdr (nth 0 compilation-error-list))) |
| 954 | (car (cdr (nth 1 compilation-error-list))))) | 954 | (car (cdr (nth 1 compilation-error-list))))) |
| 955 | (setq found-desired t))) | 955 | (progn |
| 956 | ;; Discard the error just parsed, so that the next | ||
| 957 | ;; parsing run can get it and the following errors in | ||
| 958 | ;; the same file all at once. If we didn't do this, we | ||
| 959 | ;; would have the same problem we are trying to avoid | ||
| 960 | ;; with the test above, just delayed until the next run! | ||
| 961 | (setq compilation-error-list (cdr compilation-error-list)) | ||
| 962 | (goto-char (match-beginning 0)) | ||
| 963 | (setq found-desired t))) | ||
| 964 | ) | ||
| 956 | (t | 965 | (t |
| 957 | (error "compilation-parse-errors: impossible regexp match!"))) | 966 | (error "compilation-parse-errors: impossible regexp match!"))) |
| 958 | 967 | ||