summaryrefslogtreecommitdiff
path: root/elisp/geiser-eval.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-07-02 05:29:04 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-07-02 05:29:04 +0200
commitbdd12279d05fd5451b186d2da9f1a864f1d1a0f9 (patch)
tree50474729981cd8d9f8b286879a2b15fdd245754e /elisp/geiser-eval.el
parente01166f7d2f3551596a04474a76f4811fc841edc (diff)
downloadgeiser-bdd12279d05fd5451b186d2da9f1a864f1d1a0f9.tar.gz
geiser-bdd12279d05fd5451b186d2da9f1a864f1d1a0f9.tar.bz2
Simpler, nicer, more efficient handling of evaluation results. It
comes with a pony too.
Diffstat (limited to 'elisp/geiser-eval.el')
-rw-r--r--elisp/geiser-eval.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/elisp/geiser-eval.el b/elisp/geiser-eval.el
index 90be67c..428d057 100644
--- a/elisp/geiser-eval.el
+++ b/elisp/geiser-eval.el
@@ -145,7 +145,14 @@ EVAL, COMPILE, LOAD-FILE and COMPILE-FILE should be supported."))
(defun geiser-eval--retort-result (ret)
(let ((values (cdr (assoc 'result ret))))
- (if (> (length values) 1) (cons :values values) (car values))))
+ (and (stringp (car values))
+ (ignore-errors (car (read-from-string (car values)))))))
+
+(defun geiser-eval--retort-result-str (ret)
+ (let ((values (cdr (assoc 'result ret))))
+ (if values
+ (concat "=> " (mapconcat 'identity values "\n=> "))
+ "(No value)"))))
(defsubst geiser-eval--retort-output (ret) (cdr (assoc 'output ret)))
(defsubst geiser-eval--retort-error (ret) (cdr (assoc 'error ret)))