summaryrefslogtreecommitdiff
path: root/rust-rustfmt.el
diff options
context:
space:
mode:
authorSergey Vinokurov <serg.foo@gmail.com>2021-07-10 22:19:01 +0100
committerbrotzeit <brotzeitmacher@gmail.com>2021-10-16 20:21:36 +0200
commit2e970db74fc6637840753140ad11bbfbd78dbd7d (patch)
treeaf2050eb74edaf77c8fa73f1ad2ff8306654c1ef /rust-rustfmt.el
parent80cdc5417c3f6a6faf85f0d78c6d606c9aa39cb0 (diff)
downloadrust-mode-2e970db74fc6637840753140ad11bbfbd78dbd7d.tar.gz
Call *rustfmt* by its proper name in user messages
Diffstat (limited to 'rust-rustfmt.el')
-rw-r--r--rust-rustfmt.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/rust-rustfmt.el b/rust-rustfmt.el
index 33f916d..ddab81f 100644
--- a/rust-rustfmt.el
+++ b/rust-rustfmt.el
@@ -75,12 +75,14 @@
(erase-buffer)
(insert-file-contents tmpf)
(rust--format-fix-rustfmt-buffer (buffer-name buf))
- (error "Rustfmt could not format some lines, see *rustfmt* buffer for details"))
+ (error "Rustfmt could not format some lines, see %s buffer for details"
+ rust-rustfmt-buffername))
(t
(erase-buffer)
(insert-file-contents tmpf)
(rust--format-fix-rustfmt-buffer (buffer-name buf))
- (error "Rustfmt failed, see *rustfmt* buffer for details"))))
+ (error "Rustfmt failed, see %s buffer for details"
+ rust-rustfmt-buffername))))
(delete-file tmpf)))))
;; Since we run rustfmt through stdin we get <stdin> markers in the
@@ -118,7 +120,7 @@ rustfmt complain in the echo area."
;; buffer it is from.
(let ((rustfmt (get-buffer rust-rustfmt-buffername)))
(if (not rustfmt)
- (message "No *rustfmt*, no problems.")
+ (message "No %s, no problems." rust-rustfmt-buffername)
(let ((target-buffer (with-current-buffer rustfmt
(save-excursion
(goto-char (point-min))
@@ -361,7 +363,8 @@ Return the created process."
;; KLDUGE: re-run the error handlers -- otherwise message area
;; would show "Wrote ..." instead of the error description.
(or (rust--format-error-handler)
- (message "rustfmt detected problems, see *rustfmt* for more."))))))
+ (message "rustfmt detected problems, see %s for more."
+ rust-rustfmt-buffername))))))
;;; _
(provide 'rust-rustfmt)