Skip to content

Commit

Permalink
Remove set-color-scheme! function.
Browse files Browse the repository at this point in the history
  • Loading branch information
greglook committed Mar 7, 2015
1 parent 1eb80db commit 7e9d422
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
11 changes: 0 additions & 11 deletions src/puget/printer.clj
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,6 @@
~@body))


(defn set-color-scheme!
"Sets the color scheme for syntax elements. Pass either a map to merge into
the current color scheme, or a single element/colors pair. Colors should be
vector of ANSI style keywords."
([colors]
(alter-var-root #'*options* update-in [:color-scheme] merge colors))
([element colors & more]
(set-color-scheme! (apply hash-map element colors more))))



;; ## Utility Functions

Expand Down Expand Up @@ -267,7 +257,6 @@
(color-doc :delimiter "}")]))



(defmethod format-doc clojure.lang.ISeq
[value]
(let [elements (if (symbol? (first value))
Expand Down
10 changes: 0 additions & 10 deletions test/puget/printer_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@
"should not print non-EDN representation")))


(deftest color-scheme-setting
(let [old-scheme (:color-scheme *options*)]
(set-color-scheme! {:tag [:green]})
(is (= [:green] (:tag (:color-scheme *options*))))
(set-color-scheme! :nil [:black] :number [:bold :cyan])
(is (= [:black] (:nil (:color-scheme *options*))))
(is (= [:bold :cyan] (:number (:color-scheme *options*))))
(set-color-scheme! old-scheme)))


(deftest formatting-primitives
(testing "Primitive values"
(are [v text] (= text (-> v pprint with-out-str str/trim))
Expand Down

0 comments on commit 7e9d422

Please sign in to comment.