emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/rust-mode 302b537 344/486: Revert #216 and Add Suggestions


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode 302b537 344/486: Revert #216 and Add Suggestions from #226
Date: Sat, 7 Aug 2021 09:25:49 -0400 (EDT)

branch: elpa/rust-mode
commit 302b5374815688bfe743c272965f9e1783b60220
Author: Will Speak <lithiumflame@gmail.com>
Commit: Will Speak <lithiumflame@gmail.com>

    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.
---
 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]