Skip to content

Commit 42a537d

Browse files
committed
emacs-indent.el is added, which is obtained from http://d.hatena.ne.jp/Nos/20131121/1385027070 .
1 parent b34d043 commit 42a537d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

veriloggen/utils/emacs-indent.el

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
:;exec emacs -batch -l "$0" -f : "$@" --no-site-file -q # -*- Emacs-Lisp -*-
2+
; @emacs -batch -l "%~f0" -f : %* --no-site-file -q & goto :EOF
3+
4+
; indent specified file(s) with emacs indent-region
5+
; http://www.emacswiki.org/emacs/EmacsScripts
6+
; http://www.cslab.pepperdine.edu/warford/BatchIndentationEmacs.html
7+
8+
; http://d.hatena.ne.jp/Nos/20131121/1385027070
9+
10+
(defun : ()
11+
(dolist (f (nthcdr 5 command-line-args))
12+
(find-file f)
13+
;; (c-set-style "stroustrup")
14+
(indent-region (point-min) (point-max) nil)
15+
(untabify (point-min) (point-max))
16+
(save-buffer))
17+
)
18+
;:EOF

0 commit comments

Comments
 (0)