added pretty-print-abbreviate-read-macros

svn: r6231

original commit: bd7f075593f6743dd07fcb4d2e1c84caa83ab902
This commit is contained in:
Robby Findler 2007-05-19 17:28:02 +00:00
parent a294e5fb65
commit fb4ae3d6f2

View File

@ -25,6 +25,7 @@
pretty-print-show-inexactness
pretty-print-exact-as-decimal
pretty-print-.-symbol-without-bars
pretty-print-abbreviate-read-macros
pretty-print-style-table?
pretty-print-current-style-table
@ -32,7 +33,6 @@
pretty-print-remap-stylable
pretty-format
pretty-printing
pretty-print-newline
make-tentative-pretty-print-output-port
@ -78,6 +78,8 @@
symbols like-symbols)
(make-pretty-print-style-table new-ht))))
(define pretty-print-abbreviate-read-macros (make-parameter #f))
(define pretty-print-current-style-table
(make-parameter
(pretty-print-extend-style-table #f null null)
@ -1052,11 +1054,12 @@
(define (read-macro? l)
(define (length1? l) (and (pair? l) (null? (cdr l))))
(let ((head (car l)) (tail (cdr l)))
(case head
((quote quasiquote unquote unquote-splicing syntax)
(length1? tail))
(else #f))))
(and (pretty-print-abbreviate-read-macros)
(let ((head (car l)) (tail (cdr l)))
(case head
((quote quasiquote unquote unquote-splicing syntax)
(length1? tail))
(else #f)))))
(define (read-macro-body l)
(cadr l))