.
original commit: a960218c82b34ccee328b476b5e8a14b3c86b3d9
This commit is contained in:
parent
33cbedcae3
commit
a0965a7db8
|
@ -7,32 +7,6 @@
|
|||
(provide set-interactive-display-handler
|
||||
set-interactive-write-handler
|
||||
set-interactive-print-handler)
|
||||
|
||||
(define pp-parameters
|
||||
(parameterize ([pretty-print-columns 'infinity]
|
||||
[pretty-print-size-hook
|
||||
(λ (value display? port)
|
||||
(cond
|
||||
[(is-a? value snip%) 1]
|
||||
;[(use-number-snip? value) 1]
|
||||
[(syntax? value) 1]
|
||||
[else #f]))]
|
||||
[pretty-print-print-hook
|
||||
(λ (value display? port)
|
||||
(cond
|
||||
[(is-a? value snip%)
|
||||
(write-special value port)
|
||||
1]
|
||||
#;
|
||||
[(use-number-snip? value)
|
||||
(write-special
|
||||
(number-snip:make-repeating-decimal-snip value #f)
|
||||
port)
|
||||
1]
|
||||
[(syntax? value)
|
||||
(write-special (render-syntax/snip value))]
|
||||
[else (void)]))])
|
||||
(current-parameterization)))
|
||||
|
||||
(define op (current-output-port))
|
||||
(define (oprintf . x) (apply fprintf op x))
|
||||
|
@ -67,7 +41,27 @@
|
|||
(not (integer? x))))
|
||||
|
||||
(define (do-printing pretty value port)
|
||||
(call-with-parameterization
|
||||
pp-parameters
|
||||
(λ ()
|
||||
(pretty value port)))))
|
||||
(parameterize ([pretty-print-columns 'infinity]
|
||||
[pretty-print-size-hook
|
||||
(λ (value display? port)
|
||||
(cond
|
||||
[(is-a? value snip%) 1]
|
||||
;[(use-number-snip? value) 1]
|
||||
[(syntax? value) 1]
|
||||
[else #f]))]
|
||||
[pretty-print-print-hook
|
||||
(λ (value display? port)
|
||||
(cond
|
||||
[(is-a? value snip%)
|
||||
(write-special value port)
|
||||
1]
|
||||
#;
|
||||
[(use-number-snip? value)
|
||||
(write-special
|
||||
(number-snip:make-repeating-decimal-snip value #f)
|
||||
port)
|
||||
1]
|
||||
[(syntax? value)
|
||||
(write-special (render-syntax/snip value))]
|
||||
[else (void)]))])
|
||||
(pretty value port))))
|
||||
|
|
Loading…
Reference in New Issue
Block a user