branch: elpa/go-mode
commit f6b13983e3160449180b4c65c6aa078a784a7710
Author: Ingo Lohmar <[email protected]>
Commit: Peter Sanford <[email protected]>

    Fix filename handling in godoc-gogetdoc
    
    We don't need to shell-quote the filename since we are not invoking a
    shell but are calling the subprocess directly. Any files with spaces
    in their name would not be found by gogetdoc prior to this change.
    
    This makes it work on Windows as well.
    
    Closes: #235 [via git-merge-pr]
---
 go-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/go-mode.el b/go-mode.el
index f1b467d..78a0cd4 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -285,7 +285,7 @@ You can install gogetdoc with 'go get -u 
github.com/zmb3/gogetdoc'."
       ;; TODO: gogetdoc supports unsaved files, but not introducing
       ;; new artifical files, so this limitation will stay for now.
       (error "Cannot use gogetdoc on a buffer without a file name"))
-  (let ((posn (format "%s:#%d" (shell-quote-argument (file-truename 
buffer-file-name)) (1- (position-bytes point))))
+  (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)

Reply via email to