emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/go-mode 5bd8efa: godoc-gogetdoc works with modules


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 5bd8efa: godoc-gogetdoc works with modules
Date: Sat, 13 Nov 2021 02:57:45 -0500 (EST)

branch: elpa/go-mode
commit 5bd8efab64352dccf31dbc99c4fc96d3b985ef27
Author: Simon Law <slaw@quantcast.com>
Commit: Dominik Honnef <dominik@honnef.co>

    godoc-gogetdoc works with modules
    
    godoc-gogetdoc now works with modules outside GOPATH by creating a
    temporary buffer using with-temp-buffer, which preserves
    default-directory.
---
 go-mode.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/go-mode.el b/go-mode.el
index 72cb8ae..21d01ff 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -298,9 +298,7 @@ You can install gogetdoc with 'go get -u 
github.com/zmb3/gogetdoc'."
       (error "Cannot use gogetdoc on a buffer without a file name"))
   (let ((posn (format "%s:#%d" (file-truename buffer-file-name) (1- 
(position-bytes point))))
         (out (godoc--get-buffer "<at point>")))
-  (with-current-buffer (get-buffer-create "*go-gogetdoc-input*")
-    (setq buffer-read-only nil)
-    (erase-buffer)
+  (with-temp-buffer
     (go--insert-modified-files)
     (call-process-region (point-min) (point-max) "gogetdoc" nil out nil
                          "-modified"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]