Created
November 5, 2011 09:37
-
-
Save qsun/1341320 to your computer and use it in GitHub Desktop.
Remove the continuous spaces before and after current point
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
(defun consolidate-spaces () | |
"Remove the continuous spaces before and after current point" | |
(interactive) | |
(let (start end) | |
(skip-chars-backward "[:space:]") | |
(setq start (point)) | |
(skip-chars-forward "[:space:]") | |
(setq end (point)) | |
(delete-region start end))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment