bkyk8rc3zvpnsf5inmcqq4n3k98cv6hj-my-site-hyper-literate-git.test.suzanne.soy-0.0.1

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit b69db24297714573422b0d7debe6ca2bb3160600
parent a5a410fb4715fa2b1999bf6e33e9fdc431ebd10a
Author: Eli Barzilay <eli@racket-lang.org>
Date:   Fri, 18 Sep 2009 05:56:41 +0000

add with-writer-change (all of this is still uncertain and undocumented)

svn: r16061

original commit: 182f89d5806f7c1f648a3a85ff2b589b93cb2212

Diffstat:
Mcollects/scribble/text/output.ss | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/collects/scribble/text/output.ss b/collects/scribble/text/output.ss @@ -153,6 +153,13 @@ (set! write (or (car c) write-string)) (for-each loop (cdr c)) (set! write old))] + [(with-writer-change) + ;; the function gets the old writer and return a new one + ;; (useful to sabe the current writer then restore it inside) + (let ([old write]) + (set! write ((car c) write)) + (for-each loop (cdr c)) + (set! write old))] [else (error 'output "unknown special value flag: ~e" (special-flag x))]))] [else @@ -202,6 +209,7 @@ (define/provide-special (add-prefix pfx)) (define/provide-special (set-prefix pfx)) (define/provide-special (with-writer writer)) +(define/provide-special (with-writer-change writer)) (define make-spaces ; (efficiently) (let ([t (make-hasheq)] [v (make-vector 80 #f)])