Permalink
Browse files

Do in-ns before returning to get proper return value

  • Loading branch information...
1 parent 7872428 commit 96f05e729ff12911eccbedd5c7a03b930bc92d94 @stuartsierra stuartsierra committed Sep 18, 2012
Showing with 7 additions and 8 deletions.
  1. +7 −8 src/main/clojure/clojure/tools/namespace/repl.clj
@@ -41,14 +41,13 @@
(update-in [::track/load] #(remove load-disabled? %))))
(defn- do-refresh [scan-fn]
- (locking #'refresh-tracker
- (let [current-ns (ns-name *ns*)]
- (alter-var-root #'refresh-tracker scan-fn)
- (alter-var-root #'refresh-tracker remove-disabled)
- (print-pending-reloads refresh-tracker)
- (alter-var-root #'refresh-tracker reload/track-reload)
- (print-and-return refresh-tracker)
- (in-ns current-ns))))
+ (let [current-ns (ns-name *ns*)]
+ (alter-var-root #'refresh-tracker scan-fn)
+ (alter-var-root #'refresh-tracker remove-disabled)
+ (print-pending-reloads refresh-tracker)
+ (alter-var-root #'refresh-tracker reload/track-reload)
+ (in-ns current-ns)
+ (print-and-return refresh-tracker)))
(defn disable-unload!
"Adds metadata to namespace (or *ns* if unspecified) telling

0 comments on commit 96f05e7

Please sign in to comment.