diff options
author | David Thompson <dthompson@member.fsf.org> | 2013-09-02 17:14:31 -0400 |
---|---|---|
committer | David Thompson <dthompson@member.fsf.org> | 2013-09-02 17:14:31 -0400 |
commit | 582b6be470dd10a80fd8a4a31bce3d92e4b509f2 (patch) | |
tree | 55378008fa9b0acc69118adbc00c0ddfa41cfa60 /2d/game-loop.scm | |
parent | 5e36a594d66c0f5208c97fa1a8e142c0014d172d (diff) |
Pass along the *repl-stack* fluid so that nested REPLs work right.
Diffstat (limited to '2d/game-loop.scm')
-rw-r--r-- | 2d/game-loop.scm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/2d/game-loop.scm b/2d/game-loop.scm index 844ddb5..af4966f 100644 --- a/2d/game-loop.scm +++ b/2d/game-loop.scm @@ -172,14 +172,17 @@ is the unused accumulator time." (define (time-left current-time next-time) (max (floor (- next-time current-time)) 0)) -(define (run-repl-thunk thunk input output error) +(define (run-repl-thunk thunk input output error stack) (put-mvar repl-output-mvar (with-input-from-port input (lambda () (with-output-to-port output (lambda () - (with-error-to-port error thunk))))))) + (with-error-to-port error + (lambda () + (with-fluids ((*repl-stack* stack)) + (thunk)))))))))) (define (run-repl) "Execute a thunk from the REPL is there is one." |