From 83d7b3755bf8ac6ae7481bb6daa46db08c14217c Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Tue, 4 Feb 2014 15:13:09 -0700 Subject: [PATCH] Fluidize (runtime user-interface) internal *notification-level*. --- src/runtime/usrint.scm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/runtime/usrint.scm b/src/runtime/usrint.scm index fb54ce2f6..e81b5ad0c 100644 --- a/src/runtime/usrint.scm +++ b/src/runtime/usrint.scm @@ -421,9 +421,9 @@ USA. unspecific)) (lambda () (let ((v - (fluid-let ((*notification-depth* - (+ *notification-depth* 1))) - (thunk)))) + (let-fluid *notification-depth* + (1+ (fluid *notification-depth*)) + thunk))) (set! done? #t) v)) (lambda () @@ -484,21 +484,22 @@ USA. (define (write-notification-prefix port) (write-string ";" port) - (do ((i 0 (+ i 1))) - ((not (< i *notification-depth*))) - (write-string indentation-atom port))) + (let ((depth (fluid *notification-depth*))) + (do ((i 0 (+ i 1))) + ((not (< i depth))) + (write-string indentation-atom port)))) (define (notification-prefix-length) (+ 1 (* (string-length indentation-atom) - *notification-depth*))) + (fluid *notification-depth*)))) (define *notification-depth*) (define indentation-atom) (define wrapped-notification-port-type) (define (initialize-package!) - (set! *notification-depth* 0) + (set! *notification-depth* (make-fluid 0)) (set! indentation-atom " ") (set! wrapped-notification-port-type (make-wrapped-notification-port-type)) unspecific) \ No newline at end of file -- 2.25.1