aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2021-02-22 10:56:18 -0500
committerBrian Cully <bjc@kublai.com>2021-02-25 08:41:28 -0500
commitc5b12f62aa415a1183c399c7a842d90cf82841dd (patch)
tree8b8eb64ad11a0661cf2d1eefbc3c0904b9c2e1f1
parentc735494681f71bb0b64cae865b554cd056045f62 (diff)
downloadflymake-rust-c5b12f62aa415a1183c399c7a842d90cf82841dd.tar.gz
flymake-rust-c5b12f62aa415a1183c399c7a842d90cf82841dd.zip
Allow the rustc checker to run between saves.
-rw-r--r--flymake-rust.el5
1 files changed, 4 insertions, 1 deletions
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