Permalink
Browse files

Add *trampoline* var to expose whether trampolining is happening.

Needed to fix repl.
  • Loading branch information...
1 parent 91638b7 commit 11c6a6af593e14f558b7e973fd8c5265e0b59fbd @technomancy technomancy committed Jun 26, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/leiningen/trampoline.clj
@@ -6,6 +6,8 @@
[leiningen.classpath :only [get-classpath-string]])
(:require [clojure.string :as string]))
+(def *trampoline* false)
+
(defn escape [form-string]
(format "\"%s\"" (.replaceAll form-string "\"" "\\\\\"")))
@@ -37,7 +39,8 @@ ALPHA: subject to change without warning."
eval-args (atom nil)]
(when (:eval-in-leiningen project)
(println "Warning: trampoline has no effect with :eval-in-leiningen."))
- (binding [eval-in-project (fn [project form & [_ _ init]]
+ (binding [*trampoline* true
+ eval-in-project (fn [project form & [_ _ init]]
(prep project true)
(reset! eval-args [form init]) 0)]
(apply-task task-name project args task-not-found))

0 comments on commit 11c6a6a

Please sign in to comment.