[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode b1bb0e0 111/495: replace shell-command-on-region w
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode b1bb0e0 111/495: replace shell-command-on-region with call-process-region |
Date: |
Sat, 7 Aug 2021 09:04:54 -0400 (EDT) |
branch: elpa/go-mode
commit b1bb0e04cca9a8c5a1cce4e0d326680e853eaae8
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>
replace shell-command-on-region with call-process-region
shell-command-on-region sometimes prints process output in the echo
area. We do not want this.
---
go-mode.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/go-mode.el b/go-mode.el
index 983bf9b..e4ecc88 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -423,9 +423,13 @@ recommended that you look at goflymake
(erase-buffer))
(write-region nil nil tmpfile)
- (if (zerop (shell-command (concat "gofmt -w " (shell-quote-argument
tmpfile)) nil errbuf))
+
+ ;; We're using errbuf for the mixed stdout and stderr output. This
+ ;; is not an issue because gofmt -w does not produce any stdout
+ ;; output in case of success.
+ (if (zerop (call-process "gofmt" nil errbuf nil "-w" tmpfile))
(progn
- (if (zerop (shell-command-on-region (point-min) (point-max) (concat
"diff -n - " (shell-quote-argument tmpfile)) patchbuf))
+ (if (zerop (call-process-region (point-min) (point-max) "diff" nil
patchbuf nil "-n" "-" tmpfile))
(message "Buffer is already gofmted")
(go--apply-rcs-patch patchbuf)
(kill-buffer errbuf)
- [nongnu] elpa/go-mode b5960fe 099/495: nicer messages in gofmt, (continued)
- [nongnu] elpa/go-mode b5960fe 099/495: nicer messages in gofmt, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 939d630 100/495: style fixes, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 47b3928 102/495: disable read-only on error buffer before trying to write to it, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode c94ca2e 064/495: refactor, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 6b77ff1 065/495: allow disabling fontification for function/method calls, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 02d44df 067/495: add function for downloading playgrounds into emacs, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode ec6fef4 066/495: Define a customization group for go-mode, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 856eff3 105/495: Instead of relying on gofmt's -d flag, use diff -n directly. This, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode d5839a0 106/495: use kill-whole-line directly, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode e1bb58a 109/495: Update README because go-mode.el is now upstream, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode b1bb0e0 111/495: replace shell-command-on-region with call-process-region,
ELPA Syncer <=
- [nongnu] elpa/go-mode 9f1f94e 113/495: use own implementation of go--string-prefix-p because it has been added in Emacs 24 and people are still using Emacs 23, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 22192f7 121/495: use featurep instead of version string to check for xemacs, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 3b0efdd 132/495: docstrings, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 7ab928a 146/495: Add support for methods that have no name for the receiver, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 83de700 145/495: Enable compilation-mode for gofmt error buffer before displaying it, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 59f1cb5 140/495: add elisp header, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode c693232 137/495: mention flymake-go as an alternative to goflymake, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode ba95288 071/495: load diff-mode on package load, not when running gofmt, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode bfbbb7e 072/495: remove debug output, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode e0de87c 075/495: do not indent labels in column 0 but in normal indentation minus one, ELPA Syncer, 2021/08/07