summaryrefslogtreecommitdiff
path: root/rust-rustfmt.el
diff options
context:
space:
mode:
Diffstat (limited to 'rust-rustfmt.el')
-rw-r--r--rust-rustfmt.el10
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)