Skip to content

Commit 2e970db

Browse files
sergvbrotzeit
authored andcommitted
Call *rustfmt* by its proper name in user messages
1 parent 80cdc54 commit 2e970db

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

rust-rustfmt.el

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,14 @@
7575
(erase-buffer)
7676
(insert-file-contents tmpf)
7777
(rust--format-fix-rustfmt-buffer (buffer-name buf))
78-
(error "Rustfmt could not format some lines, see *rustfmt* buffer for details"))
78+
(error "Rustfmt could not format some lines, see %s buffer for details"
79+
rust-rustfmt-buffername))
7980
(t
8081
(erase-buffer)
8182
(insert-file-contents tmpf)
8283
(rust--format-fix-rustfmt-buffer (buffer-name buf))
83-
(error "Rustfmt failed, see *rustfmt* buffer for details"))))
84+
(error "Rustfmt failed, see %s buffer for details"
85+
rust-rustfmt-buffername))))
8486
(delete-file tmpf)))))
8587

8688
;; Since we run rustfmt through stdin we get <stdin> markers in the
@@ -118,7 +120,7 @@ rustfmt complain in the echo area."
118120
;; buffer it is from.
119121
(let ((rustfmt (get-buffer rust-rustfmt-buffername)))
120122
(if (not rustfmt)
121-
(message "No *rustfmt*, no problems.")
123+
(message "No %s, no problems." rust-rustfmt-buffername)
122124
(let ((target-buffer (with-current-buffer rustfmt
123125
(save-excursion
124126
(goto-char (point-min))
@@ -361,7 +363,8 @@ Return the created process."
361363
;; KLDUGE: re-run the error handlers -- otherwise message area
362364
;; would show "Wrote ..." instead of the error description.
363365
(or (rust--format-error-handler)
364-
(message "rustfmt detected problems, see *rustfmt* for more."))))))
366+
(message "rustfmt detected problems, see %s for more."
367+
rust-rustfmt-buffername))))))
365368

366369
;;; _
367370
(provide 'rust-rustfmt)

0 commit comments

Comments
 (0)