Created
November 12, 2009 18:55
-
-
Save manjilab/233171 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env ruby | |
filename = "/tmp/tmptx_tidyClojurecode.clj"; | |
File.open(filename, "w") {|f| | |
STDIN.each do |line| | |
f.print line | |
end | |
} | |
result = `emacs -batch \ | |
--eval '(load "~/opt/clojure-mode/clojure-mode")' \ | |
#{filename} \ | |
--eval '(setq-default tab-width 8 indent-tabs-mode nil)' \ | |
--eval '(indent-region (point-min) (point-max) nil)' \ | |
-f save-buffer &> /dev/null` | |
puts `cat #{filename}` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment