Created
May 10, 2012 15:19
-
-
Save djKianoosh/2653859 to your computer and use it in GitHub Desktop.
Change *print-right-margin* in Clojure REPL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro with-ns | |
"Evaluates body in another namespace. ns is either a namespace | |
object or a symbol. This makes it possible to define functions in | |
namespaces other than the current one." | |
[ns & body] | |
`(binding [*ns* (the-ns ~ns)] | |
~@(map (fn [form] `(eval '~form)) body))) | |
(with-ns 'clojure.pprint (def ^:dynamic *print-right-margin* 140)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment