1.2.0 permalink Arrow_down_16x16
  • (emit-nl this nl)

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/pprint/pretty_writer.clj:228 top

(defn emit-nl [^Writer this nl]
  (.write (getf :base) (int \newline))
  (dosync (setf :trailing-white-space nil))
  (let [lb (:logical-block nl)
        ^String prefix (:per-line-prefix lb)] 
    (if prefix 
      (.write (getf :base) prefix))
    (let [^String istr (apply str (repeat (- @(:indent lb) (count prefix))
					  \space))] 
      (.write (getf :base) istr))
    (update-nl-state lb)))
Vars in clojure.contrib.pprint.pretty-writer/emit-nl: defn dosync int let
Used in 0 other vars

Comments top

No comments for emit-nl. Log in to add a comment.