From 4fd0a65645fda5a775f939f36e2e2cdb98f54b73 Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 15 Oct 2022 02:16:01 +0100 Subject: fix: restore automatic debugger entry --- src/geiser/geiser.ss | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/geiser/geiser.ss b/src/geiser/geiser.ss index 62cd6ad..ba5d616 100644 --- a/src/geiser/geiser.ss +++ b/src/geiser/geiser.ss @@ -41,9 +41,10 @@ (lambda (k) (with-exception-handler (lambda (e) - (debug-condition e) ; save the condition for the debugger + (debug-condition e) ; save the condition for the debugger (k `((result "") (output . ,(get-output-string output-string)) + (debug #t) (error (key . condition) (msg . ,(as-string (display-condition e))))))) (lambda () @@ -106,13 +107,13 @@ (define not-found (gensym)) - (define current-environment (make-parameter environment?)) - (define (module-env env) (cond ((environment? env) env) ((list? env) (environment env)) (else #f))) + (define current-environment (make-parameter #f module-env)) + (define (try-eval sym . env) (call/cc (lambda (k) @@ -123,7 +124,7 @@ (define (geiser:eval module form) (call-with-result (lambda () - (parameterize ((current-environment (module-env module))) + (parameterize ((current-environment module)) (if (environment? (current-environment)) (eval form (current-environment)) (eval form)))))) -- cgit v1.2.3