summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-10 00:06:20 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-10 00:06:20 +0100
commit21ab330125c16075df2ed0168ee3dedf39dd43bd (patch)
treeb3494747c9d333e670b4940faeef2248c610c64b
parentc225b4606809739b6d408c915694841ca1aa45c0 (diff)
downloadgeiser-guile-21ab330125c16075df2ed0168ee3dedf39dd43bd.tar.gz
geiser-guile-21ab330125c16075df2ed0168ee3dedf39dd43bd.tar.bz2
EVAL-IN: compile code in the correct module.
-rw-r--r--scheme/geiser/eval.scm11
1 files changed, 7 insertions, 4 deletions
diff --git a/scheme/geiser/eval.scm b/scheme/geiser/eval.scm
index e6fa0cf..b7c5eef 100644
--- a/scheme/geiser/eval.scm
+++ b/scheme/geiser/eval.scm
@@ -40,8 +40,13 @@ SUBR, MSG and REST."
(catch #t
(lambda ()
(let* ((result #f)
- (output (with-output-to-string
- (lambda () (set! result (compile form module))))))
+ (output
+ (with-output-to-string
+ (lambda ()
+ (save-module-excursion
+ (lambda ()
+ (set-current-module module)
+ (set! result (compile form))))))))
(list (cons 'result result) (cons 'output output))))
(lambda (key . args)
(list (cons 'error (apply parse-error (cons key args))))))))
@@ -57,6 +62,4 @@ SUBR, MSG and REST."
(cons 'msg (if msg (apply format (cons #f (cons msg margs))) '()))
(cons 'rest (or rest '())))))
-(define (test-geiser) 4)
-
;;; eval.scm ends here