aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Faulhaber <git_net@infolace.com>2009-12-10 16:58:27 -0800
committerTom Faulhaber <git_net@infolace.com>2009-12-10 17:11:18 -0800
commit74c5bf10a5e92c2f2ee83d09eb15938914f95fbe (patch)
tree5c32cdbfe45b0229c879ac64632578dc2c72a672
parente76ad0689697b03cf33da50304f62701d0bd4de8 (diff)
Fixes for defs losing their doc strings (and other metadata).
-rw-r--r--src/clojure/contrib/pprint/cl_format.clj1
-rw-r--r--src/clojure/contrib/pprint/pprint_base.clj4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/clojure/contrib/pprint/cl_format.clj b/src/clojure/contrib/pprint/cl_format.clj
index 8c68977e..145697ff 100644
--- a/src/clojure/contrib/pprint/cl_format.clj
+++ b/src/clojure/contrib/pprint/cl_format.clj
@@ -158,7 +158,6 @@ http://www.lispworks.com/documentation/HyperSpec/Body/22_c.htm
;;; Common handling code for ~A and ~S
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(declare *print-base* *print-radix*)
(declare opt-base-str)
(def #^{:private true}
diff --git a/src/clojure/contrib/pprint/pprint_base.clj b/src/clojure/contrib/pprint/pprint_base.clj
index eec1326d..064fc5ec 100644
--- a/src/clojure/contrib/pprint/pprint_base.clj
+++ b/src/clojure/contrib/pprint/pprint_base.clj
@@ -251,7 +251,9 @@ to a pretty printing writer to which it should do its printing.
For example functions, see *simple-dispatch* and *code-dispatch* in
clojure.contrib.pprint.dispatch.clj."
[function]
- (def *print-pprint-dispatch* function)
+ (let [old-meta (meta #'*print-pprint-dispatch*)]
+ (alter-var-root #'*print-pprint-dispatch* (constantly function))
+ (alter-meta! #'*print-pprint-dispatch* (constantly old-meta)))
nil)
(defmacro with-pprint-dispatch