From d8f855be1993e71c00c07e0771b3ada197d478f2 Mon Sep 17 00:00:00 2001
From: Tassilo Horn <tsdh@gnu.org>
Date: Thu, 22 Nov 2012 09:06:20 +0100
Subject: [PATCH] Allow setting *loading-verbosely* by system property.

This is a feature suggested by CLJ-1112.  The new system property is
clojure.core.loading-verbosely in analogy to
clojure.compile.warn-on-reflection.
---
 src/clj/clojure/core.clj | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/clj/clojure/core.clj b/src/clj/clojure/core.clj
index 985532a..da9f663 100644
--- a/src/clj/clojure/core.clj
+++ b/src/clj/clojure/core.clj
@@ -5254,7 +5254,9 @@
 
 (defonce ^:dynamic
   ^{:private true :doc
-     "True while a verbose load is pending"}
+     "True while a verbose load, e.g., (require 'foo :verbose), is pending.
+  The default value (false) can be set using the system property
+  clojure.core.loading-verbosely."}
   *loading-verbosely* false)
 
 (defn- throw-if
@@ -6116,6 +6118,12 @@
 (load "instant")
 (load "uuid")
 
+;; Before being able to load verbosely, the core print-method impls have to be
+;; defined by core_print.
+(alter-var-root #'*loading-verbosely*
+                (fn [_ prop] (= prop "true"))
+                (System/getProperty "clojure.core.loading-verbosely" "false"))
+
 (defn reduce
   "f should be a function of 2 arguments. If val is not supplied,
   returns the result of applying f to the first 2 items in coll, then
-- 
1.8.0

