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

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

[nongnu] elpa/geiser-guile dc8a792 257/284: Use (car (process-lines ...)


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-guile dc8a792 257/284: Use (car (process-lines ...)) instead of (shell-command ...)
Date: Sun, 1 Aug 2021 18:29:56 -0400 (EDT)

branch: elpa/geiser-guile
commit dc8a7929f4cfcffe59cbb3a83d61cf9273207112
Author: Jordan Brown <mrhmouse@gmail.com>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>

    Use (car (process-lines ...)) instead of (shell-command ...)
    
    `shell-command` assumes Bourne-shell-compatible quoting, which
    doesn't work when the user isn't using a Bourne-compatible shell.
    
    Instead of futzing about with quoting, we can just use `process-lines`
    to execute a process and pass it arguments directly.
---
 elisp/geiser-guile.el | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el
index de2e23f..dacca55 100644
--- a/elisp/geiser-guile.el
+++ b/elisp/geiser-guile.el
@@ -334,10 +334,7 @@ This function uses `geiser-guile-init-file' if it exists."
 (defconst geiser-guile-minimum-version "2.0")
 
 (defun geiser-guile--version (binary)
-  (shell-command-to-string
-   (format "%s  -c %s"
-           (shell-quote-argument binary)
-           (shell-quote-argument "(display (version))"))))
+  (car (process-lines binary "-c" "(display (version))")))
 
 (defun geiser-guile-update-warning-level ()
   "Update the warning level used by the REPL.



reply via email to

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