Delete trailing spaces
Modify indentation style
Use goto-char & point-min instead of beginning-of-buffer
Add .gitignore
Refactor
Use point-at-bol instead of local variable
sql-indent-is-string-or-comment -> sql-indent-string-or-comment-p
Delete needless pos variable
Apply indentation for close paren