Re: How to indent clojure code in Emacs

2014-01-03 Thread dennis zhuang
use the 'indent-region' function.You can define a function to indent the whole buffer: (defun indent-buffer () "Indent whole buffer" (interactive) (indent-region (point-min) (point-max)) (message "format successfully")) Then bind the function to a key, i bound it to F7 for me: (global-s

Re: How to indent clojure code in Emacs

2014-01-03 Thread tao
C-x h selects the entire buffer. C-M-\ reindents the selected region. http://stackoverflow.com/questions/11423566/how-do-i-intelligently-re-indent-clojure-in-emacs sorry, I have found the answer. -- tao Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Friday, January 3, 2014 at 5