Abstracted out a function to set printing parameters for the
macro debugger and the syntax browser. Set all printing parameters to their defaults (as observed from both mzscheme and drscheme). svn: r16254
This commit is contained in:
parent
4b9223e6e7
commit
cf5c0a1b08
|
@ -107,16 +107,8 @@
|
||||||
(parameterize
|
(parameterize
|
||||||
([pretty-print-size-hook pp-size-hook]
|
([pretty-print-size-hook pp-size-hook]
|
||||||
[pretty-print-print-hook pp-print-hook]
|
[pretty-print-print-hook pp-print-hook]
|
||||||
[pretty-print-current-style-table (pp-extend-style-table)]
|
[pretty-print-current-style-table (pp-extend-style-table)])
|
||||||
;; Printing parameters (mzscheme manual 7.9.1.4)
|
(pretty-print/defaults datum)))
|
||||||
[print-unreadable #t]
|
|
||||||
[print-graph #f]
|
|
||||||
[print-struct #f]
|
|
||||||
[print-box #t]
|
|
||||||
[print-vector-length #t]
|
|
||||||
[print-hash-table #f]
|
|
||||||
[print-honu #f])
|
|
||||||
(pretty-print datum)))
|
|
||||||
|
|
||||||
(define (->show-function show)
|
(define (->show-function show)
|
||||||
(cond [(procedure? show)
|
(cond [(procedure? show)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
|
||||||
#lang scheme/base
|
#lang scheme/base
|
||||||
(require scheme/class
|
(require scheme/class
|
||||||
|
scheme/pretty
|
||||||
macro-debugger/util/class-iop
|
macro-debugger/util/class-iop
|
||||||
syntax/stx
|
syntax/stx
|
||||||
"interfaces.ss")
|
"interfaces.ss")
|
||||||
|
@ -20,6 +21,18 @@
|
||||||
;; If they were always wrapped, the pretty-printer would screw up
|
;; If they were always wrapped, the pretty-printer would screw up
|
||||||
;; list printing (I think).
|
;; list printing (I think).
|
||||||
|
|
||||||
|
(define (pretty-print/defaults datum [port (current-output-port)])
|
||||||
|
(parameterize
|
||||||
|
(;; Printing parameters (defaults from MzScheme and DrScheme 4.2.2.2)
|
||||||
|
[print-unreadable #t]
|
||||||
|
[print-graph #f]
|
||||||
|
[print-struct #t]
|
||||||
|
[print-box #t]
|
||||||
|
[print-vector-length #f]
|
||||||
|
[print-hash-table #t]
|
||||||
|
[print-honu #f])
|
||||||
|
(pretty-print datum port)))
|
||||||
|
|
||||||
(define-struct syntax-dummy (val))
|
(define-struct syntax-dummy (val))
|
||||||
|
|
||||||
;; A SuffixOption is one of
|
;; A SuffixOption is one of
|
||||||
|
|
|
@ -52,16 +52,8 @@
|
||||||
[pretty-print-size-hook pp-size-hook]
|
[pretty-print-size-hook pp-size-hook]
|
||||||
[pretty-print-print-hook pp-print-hook]
|
[pretty-print-print-hook pp-print-hook]
|
||||||
[pretty-print-current-style-table (pp-extend-style-table identifier-list)]
|
[pretty-print-current-style-table (pp-extend-style-table identifier-list)]
|
||||||
[pretty-print-columns columns]
|
[pretty-print-columns columns])
|
||||||
;; Printing parameters (mzscheme manual 7.9.1.4)
|
(pretty-print/defaults datum port)
|
||||||
[print-unreadable #t]
|
|
||||||
[print-graph #f]
|
|
||||||
[print-struct #t]
|
|
||||||
[print-box #t]
|
|
||||||
[print-vector-length #t]
|
|
||||||
[print-hash-table #f]
|
|
||||||
[print-honu #f])
|
|
||||||
(pretty-print datum port)
|
|
||||||
(new range%
|
(new range%
|
||||||
(range-builder range-builder)
|
(range-builder range-builder)
|
||||||
(identifier-list identifier-list))))
|
(identifier-list identifier-list))))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user