diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-02-10 00:06:20 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-02-10 00:06:20 +0100 |
commit | 21ab330125c16075df2ed0168ee3dedf39dd43bd (patch) | |
tree | b3494747c9d333e670b4940faeef2248c610c64b | |
parent | c225b4606809739b6d408c915694841ca1aa45c0 (diff) | |
download | geiser-chez-21ab330125c16075df2ed0168ee3dedf39dd43bd.tar.gz geiser-chez-21ab330125c16075df2ed0168ee3dedf39dd43bd.tar.bz2 |
EVAL-IN: compile code in the correct module.
-rw-r--r-- | scheme/geiser/eval.scm | 11 |
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 |