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

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

[nongnu] elpa/go-mode f1c266d 172/495: enable godef to work in coverage


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode f1c266d 172/495: enable godef to work in coverage buffers
Date: Sat, 7 Aug 2021 09:05:07 -0400 (EDT)

branch: elpa/go-mode
commit f1c266d1f4dc784aa32007c680bb5cea6aad599b
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>

    enable godef to work in coverage buffers
---
 go-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/go-mode.el b/go-mode.el
index ac1beae..f473075 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -955,12 +955,12 @@ visit FILENAME and go to line LINE and column COLUMN."
 description at POINT."
   (if (go--xemacs-p)
       (message "godef does not reliably work in XEmacs, expect bad results"))
-  (if (not buffer-file-name)
+  (if (not (buffer-file-name (go--coverage-origin-buffer)))
       (message "Cannot use godef on a buffer without a file name")
     (let ((outbuf (get-buffer-create "*godef*")))
       (with-current-buffer outbuf
         (erase-buffer))
-      (call-process-region (point-min) (point-max) "godef" nil outbuf nil "-i" 
"-t" "-f" (file-truename buffer-file-name) "-o" (number-to-string 
(go--position-bytes (point))))
+      (call-process-region (point-min) (point-max) "godef" 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")))))
 



reply via email to

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