branch: elpa/rust-mode
commit b8e49089713714a9f3f815b399df569a0e507e73
Merge: eae291a 302b537
Author: Niko Matsakis <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #243 from iwillspeak/rust-compile-command
Revert #216 and Add Suggestions from #226
---
rust-mode.el | 7 +++++--
1 file 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)