emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/flymake-refactor 14db516 22/52: flymake-ui.el chec


From: João Távora
Subject: [Emacs-diffs] scratch/flymake-refactor 14db516 22/52: flymake-ui.el checks file names before considering diagnostics
Date: Sun, 1 Oct 2017 12:40:46 -0400 (EDT)

branch: scratch/flymake-refactor
commit 14db516f5597e60fb579825afa4a4cee64daf8be
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    flymake-ui.el 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-ui.el (flymake-report): Check
    matching file names.
---
 lisp/progmodes/flymake-ui.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lisp/progmodes/flymake-ui.el b/lisp/progmodes/flymake-ui.el
index 9968c33..4422fb0 100644
--- a/lisp/progmodes/flymake-ui.el
+++ b/lisp/progmodes/flymake-ui.el
@@ -422,6 +422,14 @@ with flymake-specific meaning can also be used.
   (save-restriction
     (widen)
     (flymake-delete-own-overlays)
+    (setq diagnostics
+          (cl-remove-if-not
+           (lambda (diag)
+             (let ((ff (flymake--diag-full-file diag)))
+               (and ff
+                    (equal (expand-file-name ff)
+                           (expand-file-name (buffer-file-name))))))
+           diagnostics))
     (mapc #'flymake--fix-line-numbers diagnostics)
     (mapc #'flymake--highlight-line diagnostics)
     (let ((err-count (cl-count-if #'flymake--diag-errorp diagnostics))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]