Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to the rustfmt error buffer after spawning the rustfmt process #58

Merged
merged 1 commit into from
Oct 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions rustic-rustfmt.el
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,16 @@ and it's `cdr' is a list of arguments."
(--each files
(unless (file-exists-p it)
(error (format "File %s does not exist." it))))
(with-current-buffer err-buf
(let* ((c `(,rustfmt
,@(split-string rustic-rustfmt-args)
,@command "--" ,@files))
(proc (rustic-make-process :name rustic-format-process-name
:buffer err-buf
:command (remove "" c)
:filter #'rustic-compilation-filter
:sentinel sentinel
:file-handler t)))
(let* ((c `(,rustfmt
,@(split-string rustic-rustfmt-args)
,@command "--" ,@files))
(proc (rustic-make-process :name rustic-format-process-name
:buffer err-buf
:command (remove "" c)
:filter #'rustic-compilation-filter
:sentinel sentinel
:file-handler t)))
(with-current-buffer err-buf
(setq next-error-last-buffer buffer)
(when string
(process-put proc 'command-buf cur-buf)
Expand Down