20
20
:group 'rustic-cargo )
21
21
22
22
(defcustom rustic-cargo-check-exec-command " check"
23
- " Execute command to run cargo check."
23
+ " Execute command to run ` cargo check' ."
24
24
:type 'string
25
25
:group 'rustic-cargo )
26
26
27
27
(defcustom rustic-cargo-test-exec-command " test"
28
- " Execute command to run cargo test."
28
+ " Execute command to run ` cargo test' ."
29
29
:type 'string
30
30
:group 'rustic-cargo )
31
31
32
32
(defcustom rustic-cargo-nextest-exec-command " nextest run"
33
- " Execute command to run nextest."
33
+ " Execute command to run ` nextest' ."
34
34
:type 'string
35
35
:group 'rustic-cargo )
36
36
37
37
(defcustom rustic-cargo-run-exec-command " run"
38
- " Execute command to run cargo run."
38
+ " Execute command to run ` cargo run' ."
39
39
:type 'string
40
40
:group 'rustic-cargo )
41
41
42
42
(defcustom rustic-cargo-build-exec-command " build"
43
- " Execute command to run cargo build."
43
+ " Execute command to run ` cargo build' ."
44
44
:type 'string
45
45
:group 'rustic-cargo )
46
46
@@ -95,7 +95,7 @@ If nil then the project is simply created."
95
95
:group 'rustic-cargo )
96
96
97
97
(defcustom rustic-cargo-test-disable-warnings nil
98
- " Don't show warnings when running ' cargo test'."
98
+ " Don't show warnings when running ` cargo test'."
99
99
:type 'boolean
100
100
:group 'rustic-cargo )
101
101
@@ -112,29 +112,29 @@ instead of applying the default arguments from `rustic-default-test-arguments'."
112
112
:group 'rustic-cargo )
113
113
114
114
(defcustom rustic-default-test-arguments " --benches --tests --all-features"
115
- " Default arguments when running ' cargo test'."
115
+ " Default arguments when running ` cargo test'."
116
116
:type 'string
117
117
:group 'rustic-cargo )
118
118
119
119
(defcustom rustic-cargo-default-install-arguments '(" --path" " ." " --locked" )
120
- " Default arguments when running ' cargo install'."
120
+ " Default arguments when running ` cargo install'."
121
121
:type '(list string)
122
122
:group 'rustic-cargo )
123
123
124
124
(defcustom rustic-cargo-check-arguments " --benches --tests --all-features"
125
- " Default arguments when running ' cargo check'."
125
+ " Default arguments when running ` cargo check'."
126
126
:type 'string
127
127
:group 'rustic-cargo )
128
128
129
129
(defcustom rustic-cargo-build-arguments " "
130
- " Default arguments when running ' cargo build'."
130
+ " Default arguments when running ` cargo build'."
131
131
:type 'string
132
132
:group 'rustic-cargo )
133
133
134
134
(defcustom rustic-cargo-auto-add-missing-dependencies nil
135
135
" Automatically adds dependencies to Cargo.toml.
136
- This way rustic checks new diagnostics for ' unresolved import'
137
- errors and passes the crates to ' cargo add'.
136
+ This way rustic checks new diagnostics for ` unresolved import'
137
+ errors and passes the crates to ` cargo add'.
138
138
Currently only working with lsp-mode."
139
139
:type 'boolean
140
140
:group 'rustic-cargo )
@@ -166,12 +166,12 @@ Currently only working with lsp-mode."
166
166
" Buffer name for test buffers." )
167
167
168
168
(defvar rustic-test-arguments " "
169
- " Holds arguments for ' cargo test', similar to `compilation-arguments`.
169
+ " Holds arguments for ` cargo test', similar to `compilation-arguments`.
170
170
Tests that are executed by `rustic-cargo-current-test' will also be
171
171
stored in this variable." )
172
172
173
173
(defvar rustic-test-history nil
174
- " Holds previous arguments for ' cargo test', similar to `compile-arguments`." )
174
+ " Holds previous arguments for ` cargo test', similar to `compile-arguments`." )
175
175
176
176
(defvar rustic-cargo-test-mode-map
177
177
(let ((map (make-sparse-keymap )))
@@ -203,7 +203,7 @@ If ARG is not nil, get input from minibuffer."
203
203
(rustic-compilation c (list :buffer buf :process proc :mode mode))))
204
204
205
205
(defun rustic-cargo-nextest-current-test ()
206
- " Run ' cargo nextest run' for the test near point."
206
+ " Run ` cargo nextest run' for the test near point."
207
207
(interactive )
208
208
(rustic-compilation-process-live)
209
209
(-if-let (test-to-run (setq rustic-test-arguments
@@ -215,7 +215,7 @@ If ARG is not nil, get input from minibuffer."
215
215
216
216
;;;### autoload
217
217
(defun rustic-cargo-test-run (&optional test-args )
218
- " Start compilation process for ' cargo test' with optional TEST-ARGS."
218
+ " Start compilation process for ` cargo test' with optional TEST-ARGS."
219
219
(interactive )
220
220
(rustic-compilation-process-live)
221
221
(let* ((command (list (rustic-cargo-bin) rustic-cargo-test-exec-command))
@@ -227,7 +227,7 @@ If ARG is not nil, get input from minibuffer."
227
227
228
228
;;;### autoload
229
229
(defun rustic-cargo-test (&optional arg )
230
- " Run ' cargo test'.
230
+ " Run ` cargo test'.
231
231
232
232
If ARG is not nil, use value as argument and store it in
233
233
`rustic-test-arguments' . When calling this function from
@@ -253,7 +253,7 @@ If ARG is not nil, use value as argument and store it in
253
253
254
254
;;;### autoload
255
255
(defun rustic-cargo-test-rerun (arg )
256
- " Run ' cargo test' with `rustic-test-arguments' ."
256
+ " Run ` cargo test' with `rustic-test-arguments' ."
257
257
(interactive " P" )
258
258
(let ((default-directory (or rustic-compilation-directory default-directory)))
259
259
(setq rustic-test-arguments
@@ -284,7 +284,7 @@ If ARG is not nil, use value as argument and store it in
284
284
285
285
;;;### autoload
286
286
(defun rustic-cargo-current-test ()
287
- " Run ' cargo test' for the test near point."
287
+ " Run ` cargo test' for the test near point."
288
288
(interactive )
289
289
(rustic-compilation-process-live)
290
290
(-if-let (test-to-run (setq rustic-test-arguments
@@ -390,7 +390,7 @@ If ARG is not nil, use value as argument and store it in
390
390
391
391
;;;### autoload
392
392
(defun rustic-cargo-outdated (&optional path )
393
- " Use ' cargo outdated' to list outdated packages in `tabulated-list-mode' .
393
+ " Use ` cargo outdated' to list outdated packages in `tabulated-list-mode' .
394
394
Execute process in PATH."
395
395
(interactive )
396
396
(rustic--inheritenv
@@ -627,7 +627,7 @@ exist, and the rest. Return a cons cell of the two parts."
627
627
(cons existing-dir (apply 'file-name-concat (cons " " components)))))
628
628
629
629
(defun rustic-create-project (project-path is-new &optional bin )
630
- " Run either ' cargo new' if IS-NEW is non-nil, or ' cargo init' otherwise.
630
+ " Run either ` cargo new' if IS-NEW is non-nil, or ` cargo init' otherwise.
631
631
Creates or initializes the directory at the path specified by PROJECT-PATH. If
632
632
BIN is not nil, create a binary application, otherwise a library."
633
633
(let* ((cmd (if is-new " new" " init" ))
@@ -655,14 +655,14 @@ BIN is not nil, create a binary application, otherwise a library."
655
655
656
656
;;;### autoload
657
657
(defun rustic-cargo-new (project-path &optional bin )
658
- " Run ' cargo new' to start a new package in the path specified by PROJECT-PATH.
658
+ " Run ` cargo new' to start a new package in the path specified by PROJECT-PATH.
659
659
If BIN is not nil, create a binary application, otherwise a library."
660
660
(interactive " GProject path: " )
661
661
(rustic-create-project project-path t bin))
662
662
663
663
;;;### autoload
664
664
(defun rustic-cargo-init (project-path &optional bin )
665
- " Run ' cargo init' to initialize a directory in the path specified by PROJECT-PATH.
665
+ " Run ` cargo init' to initialize a directory in the path specified by PROJECT-PATH.
666
666
If BIN is not nil, create a binary application, otherwise a library."
667
667
(interactive " DProject path: " )
668
668
(rustic-create-project project-path nil bin))
@@ -676,10 +676,10 @@ If BIN is not nil, create a binary application, otherwise a library."
676
676
" Buffer name for run buffers." )
677
677
678
678
(defvar rustic-run-arguments " "
679
- " Holds arguments for ' cargo run', similar to `compilation-arguments`." )
679
+ " Holds arguments for ` cargo run', similar to `compilation-arguments`." )
680
680
681
681
(defvar rustic-run-history nil
682
- " Holds previous arguments for ' cargo run', similar to `compile-history`." )
682
+ " Holds previous arguments for ` cargo run', similar to `compile-history`." )
683
683
684
684
(defvar rustic-cargo-run-mode-map
685
685
(let ((map (make-sparse-keymap )))
@@ -692,7 +692,7 @@ If BIN is not nil, create a binary application, otherwise a library."
692
692
693
693
;;;### autoload
694
694
(defun rustic-cargo-run-command (&optional run-args )
695
- " Start compilation process for ' cargo run' with optional RUN-ARGS."
695
+ " Start compilation process for ` cargo run' with optional RUN-ARGS."
696
696
(interactive )
697
697
(rustic-compilation-process-live)
698
698
(let* ((command (list (rustic-cargo-bin) rustic-cargo-run-exec-command))
@@ -704,7 +704,7 @@ If BIN is not nil, create a binary application, otherwise a library."
704
704
705
705
;;;### autoload
706
706
(defun rustic-cargo-run (&optional arg )
707
- " Run ' cargo run'.
707
+ " Run ` cargo run'.
708
708
709
709
If ARG is not nil, use value as argument and store it in `rustic-run-arguments' .
710
710
When calling this function from `rustic-popup-mode' , always use the value of
@@ -722,7 +722,7 @@ When calling this function from `rustic-popup-mode', always use the value of
722
722
723
723
;;;### autoload
724
724
(defun rustic-cargo-run-rerun (arg )
725
- " Run ' cargo run' with `rustic-run-arguments' ."
725
+ " Run ` cargo run' with `rustic-run-arguments' ."
726
726
(interactive " P" )
727
727
(let ((default-directory (or rustic-compilation-directory default-directory)))
728
728
(setq rustic-run-arguments
@@ -733,13 +733,13 @@ When calling this function from `rustic-popup-mode', always use the value of
733
733
(rustic-cargo-run-command rustic-run-arguments)))
734
734
735
735
(defun rustic--get-run-arguments ()
736
- " Helper utility for getting arguments related to ' examples' directory."
736
+ " Helper utility for getting arguments related to ` examples' directory."
737
737
(let ((example-name (rustic-cargo-run-get-relative-example-name)))
738
738
(when example-name
739
739
(concat " --example " example-name))))
740
740
741
741
(defun rustic-cargo-run-get-relative-example-name ()
742
- " Run ' cargo run --example' if current buffer within a ' examples' directory."
742
+ " Run ` cargo run --example' if current buffer within a ` examples' directory."
743
743
(let* ((buffer-project-root (rustic-buffer-crate))
744
744
(current-filename (if buffer-file-name
745
745
buffer-file-name
@@ -777,7 +777,7 @@ in your project like `pwd'"
777
777
778
778
;;;### autoload
779
779
(defun rustic-cargo-build (&optional arg )
780
- " Run ' cargo build' for the current project, allow configuring
780
+ " Run ` cargo build' for the current project, allow configuring
781
781
`rustic-cargo-build-arguments' when prefix argument (C-u) is enabled."
782
782
(interactive " P" )
783
783
(when arg
@@ -789,11 +789,11 @@ in your project like `pwd'"
789
789
(list :clippy-fix t )))
790
790
791
791
(defvar rustic-clean-arguments nil
792
- " Holds arguments for ' cargo clean', similar to `compilation-arguments`." )
792
+ " Holds arguments for ` cargo clean', similar to `compilation-arguments`." )
793
793
794
794
;;;### autoload
795
795
(defun rustic-cargo-clean (&optional arg )
796
- " Run ' cargo clean' for the current project.
796
+ " Run ` cargo clean' for the current project.
797
797
798
798
If ARG is not nil, use value as argument and store it in `rustic-clean-arguments' .
799
799
When calling this function from `rustic-popup-mode' , always use the value of
@@ -812,7 +812,7 @@ When calling this function from `rustic-popup-mode', always use the value of
812
812
813
813
;;;### autoload
814
814
(defun rustic-cargo-check (&optional arg )
815
- " Run ' cargo check' for the current project, allow configuring
815
+ " Run ` cargo check' for the current project, allow configuring
816
816
`rustic-cargo-check-arguments' when prefix argument (C-u) is enabled."
817
817
(interactive " P" )
818
818
(when arg
@@ -824,7 +824,7 @@ When calling this function from `rustic-popup-mode', always use the value of
824
824
825
825
;;;### autoload
826
826
(defun rustic-cargo-bench ()
827
- " Run ' cargo bench' for the current project."
827
+ " Run ` cargo bench' for the current project."
828
828
(interactive )
829
829
(rustic-run-cargo-command (list (rustic-cargo-bin) " bench" )))
830
830
@@ -850,11 +850,11 @@ The documentation is built if necessary."
850
850
; ;; cargo edit
851
851
852
852
(defvar rustic-cargo-dependencies " *cargo-add-dependencies*"
853
- " Buffer that is used for adding missing dependencies with ' cargo add'." )
853
+ " Buffer that is used for adding missing dependencies with ` cargo add'." )
854
854
855
855
;;;### autoload
856
856
(defun rustic-cargo-add (&optional arg )
857
- " Add crate to Cargo.toml using ' cargo add'.
857
+ " Add crate to Cargo.toml using ` cargo add'.
858
858
If running with prefix command `C-u' , read whole command from minibuffer."
859
859
(interactive " P" )
860
860
(let* ((base (concat (rustic-cargo-bin) " add " ))
@@ -955,7 +955,7 @@ as string."
955
955
956
956
;;;### autoload
957
957
(defun rustic-cargo-rm (&optional arg )
958
- " Remove crate from Cargo.toml using ' cargo rm'.
958
+ " Remove crate from Cargo.toml using ` cargo rm'.
959
959
If running with prefix command `C-u' , read whole command from minibuffer."
960
960
(interactive " P" )
961
961
(let* ((command (if arg
@@ -967,7 +967,7 @@ If running with prefix command `C-u', read whole command from minibuffer."
967
967
968
968
;;;### autoload
969
969
(defun rustic-cargo-upgrade (&optional arg )
970
- " Upgrade dependencies as specified in the local manifest file using ' cargo upgrade'.
970
+ " Upgrade dependencies as specified in the local manifest file using ` cargo upgrade'.
971
971
If running with prefix command `C-u' , read whole command from minibuffer."
972
972
(interactive " P" )
973
973
(let* ((command (if arg
@@ -1009,7 +1009,7 @@ command from minibuffer."
1009
1009
" Buffer name for install buffers." )
1010
1010
1011
1011
(defvar rustic-install-arguments " "
1012
- " Holds arguments for ' cargo install', similar to `compilation-arguments`.
1012
+ " Holds arguments for ` cargo install', similar to `compilation-arguments`.
1013
1013
Installs that are executed by `rustic-cargo-current-install' will also be
1014
1014
stored in this variable." )
1015
1015
@@ -1028,7 +1028,7 @@ stored in this variable.")
1028
1028
1029
1029
;;;### autoload
1030
1030
(defun rustic-cargo-install-rerun ()
1031
- " Run ' cargo install' with `rustic-install-arguments' ."
1031
+ " Run ` cargo install' with `rustic-install-arguments' ."
1032
1032
(interactive )
1033
1033
(rustic-compilation-start rustic-install-arguments
1034
1034
(list :buffer rustic-install-buffer-name
@@ -1037,7 +1037,7 @@ stored in this variable.")
1037
1037
:directory rustic-install-project-dir)))
1038
1038
;;;### autoload
1039
1039
(defun rustic-cargo-install (&optional arg )
1040
- " Install rust binary using ' cargo install'.
1040
+ " Install rust binary using ` cargo install'.
1041
1041
If running with prefix command `C-u' , read whole command from minibuffer."
1042
1042
(interactive " P" )
1043
1043
(let* ((command (if arg
0 commit comments