Re: how to automatically and idiomatically add newlines to clojure code in emacs

2013-02-14 Thread Moritz Ulrich
C-u M-x indent-pp-sexp On Thu, Feb 14, 2013 at 6:06 PM, Mayank Jain wrote: > @Feng > It doesn't clean up the way John is looking to clean some code like this: > > >> (defun func1 [a b c d] (func5 (let [f (func3 c)] (func2 a b f)) (let >> [e 5] (func4 c d e > > > > > On Tue, Feb 12, 2013 at 9:

Re: how to automatically and idiomatically add newlines to clojure code in emacs

2013-02-14 Thread Mayank Jain
@Feng It doesn't clean up the way John is looking to clean some code like this: (defun func1 [a b c d] (func5 (let [f (func3 c)] (func2 a b f)) (let > [e 5] (func4 c d e > On Tue, Feb 12, 2013 at 9:11 AM, Feng Shen wrote: > > (defun indent-buffer () > (interactive) > (indent-region (p

Re: how to automatically and idiomatically add newlines to clojure code in emacs

2013-02-11 Thread Feng Shen
(defun indent-buffer () (interactive) (indent-region (point-min) (point-max))) (defun cleanup-buffer () (interactive) (indent-buffer) (untabify-buffer) (delete-trailing-whitespace)) ;; bind to other key if you like(global-set-key (kbd "M-q") 'cleanup-buffer) cleanup-buffer is very f

Re: how to automatically and idiomatically add newlines to clojure code in emacs

2013-02-11 Thread Andy Fingerhut
On Feb 11, 2013, at 6:28 PM, John Fries wrote: > How are people currently handling this situation? Is it part of most > people's clojure/emacs workflow to > 1) Just insert the newlines by hand? (perhaps I'm the only one finding > this repetitive) I find inserting newlines by hand less repetitive