[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode 004575e 330/495: Don't leave godef buffer around
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode 004575e 330/495: Don't leave godef buffer around |
Date: |
Sat, 7 Aug 2021 09:05:42 -0400 (EDT) |
branch: elpa/go-mode
commit 004575eb128ab01a11b4a4d278c544f91cf752fd
Author: Yutian Li <hotpxless@gmail.com>
Commit: Dominik Honnef <dominik@honnef.co>
Don't leave godef buffer around
Closes: gh-143 [via git-merge-pr]
---
go-mode.el | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/go-mode.el b/go-mode.el
index 8acc0e1..cc6422b 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -1527,25 +1527,25 @@ description at POINT."
(error "godef does not reliably work in XEmacs, expect bad results"))
(if (not (buffer-file-name (go--coverage-origin-buffer)))
(error "Cannot use godef on a buffer without a file name")
- (let ((outbuf (get-buffer-create "*godef*"))
+ (let ((outbuf (generate-new-buffer "*godef*"))
(coding-system-for-read 'utf-8)
(coding-system-for-write 'utf-8))
- (with-current-buffer outbuf
- (erase-buffer))
- (call-process-region (point-min)
- (point-max)
- godef-command
- nil
- outbuf
- nil
- "-i"
- "-t"
- "-f"
- (file-truename (buffer-file-name
(go--coverage-origin-buffer)))
- "-o"
- (number-to-string (go--position-bytes point)))
- (with-current-buffer outbuf
- (split-string (buffer-substring-no-properties (point-min) (point-max))
"\n")))))
+ (prog2
+ (call-process-region (point-min)
+ (point-max)
+ godef-command
+ nil
+ outbuf
+ nil
+ "-i"
+ "-t"
+ "-f"
+ (file-truename (buffer-file-name
(go--coverage-origin-buffer)))
+ "-o"
+ (number-to-string (go--position-bytes point)))
+ (with-current-buffer outbuf
+ (split-string (buffer-substring-no-properties (point-min)
(point-max)) "\n"))
+ (kill-buffer outbuf)))))
(defun godef--successful-p (output)
(not (or (string= "-" output)
- [nongnu] elpa/go-mode bd2f6d2 467/495: Fix multiline func signature fontification., (continued)
- [nongnu] elpa/go-mode bd2f6d2 467/495: Fix multiline func signature fontification., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode b91a6cd 479/495: Fix composite literal key fontification, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 85a20da 482/495: Only fontify ident keys in composite literals, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 53c76cd 480/495: Speed up slow fontification after unclosed parens., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 8bfc70a 484/495: Fix accidental old style backquote comma use., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode d17d210 489/495: Improve go-fontify-variables logic., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 3497434 495/495: Fix fontification of chained map types., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 8d1594f 295/495: Automatically detect goimports, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 734d523 488/495: Move some defconsts up to fix compiler warnings., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 51f507c 315/495: Complete list of commands in mode docstring, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 004575e 330/495: Don't leave godef buffer around,
ELPA Syncer <=
- [nongnu] elpa/go-mode 409cc64 344/495: cmd/oracle: usability improvements to "describe", "referrers", ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode d9d47fa 332/495: go.tools/oracle: change -ptalog default to ""., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode bd236e5 367/495: cmd/guru: emacs: update default-directory, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 2db2ff6 333/495: go.tools/oracle: change -pos flag syntax from "file pos-pos" to file:pos-pos., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 17a7d8a 370/495: cmd/guru: emacs: add function for expandiong region, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode dbc9124 378/495: Move go-guru.el to top level, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode b949a9b 363/495: cmd/guru: emacs: add go-guru-debug variable, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 04a2946 380/495: Merge branch 'import-guru', ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 259110b 396/495: Use a named function for before-change-functions., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode d964767 399/495: Use forward-word-strictly when available, ELPA Syncer, 2021/08/07