macro | since v0.0-3255 | Edit |
(with-pretty-writer base-writer & body)
(defmacro with-pretty-writer [base-writer & body]
`(let [base-writer# ~base-writer
new-writer# (not (pretty-writer? base-writer#))]
(cljs.core/binding [cljs.core/*out* (if new-writer#
(make-pretty-writer base-writer# *print-right-margin* *print-miser-width*)
base-writer#)]
~@body
(-ppflush cljs.core/*out*))))