branch: elpa/rust-mode commit 2e970db74fc6637840753140ad11bbfbd78dbd7d Author: Sergey Vinokurov <serg....@gmail.com> Commit: brotzeit <brotzeitmac...@gmail.com>
Call *rustfmt* by its proper name in user messages --- rust-rustfmt.el | 11 +++++++---- 1 file 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)