diff options
| author | brotzeit <brotzeitmacher@gmail.com> | 2022-08-18 15:17:11 +0200 |
|---|---|---|
| committer | brotzeit <brotzeitmacher@gmail.com> | 2022-08-18 15:24:58 +0200 |
| commit | d01b3827552098872ad17395e713788ab4cfbc2e (patch) | |
| tree | c2070af99dac62f339f958409373d69347921f9d /rust-rustfmt.el | |
| parent | da747ed4523b947e7e367ca244bda0363c3cecc6 (diff) | |
| download | rust-mode-d01b3827552098872ad17395e713788ab4cfbc2e.tar.gz | |
apply minor fixes
Diffstat (limited to 'rust-rustfmt.el')
| -rw-r--r-- | rust-rustfmt.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/rust-rustfmt.el b/rust-rustfmt.el index 025ec32..bb88647 100644 --- a/rust-rustfmt.el +++ b/rust-rustfmt.el @@ -47,7 +47,7 @@ (erase-buffer) (insert-buffer-substring buf) (let* ((tmpf (make-temp-file "rustfmt")) - (ret (apply 'call-process-region + (ret (apply #'call-process-region (point-min) (point-max) rust-rustfmt-bin @@ -152,7 +152,7 @@ rustfmt complain in the echo area." (defconst rust--format-word "\ \\b\\(else\\|enum\\|fn\\|for\\|if\\|let\\|loop\\|\ match\\|struct\\|union\\|unsafe\\|while\\)\\b") -(defconst rust--format-line "\\([\n]\\)") +(defconst rust--format-line "\\(\n\\)") ;; Counts number of matches of regex beginning up to max-beginning, ;; leaving the point at the beginning of the last match. @@ -239,7 +239,7 @@ match\\|struct\\|union\\|unsafe\\|while\\)\\b") Return the created process." (interactive) (unless (executable-find rust-rustfmt-bin) - (error "Could not locate executable \%s\"" rust-rustfmt-bin)) + (error "Could not locate executable %S" rust-rustfmt-bin)) (let* ((buffer (with-current-buffer (get-buffer-create "*rustfmt-diff*") @@ -247,14 +247,14 @@ Return the created process." (erase-buffer)) (current-buffer))) (proc - (apply 'start-process + (apply #'start-process "rustfmt-diff" buffer rust-rustfmt-bin "--check" (cons (buffer-file-name) rust-rustfmt-switches)))) - (set-process-sentinel proc 'rust-format-diff-buffer-sentinel) + (set-process-sentinel proc #'rust-format-diff-buffer-sentinel) proc)) (defun rust-format-diff-buffer-sentinel (process _e) |
