From: Matt Birkholz Date: Tue, 4 Feb 2014 22:13:09 +0000 (-0700) Subject: Fluidize (runtime user-interface) internal *notification-level*. X-Git-Tag: mit-scheme-pucked-9.2.12~401^2~15 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=83d7b3755bf8ac6ae7481bb6daa46db08c14217c;p=mit-scheme.git Fluidize (runtime user-interface) internal *notification-level*. --- 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