summaryrefslogtreecommitdiff
path: root/elisp/geiser-mit.el
diff options
context:
space:
mode:
authorJordan Brown <mrhmouse@gmail.com>2016-09-21 10:07:21 -0400
committerJose Antonio Ortega Ruiz <jao@gnu.org>2016-09-30 06:06:25 +0200
commitcec661b7d0e6d0eda31a97b5621d361ae5c71de3 (patch)
tree7554f931913461b24c41abc969d4b391f8e31a31 /elisp/geiser-mit.el
parentf8ddc4e540ec9c193efde588e6bb8cb887212820 (diff)
downloadgeiser-guile-cec661b7d0e6d0eda31a97b5621d361ae5c71de3.tar.gz
geiser-guile-cec661b7d0e6d0eda31a97b5621d361ae5c71de3.tar.bz2
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.
Diffstat (limited to 'elisp/geiser-mit.el')
-rw-r--r--elisp/geiser-mit.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/elisp/geiser-mit.el b/elisp/geiser-mit.el
index 5e61cf1..fffcfb6 100644
--- a/elisp/geiser-mit.el
+++ b/elisp/geiser-mit.el
@@ -120,10 +120,12 @@ This function uses `geiser-mit-init-file' if it exists."
(defconst geiser-mit-minimum-version "9.1.1")
(defun geiser-mit--version (binary)
- (shell-command-to-string
- (format "%s --quiet --no-init-file --eval %s"
- (shell-quote-argument binary)
- "'(begin (display (get-subsystem-version-string \"Release\")) (%exit 0))'")))
+ (car (process-lines binary
+ "--quiet"
+ "--no-init-file"
+ "--eval"
+ "(begin (display (get-subsystem-version-string \"Release\"))
+ (%exit 0))")))
(defconst geiser-mit--path-rx "^In \\([^:\n ]+\\):\n")
(defun geiser-mit--startup (remote)