cljs.pprint/with-pretty-writer

macrosince v0.0-3255Edit
(with-pretty-writer base-writer & body)

Source code @ clojurescript:src/main/cljs/cljs/pprint.cljc
(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*))))