From 21ab330125c16075df2ed0168ee3dedf39dd43bd Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Tue, 10 Feb 2009 00:06:20 +0100 Subject: EVAL-IN: compile code in the correct module. --- scheme/geiser/eval.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'scheme/geiser') 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 -- cgit v1.2.3