summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorMario Domenech Goulart <mario@parenteses.org>2019-01-17 21:37:31 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2019-02-07 03:23:23 +0000
commit4050ee010f1117051936f274d6dff6ca0a4dc5db (patch)
tree457244bca817f7928eb0a82487aa2b9880e76923 /elisp
parent0ffb4fca07384a9b6667908a5a4787dfafd1d259 (diff)
downloadgeiser-guile-4050ee010f1117051936f274d6dff6ca0a4dc5db.tar.gz
geiser-guile-4050ee010f1117051936f274d6dff6ca0a4dc5db.tar.bz2
geiser-chicken.el: Use a more stable API to get CHICKEN's version
Avoid parsing csi's help message to get CHICKEN's version. Use a more stable API to get it (`chicken-version'). As a beneficial side-effect, get rid of `seq-filter', which is not available in Emacs 24. Should fix https://gitlab.com/jaor/geiser/issues/262
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-chicken.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/elisp/geiser-chicken.el b/elisp/geiser-chicken.el
index 1ace770..b436d92 100644
--- a/elisp/geiser-chicken.el
+++ b/elisp/geiser-chicken.el
@@ -258,10 +258,14 @@ This function uses `geiser-chicken-init-file' if it exists."
(defconst geiser-chicken-minimum-version "4.8.0.0")
(defun geiser-chicken--version (binary)
- (cadar
- (seq-filter #'(lambda (l) (string-equal "Version" (car l)))
- (mapcar #'split-string
- (process-lines binary "-version")))))
+ (shell-command-to-string
+ (format "%s -e '(display \
+ (or (handle-exceptions exn \
+ #f \
+ (eval `(begin (import chicken.platform) \
+ (chicken-version)))) \
+ (chicken-version)))'"
+ binary)))
(defun connect-to-chicken ()
"Start a Chicken REPL connected to a remote process."