From 935de07402608eebc9ce63fe04f64e90cc53debd Mon Sep 17 00:00:00 2001 From: Stefan Israelsson Tampe Date: Wed, 13 Mar 2019 18:45:39 +0100 Subject: remove define in expression context --- modules/language/python/spec.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/language/python/spec.scm b/modules/language/python/spec.scm index 4b05cbf..8f39e0c 100644 --- a/modules/language/python/spec.scm +++ b/modules/language/python/spec.scm @@ -21,10 +21,11 @@ (define dolog #f) (define (pr . x) (when dolog - (define port (open-file "log.txt" "a")) - (with-output-to-port port - (lambda () - (pretty-print x) (car (reverse x)))) + (let () + (define port (open-file "log.txt" "a")) + (with-output-to-port port + (lambda () + (pretty-print x) (car (reverse x))))) (close port)) (car (reverse x))) -- cgit v1.2.3