summaryrefslogtreecommitdiff
path: root/rust-mode.el
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2017-10-13 05:58:59 -0400
committerGitHub <noreply@github.com>2017-10-13 05:58:59 -0400
commitb8e49089713714a9f3f815b399df569a0e507e73 (patch)
tree7e58b0f1478c321bda9ac66ea9d9044b120f82f2 /rust-mode.el
parenteae291ab7b3e1a52e158261d1192ea1ca2b332f4 (diff)
parent302b5374815688bfe743c272965f9e1783b60220 (diff)
downloadrust-mode-b8e49089713714a9f3f815b399df569a0e507e73.tar.gz
Merge pull request #243 from iwillspeak/rust-compile-command
Revert #216 and Add Suggestions from #226
Diffstat (limited to 'rust-mode.el')
-rw-r--r--rust-mode.el7
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)