diff options
Diffstat (limited to 'src/clojure/contrib/pprint/pprint_base.clj')
-rw-r--r-- | src/clojure/contrib/pprint/pprint_base.clj | 4 |
1 files changed, 3 insertions, 1 deletions
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 |