summaryrefslogtreecommitdiff
path: root/bin/autoindent
blob: c45da1eb11f684a8238e1aad457cd475bda30965 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash
file=$1
sed -i 's/^\s*//' "$file"
emacs --batch "$file" \
	--eval '(setq indent-tabs-mode t)' \
	--eval '(setq ruby-indent-level 4)' \
	--eval '(setq tab-width 4)' \
	--eval '(setq make-backup-files nil)' \
	--eval '(indent-region (point-min) (point-max) nil)' \
	-f save-buffer