diff options
author | John Turner <jturner.usa@gmail.com> | 2022-10-07 03:10:21 -0400 |
---|---|---|
committer | John Turner <jturner.usa@gmail.com> | 2022-10-07 03:10:21 -0400 |
commit | 6fac8a28da9bf30da71941340505c2316d0db5a3 (patch) | |
tree | f7d840005abe0195e093fa0db6f1e44ecba0ba8d /init/flycheck/init-flycheck-cargo-has-command-p-fix.el | |
parent | ceaa741cfb13938aa359f33f926ccdcb2689f303 (diff) | |
download | emacs.d-6fac8a28da9bf30da71941340505c2316d0db5a3.tar.gz |
changed the config-* prefix to init-* for all of the init files
Diffstat (limited to 'init/flycheck/init-flycheck-cargo-has-command-p-fix.el')
-rw-r--r-- | init/flycheck/init-flycheck-cargo-has-command-p-fix.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/init/flycheck/init-flycheck-cargo-has-command-p-fix.el b/init/flycheck/init-flycheck-cargo-has-command-p-fix.el new file mode 100644 index 0000000..48d53d6 --- /dev/null +++ b/init/flycheck/init-flycheck-cargo-has-command-p-fix.el @@ -0,0 +1,7 @@ +(defun init-flycheck-rust-cargo-has-command-p (command) + (let* ((commands (process-lines "cargo" "--list")) + (trimmed (-map (lambda (row) (-slice row 4 (string-search " " 4))) commands))) + (seq-contains-p (-rest trimmed) command))) + +(advice-add 'flycheck-rust-cargo-has-command-p + :override 'init-flycheck-rust-cargo-has-command-p) |