From c5b12f62aa415a1183c399c7a842d90cf82841dd Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Mon, 22 Feb 2021 10:56:18 -0500 Subject: Allow the rustc checker to run between saves. --- flymake-rust.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'flymake-rust.el') diff --git a/flymake-rust.el b/flymake-rust.el index 9bbb0e3..bc160f6 100644 --- a/flymake-rust.el +++ b/flymake-rust.el @@ -271,8 +271,11 @@ node ‘(flymake)Backend functions’." For the value of ‘ARGS’, see the documentation for ‘flymake-diagnostic-functions’." + ;; It seems like ‘:recent-changes’ is set when a temporary buffer + ;; change happens between saves, but is nil on file save (or initial + ;; check). (let ((rc (plist-member args :recent-changes))) - (when (or (not rc) (cadr rc)) + (when (or (not rc) (and (eq flymake-rust-checker 'rustc) (cadr rc))) (flymake-rust--call (current-buffer) report-fn)))) ;;;###autoload -- cgit v1.2.3