diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-07-02 05:29:04 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-07-02 05:29:04 +0200 |
commit | bdd12279d05fd5451b186d2da9f1a864f1d1a0f9 (patch) | |
tree | 50474729981cd8d9f8b286879a2b15fdd245754e /elisp/geiser-eval.el | |
parent | e01166f7d2f3551596a04474a76f4811fc841edc (diff) | |
download | geiser-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.el | 9 |
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))) |