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

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

[nongnu] elpa/geiser-chez 2fb484b 05/37: Use (car (process-lines ...)) i


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-chez 2fb484b 05/37: Use (car (process-lines ...)) instead of (shell-command ...)
Date: Sun, 1 Aug 2021 18:25:55 -0400 (EDT)

branch: elpa/geiser-chez
commit 2fb484bac916304c255580fcb9feb3b9cc771ac3
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-chez.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/elisp/geiser-chez.el b/elisp/geiser-chez.el
index 1793cfd..17b6c8d 100644
--- a/elisp/geiser-chez.el
+++ b/elisp/geiser-chez.el
@@ -96,9 +96,7 @@ This function uses `geiser-chez-init-file' if it exists."
 (defconst geiser-chez-minimum-version "9.4")
 
 (defun geiser-chez--version (binary)
-  (shell-command-to-string
-   (format "%s --version"
-           (shell-quote-argument binary))))
+  (car (process-lines binary "--version")))
 
 (defun geiser-chez--startup (remote)
   (let ((geiser-log-verbose-p t))



reply via email to

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