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
commit710d0cec8854a4e89f4948d49e614f286913f711 (patch)
tree7e15b14bc96863698c2a10f15098984872113911 /elisp/geiser-eval.el
parentba38e61e768a5e2b6ccdebc09262e3186a8cf15b (diff)
downloadgeiser-guile-710d0cec8854a4e89f4948d49e614f286913f711.tar.gz
geiser-guile-710d0cec8854a4e89f4948d49e614f286913f711.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)))