summaryrefslogtreecommitdiff
path: root/bin/autoindent
blob: 52c61c6b22b859ba28bf78a536438a37c0ef6fe8 (plain)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env 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