Skip to content

Commit

Permalink
Switch buffers after spawning rustfmt (#58)
Browse files Browse the repository at this point in the history
This fixes a problem wherein buffer-local values for
rustic-rustfmt-args were effectively ignored
  • Loading branch information
RomanHargrave authored Oct 12, 2024
1 parent 1291904 commit 0d79e4c
Showing 1 changed file with 10 additions and 10 deletions.
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

0 comments on commit 0d79e4c

Please sign in to comment.