summaryrefslogtreecommitdiff
path: root/elisp/geiser-eval.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-15 15:55:46 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-15 15:55:46 +0100
commit3a20baccd8b01a3eb72254e209a4c168a05de8a7 (patch)
treeb7beb632d837630ddcc8f480a19c42b135cf0d9b /elisp/geiser-eval.el
parente8398a8ad9ba267bbe28f2ba13914bcd1dbc150e (diff)
downloadgeiser-3a20baccd8b01a3eb72254e209a4c168a05de8a7.tar.gz
geiser-3a20baccd8b01a3eb72254e209a4c168a05de8a7.tar.bz2
Multiple values as evaluation result supported.
Diffstat (limited to 'elisp/geiser-eval.el')
-rw-r--r--elisp/geiser-eval.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/elisp/geiser-eval.el b/elisp/geiser-eval.el
index 8574cdc..847a198 100644
--- a/elisp/geiser-eval.el
+++ b/elisp/geiser-eval.el
@@ -142,7 +142,11 @@ EVAL, COMPILE, LOAD-FILE and COMPILE-FILE should be supported."))
(defsubst geiser-eval--retort-p (ret)
(and (listp ret) (or (assoc 'error ret) (assoc 'result ret))))
-(defsubst geiser-eval--retort-result (ret) (cdr (assoc 'result ret)))
+
+(defun geiser-eval--retort-result (ret)
+ (let ((values (cdr (assoc 'result ret))))
+ (if (> (length values) 1) (cons :values values) (car values))))
+
(defsubst geiser-eval--retort-output (ret) (cdr (assoc 'output ret)))
(defsubst geiser-eval--retort-error (ret) (cdr (assoc 'error ret)))
(defsubst geiser-eval--retort-stack (ret) (cdr (assoc 'stack ret)))