Created
February 24, 2016 21:01
-
-
Save cpaulbond/0cbfec84862c75ec6658 to your computer and use it in GitHub Desktop.
Because sometimes the comments are so bad, they just have to go!
This file contains 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 punt-comments () | |
(interactive) | |
(goto-char (point-min)) | |
(while (re-search-forward "/\\*\\|//" nil t) | |
(let ((start (match-beginning 0))) | |
(if (string= (match-string 0) "/*") | |
(if (search-forward "*/" nil t) | |
(delete-region start (point))) | |
(delete-region start (line-end-position)))))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment