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
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