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

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

[nongnu] elpa/geiser-chicken 26b1f56 059/102: Use (car (process-lines ..


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-chicken 26b1f56 059/102: Use (car (process-lines ...)) instead of (shell-command ...)
Date: Sun, 1 Aug 2021 18:26:55 -0400 (EDT)

branch: elpa/geiser-chicken
commit 26b1f560f7d462992f0ef82dfa6935bc71baebcf
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-chicken.el | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/elisp/geiser-chicken.el b/elisp/geiser-chicken.el
index 8c10908..60567b7 100644
--- a/elisp/geiser-chicken.el
+++ b/elisp/geiser-chicken.el
@@ -263,10 +263,7 @@ This function uses `geiser-chicken-init-file' if it 
exists."
 (defconst geiser-chicken-minimum-version "4.8.0.0")
 
 (defun geiser-chicken--version (binary)
-  (shell-command-to-string
-   (format "%s -e %s"
-           (shell-quote-argument binary)
-           (shell-quote-argument "(display (chicken-version))"))))
+  (car (process-lines binary "-e" "(display (chicken-version))")))
 
 (defun connect-to-chicken ()
   "Start a Chicken REPL connected to a remote process."



reply via email to

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