summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-09-23 18:03:52 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-09-23 18:03:52 +0200
commited48236fe7c336924ff4694275555649e9b269b5 (patch)
tree033c3c46a4ec36f4185834d65a861e6812ad653b
parent46d6d573013661b3266ca3d0bd77b8a26a738eef (diff)
downloadgeiser-guile-ed48236fe7c336924ff4694275555649e9b269b5.tar.gz
geiser-guile-ed48236fe7c336924ff4694275555649e9b269b5.tar.bz2
Guile: bug fix: evaluation works again (1.9.3 or better required).
-rw-r--r--README6
-rw-r--r--scheme/guile/geiser/evaluation.scm22
2 files changed, 10 insertions, 18 deletions
diff --git a/README b/README
index 8870006..5378c33 100644
--- a/README
+++ b/README
@@ -20,10 +20,10 @@
evaluation/compilation error in an Emacs' compilation-mode
buffer).
- Currently supported implementations are Guile and PLT.
+* Supported scheme implementations
- - Guile 1.9.x virtual machine required.
- - PLT Scheme 4.1.5.5 or better required.
+ - Guile 1.9.3 or better.
+ - PLT Scheme 4.1.5.5 or better.
* Installation
Geiser can be used either directly from its uninstalled source tree
diff --git a/scheme/guile/geiser/evaluation.scm b/scheme/guile/geiser/evaluation.scm
index 642c185..3e44834 100644
--- a/scheme/guile/geiser/evaluation.scm
+++ b/scheme/guile/geiser/evaluation.scm
@@ -38,29 +38,21 @@
(current-module)))
(result #f)
(captured-stack #f)
- (error #f)
+ (err #f)
(ev (lambda ()
- (save-module-excursion
- (lambda ()
- (set-current-module module)
- (set! result (call-with-values
- (lambda () (compile form))
- (lambda vs
- (map (lambda (v)
- (with-output-to-string
- (lambda () (write v))))
- vs)))))))))
+ (set! result (call-with-values
+ (lambda () (compile form #:env module))
+ (lambda vs (map object->string vs)))))))
(let ((output
(with-output-to-string
(lambda ()
(catch #t
(lambda () (start-stack 'geiser-eval (ev)))
(lambda args
- (set! error #t)
- (apply handle-error captured-stack args))
+ (set! err (apply handle-error captured-stack args)))
(lambda args
- (set! captured-stack (make-stack #t 2 15))))))))
- (write `(,(if error result (cons 'result result))
+ (set! captured-stack (make-stack #t 2 7))))))))
+ (write `(,(or err (cons 'result result))
(output . ,output)))
(newline))))