On Sun, Aug 7, 2011 at 1:44 PM, Eric Lavigne <lavigne.e...@gmail.com> wrote:
> The pprint function in the Clojure standard library indents Clojure source
> code.
>      http://richhickey.github.com/clojure/clojure.pprint-api.html
> To get the result you are looking for, a tool would need to walk through all
> the *.clj files in your source directory and, for each file, read in the
> contents and pprint them back into the same file.
> Bonus points for careful error checking - printing into an intermediate
> buffer and reading it back in to check that nothing went wrong before
> overwriting the original file.
> This would make a good Leiningen plug-in, and doesn't sound too difficult to
> write.

Er, won't you lose all comments and have reader macros expanded if you
use read/pprint to do the transformation?

-- 
Protege: What is this seething mass of parentheses?!
Master: Your father's Lisp REPL. This is the language of a true
hacker. Not as clumsy or random as C++; a language for a more
civilized age.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to