diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-03-15 15:55:46 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-03-15 15:55:46 +0100 |
commit | d7642ed7d0e3184921835644d8dde0b1b50e1e6f (patch) | |
tree | c73334a3faf2d7c1e21dbcf7467b0a93c919b287 | |
parent | 660fc8e0465e48812fc6f38f82d91d22b0664118 (diff) | |
download | geiser-chez-d7642ed7d0e3184921835644d8dde0b1b50e1e6f.tar.gz geiser-chez-d7642ed7d0e3184921835644d8dde0b1b50e1e6f.tar.bz2 |
Multiple values as evaluation result supported.
-rw-r--r-- | elisp/geiser-eval.el | 6 | ||||
-rw-r--r-- | scheme/guile/geiser/evaluation.scm | 2 |
2 files changed, 7 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))) diff --git a/scheme/guile/geiser/evaluation.scm b/scheme/guile/geiser/evaluation.scm index 1f3afc0..37f4171 100644 --- a/scheme/guile/geiser/evaluation.scm +++ b/scheme/guile/geiser/evaluation.scm @@ -95,6 +95,8 @@ (let ((module (or (and (list? module-name) (resolve-module module-name)) (current-module))) + (evaluator (lambda (f m) + (call-with-values (lambda () (evaluator f m)) list))) (result #f) (captured-stack #f) (error #f)) |