diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-05-03 01:49:40 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-05-03 01:49:40 +0200 |
commit | 8d4246f0b5cf3cfbe3a0cc3a9526d370ea9c26e1 (patch) | |
tree | 5e86ac4c5e526becabc818dd6d2919a472adf501 /scheme/plt/geiser/eval.ss | |
parent | 533e4133307e9931838a2b6a50eb4c9474b81973 (diff) | |
download | geiser-guile-8d4246f0b5cf3cfbe3a0cc3a9526d370ea9c26e1.tar.gz geiser-guile-8d4246f0b5cf3cfbe3a0cc3a9526d370ea9c26e1.tar.bz2 |
PLT: handling correctly multiple values in evaluations.
Diffstat (limited to 'scheme/plt/geiser/eval.ss')
-rw-r--r-- | scheme/plt/geiser/eval.ss | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scheme/plt/geiser/eval.ss b/scheme/plt/geiser/eval.ss index 2345e14..090b517 100644 --- a/scheme/plt/geiser/eval.ss +++ b/scheme/plt/geiser/eval.ss @@ -91,13 +91,16 @@ (set! last-result `((error (key . ,(exn-key e)) (subr) (msg . ,(exn-message e)))))) -(define (set-last-result v) - (set! last-result `((result ,v)))) + +(define (set-last-result v . vs) + (set! last-result `((result ,v ,@vs)))) (define (eval-in form spec) (set-last-result (void)) (with-handlers ((exn? set-last-error)) - (set-last-result (eval form (ensure-namespace spec)))) + (call-with-values + (lambda () (eval form (ensure-namespace spec))) + set-last-result)) last-result) (define compile-in eval-in) |