branch: elpa/go-mode
commit 7077c4f7eaba3c2209aa192ebddcb3f167e7329e
Author: Alan Donovan <[email protected]>
Commit: Dominik Honnef <[email protected]>

    cmd/guru: fix quoting bug in Emacs binding
    
    combine-and-quote-strings is buggy.  The value of this expression:
     (split-string-and-unquote (combine-and-quote-strings '("a" "" "b")))
    is ("a" "b").  Consequently, if go-guru-scope is "", the following
    "-tags" flag is interpreted as the scope.
    
    Change-Id: I2955ffa2b95914e01d44b52690e810f816076d5c
    Reviewed-on: https://go-review.googlesource.com/24746
    Reviewed-by: Dominik Honnef <[email protected]>
    Reviewed-by: Alan Donovan <[email protected]>
---
 guru_import/cmd/guru/go-guru.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guru_import/cmd/guru/go-guru.el b/guru_import/cmd/guru/go-guru.el
index 88caf67..2f1a5b5 100644
--- a/guru_import/cmd/guru/go-guru.el
+++ b/guru_import/cmd/guru/go-guru.el
@@ -229,7 +229,7 @@ variant of `compilation-mode'."
   (or buffer-file-name
       (error "Cannot use guru on a buffer without a file name"))
   (let* ((filename (file-truename buffer-file-name))
-        (cmd (combine-and-quote-strings (go-guru--command mode filename)))
+        (cmd (mapconcat #'shell-quote-argument (go-guru--command mode 
filename) " "))
         (process-connection-type nil) ; use pipe (not pty) so EOF closes stdin
         (procbuf (compilation-start cmd 'go-guru-output-mode)))
     (with-current-buffer procbuf

Reply via email to