el-get/cleanup-whitespace.sh
Ryan C. Thompson e341deec1b Fix whitespace script
Now it loads el-get to pick up custom indentation rules for el-get forms
2014-03-01 13:51:47 -08:00

6 lines
596 B
Bash
Executable File

#!/bin/sh
SETUP='(progn (add-to-list (quote load-path) ".") (load "el-get")(defun cleanup-whitespace () (message "Cleaning whitespace %s" (buffer-file-name)) (setq indent-tabs-mode nil require-final-newline t) (untabify (point-min) (point-max)) (indent-region (point-min) (point-max)) (delete-trailing-whitespace (point-min) (point-max)) (save-buffer)) (add-hook (quote find-file-hook) (function cleanup-whitespace)) (add-to-list (quote auto-mode-alist) (quote ("\\.[rR][cC][pP]$" . emacs-lisp-mode))))'
find . -name '*.el' -o -name '*.rcp' | xargs -- emacs -Q -l simple -batch --eval "$SETUP"