etc: indent-code.el: Remove any existing tabs.
* etc/indent-code.el (main): Call UNTABIFY on the sexp or entire buffer.master
parent
f5d9d6ec68
commit
0b17dc4aae
|
@ -99,6 +99,8 @@
|
||||||
nil t)
|
nil t)
|
||||||
(let ((indent-tabs-mode nil))
|
(let ((indent-tabs-mode nil))
|
||||||
(beginning-of-defun)
|
(beginning-of-defun)
|
||||||
|
(mark-sexp)
|
||||||
|
(untabify (point) (mark))
|
||||||
(indent-sexp)
|
(indent-sexp)
|
||||||
(save-buffer)
|
(save-buffer)
|
||||||
(message "Done!"))
|
(message "Done!"))
|
||||||
|
@ -108,6 +110,7 @@
|
||||||
;; Indent all of FILE-NAME.
|
;; Indent all of FILE-NAME.
|
||||||
(find-file file-name)
|
(find-file file-name)
|
||||||
(let ((indent-tabs-mode nil))
|
(let ((indent-tabs-mode nil))
|
||||||
|
(untabify (point-min) (point-max))
|
||||||
(indent-region (point-min) (point-max))
|
(indent-region (point-min) (point-max))
|
||||||
(save-buffer)
|
(save-buffer)
|
||||||
(message "Done!")))
|
(message "Done!")))
|
||||||
|
|
Reference in New Issue