diff options
| author | João Távora | 2017-09-21 14:45:21 +0100 |
|---|---|---|
| committer | João Távora | 2017-10-03 13:52:24 +0100 |
| commit | 491cc4a1bd68c2f651027982e3dfb7545d3e57ab (patch) | |
| tree | e8407061bae5e37a3b04823d9d59f66d976a40c5 | |
| parent | 8c85ab027eefb352a39d68433f64bfaa1c446856 (diff) | |
| download | emacs-491cc4a1bd68c2f651027982e3dfb7545d3e57ab.tar.gz emacs-491cc4a1bd68c2f651027982e3dfb7545d3e57ab.zip | |
Flymake checks file names before considering diagnostics
The error patterns for gcc picked up errors for the Makefile itself,
for example. These shouldn't count as actual errors.
* lisp/progmodes/flymake.el (flymake-report): Check
matching file names.
| -rw-r--r-- | lisp/progmodes/flymake.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index f9aa098071b..827bce4b634 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el | |||
| @@ -451,6 +451,14 @@ return DEFAULT." | |||
| 451 | (save-restriction | 451 | (save-restriction |
| 452 | (widen) | 452 | (widen) |
| 453 | (flymake-delete-own-overlays) | 453 | (flymake-delete-own-overlays) |
| 454 | (setq diagnostics | ||
| 455 | (cl-remove-if-not | ||
| 456 | (lambda (diag) | ||
| 457 | (let ((ff (flymake--diag-full-file diag))) | ||
| 458 | (and ff | ||
| 459 | (equal (expand-file-name ff) | ||
| 460 | (expand-file-name (buffer-file-name)))))) | ||
| 461 | diagnostics)) | ||
| 454 | (mapc #'flymake--fix-line-numbers diagnostics) | 462 | (mapc #'flymake--fix-line-numbers diagnostics) |
| 455 | (mapc #'flymake--highlight-line diagnostics) | 463 | (mapc #'flymake--highlight-line diagnostics) |
| 456 | (let ((err-count (cl-count-if #'flymake--diag-errorp diagnostics)) | 464 | (let ((err-count (cl-count-if #'flymake--diag-errorp diagnostics)) |