Created
November 1, 2009 11:44
-
-
Save snim2/223491 to your computer and use it in GitHub Desktop.
Convert tabs to spaces in Emacs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;; Turn tabs to spaces | |
| (defun tabs-to-spaces (&optional begin end) | |
| "Turn all tabs in a region into four spaces." | |
| (interactive "r") | |
| (save-excursion | |
| (if mark-active | |
| (replace-regexp "\t" " " nil (point) (mark)) | |
| (replace-regexp "\t" " " nil (point-min) (point-max)) | |
| ) | |
| ) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment