aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscgilardi <scgilardi@gmail.com>2008-07-11 00:19:58 +0000
committerscgilardi <scgilardi@gmail.com>2008-07-11 00:19:58 +0000
commitecee76fcd8019624c47b07c6466242eda44cbc52 (patch)
treea006a3160a1dc0d01d2cc3d8fd805e2d2b5850cd
parent7f120d2a96cd9fc3e34ce02d28d0d19f327d9b70 (diff)
lib.clj: improve :verbose output for nested loads
-rw-r--r--lib.clj12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib.clj b/lib.clj
index 3e847c6f..deab7da8 100644
--- a/lib.clj
+++ b/lib.clj
@@ -179,18 +179,20 @@
filter-opts (select-keys opts *filter-keys*)]
(binding [*verbose* (or *verbose* verbose)]
(when load
- (throw-if (not url) "'%s' not found in classpath" path)
- (load sym url namespace)
(when *verbose*
- (printf "(lib/load-resource \"%s\")\n" url)))
+ (printf "(lib/load-resource \"%s\")\n" url)
+ (flush))
+ (throw-if (not url) "'%s' not found in classpath" path)
+ (load sym url namespace))
(when namespace
- (apply refer namespace (mapcat seq filter-opts))
(when *verbose*
+ (printf "(clojure/in-ns '%s)\n" (ns-name *ns*))
(printf "(clojure/refer '%s" namespace)
(dorun (map
#(printf " %s '%s" (key %) (print-str (val %)))
filter-opts))
- (printf ")\n"))))))
+ (printf ")\n"))
+ (apply refer namespace (mapcat seq filter-opts))))))
;; Resources