Skip to content

Commit

Permalink
Preserve :gen-class and :load clauses as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Apr 26, 2011
1 parent c3b684d commit 9c222f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/slam/hound/stitch.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@

(def ns-clauses [:use :require :import])

(def ns-clauses-to-preserve [:refer-clojure :gen-class :load])

(defn ns-from-map [ns-map]
`(~'ns ~(:name ns-map)
~@(if-let [doco (:doc (:meta ns-map))] ; avoid inserting nil
[doco])
~@(for [clause-type (cons :refer-clojure ns-clauses)
~@(for [clause-type (concat ns-clauses ns-clauses-to-preserve)
:when (seq (clause-type ns-map))]
(cons clause-type (clause-type ns-map)))))

Expand Down

0 comments on commit 9c222f8

Please sign in to comment.