summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/flymake.el8
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."
(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))