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

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

[nongnu] elpa/go-mode 7077c4f 375/495: cmd/guru: fix quoting bug in Emac


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 7077c4f 375/495: cmd/guru: fix quoting bug in Emacs binding
Date: Sat, 7 Aug 2021 09:05:51 -0400 (EDT)

branch: elpa/go-mode
commit 7077c4f7eaba3c2209aa192ebddcb3f167e7329e
Author: Alan Donovan <adonovan@google.com>
Commit: Dominik Honnef <dominik@honnef.co>

    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 <dominik@honnef.co>
    Reviewed-by: Alan Donovan <adonovan@google.com>
---
 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

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