[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode 5aeae14 407/486: rust-format-diff-buffer: use st
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode 5aeae14 407/486: rust-format-diff-buffer: use start-process rather than make-process. |
Date: |
Sat, 7 Aug 2021 09:26:03 -0400 (EDT) |
branch: elpa/rust-mode
commit 5aeae14343fe325c03f097570721c76b57086856
Author: Nathan Moreau <nathan.moreau@m4x.org>
Commit: Nathan Moreau <nathan.moreau@m4x.org>
rust-format-diff-buffer: use start-process rather than make-process.
---
rust-mode.el | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/rust-mode.el b/rust-mode.el
index e71207c..210b433 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -1457,19 +1457,23 @@ This is written mainly to be used as
`end-of-defun-function' for Rust."
(min (point) max-pos)))))
(defun rust-format-diff-buffer ()
- "Show diff to current buffer from rustfmt."
+ "Show diff to current buffer from rustfmt.
+
+Return the created process."
(interactive)
(unless (executable-find rust-rustfmt-bin)
(error "Could not locate executable \%s\"" rust-rustfmt-bin))
- (make-process
- :name "rustfmt-diff"
- :command (list rust-rustfmt-bin "--check" (buffer-file-name))
- :buffer
- (with-current-buffer
- (get-buffer-create "*rustfmt-diff*")
- (erase-buffer)
- (current-buffer))
- :sentinel 'rust-format-diff-buffer-sentinel))
+ (let ((proc
+ (start-process "rustfmt-diff"
+ (with-current-buffer
+ (get-buffer-create "*rustfmt-diff*")
+ (erase-buffer)
+ (current-buffer))
+ rust-rustfmt-bin
+ "--check"
+ (buffer-file-name))))
+ (set-process-sentinel proc 'rust-format-diff-buffer-sentinel)
+ proc))
(defun rust-format-diff-buffer-sentinel (process _e)
(when (eq 'exit (process-status process))
- [nongnu] elpa/rust-mode 72f795d 378/486: Add rust-run and rust-test interactive function, (continued)
- [nongnu] elpa/rust-mode 72f795d 378/486: Add rust-run and rust-test interactive function, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode e2e713e 384/486: refer to (point-min) instead of 1, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 497d476 388/486: Reverted back to font-lock-fontify-buffer, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode d432409 391/486: Don't insert string delimiter inside strings., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 63deaf3 382/486: Remove old comment, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 55e6cd9 392/486: Add test for word boundaries for string ending with r., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode e53dc8a 394/486: Don't call syntax-ppss twice for raw strings., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode fe02536 395/486: Add `await` to list of keywords, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode c62185a 397/486: Merge pull request #304 from kurnevsky/raw-string-propertize, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 295e234 404/486: rust-compile, rust-run, rust-test: respect rust-cargo-bin. (#321), ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 5aeae14 407/486: rust-format-diff-buffer: use start-process rather than make-process.,
ELPA Syncer <=
- [nongnu] elpa/rust-mode 86b82ad 408/486: rust-format-diff-buffer-sentinel: use diff-mode and pop-to-buffer., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 836a8a9 409/486: Don't set indent-tabs-mode. (#324), ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 897af24 410/486: rust-mode.el: check for possible space between variable name and type (#325), ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 74c2647 411/486: Highlight variable name in a for-loop (#326), ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode bb9bbd2 413/486: readme: recommend setting indent-tabs-mode to nil, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6dca073 414/486: readme: make other useful packages a list, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 7960c74 417/486: Do not allow subword-match when detecting built-in formatting macros, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 5ad9b59 418/486: subword-match for built-in formatting macros: add a test., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 484d675 419/486: Adding GitHub actions., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode c5ab165 423/486: mention LSP support, ELPA Syncer, 2021/08/07