Skip to content
Browse files

continue Clojure 1.4 support (esp. for lein plugin usage)

  • Loading branch information...
1 parent ce7d9b6 commit 8ec79b42936920b05d04ce0bb5ee89cba30ef77a @cemerick cemerick committed Feb 13, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/kibit/check.clj
View
6 src/kibit/check.clj
@@ -193,6 +193,10 @@
(keep #(check-aux % simplify-fn guard)
((res->read-seq resolution) reader))))
+(def ^:private default-data-reader-binding
+ (when (resolve '*default-data-reader-fn*)
+ {(resolve '*default-data-reader-fn*) (fn [tag val] val)}))
+
(defn check-file
""
[source-file & kw-opts]
@@ -201,7 +205,7 @@
(merge default-args
(apply hash-map kw-opts))]
(with-open [reader (io/reader source-file)]
- (binding [*default-data-reader-fn* (fn [tag val] val)]
+ (with-bindings default-data-reader-binding
(doseq [simplify-map (check-reader reader
:rules rules
:guard guard

0 comments on commit 8ec79b4

Please sign in to comment.
Something went wrong with that request. Please try again.