diff options
| author | Will Speak <lithiumflame@gmail.com> | 2017-10-03 07:35:22 +0100 |
|---|---|---|
| committer | Will Speak <lithiumflame@gmail.com> | 2017-10-03 07:35:22 +0100 |
| commit | 302b5374815688bfe743c272965f9e1783b60220 (patch) | |
| tree | 7e58b0f1478c321bda9ac66ea9d9044b120f82f2 | |
| parent | eae291ab7b3e1a52e158261d1192ea1ca2b332f4 (diff) | |
| download | rust-mode-302b5374815688bfe743c272965f9e1783b60220.tar.gz | |
Revert #216 and Add Suggestions from #226
This reverts the `setq-local` for `compile-command` and replaces it
with a function which can be used to invoke compile with `"cargo
build"` as the compile command.
| -rw-r--r-- | rust-mode.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rust-mode.el b/rust-mode.el index 4151104..8b729f9 100644 --- a/rust-mode.el +++ b/rust-mode.el @@ -1491,6 +1491,11 @@ This is written mainly to be used as `end-of-defun-function' for Rust." (interactive) (setq-local rust-format-on-save nil)) +(defun rust-compile () + "Compile using `cargo build`" + (interactive) + (compile "cargo build")) + (defvar rust-mode-map (let ((map (make-sparse-keymap))) (define-key map (kbd "C-c C-f") 'rust-format-buffer) @@ -1547,8 +1552,6 @@ This is written mainly to be used as `end-of-defun-function' for Rust." (setq-local parse-sexp-lookup-properties t) (setq-local electric-pair-inhibit-predicate 'rust-electric-pair-inhibit-predicate-wrap) - (setq-local compile-command "cargo build") - (add-hook 'before-save-hook 'rust--before-save-hook nil t) (setq-local rust-buffer-project nil) |
