Dos2Unix conversion
Dec. 16th, 2011 09:27 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Hello my fellow Emacs users!
This snippet should give you the abiility to remove those ^M characters you get from time to time if you do much emacs work relating to Windows systems. If the first argument in search-forward doesn't copy over right, it can be inserted with C-q C-m.
Have fun!
This snippet should give you the abiility to remove those ^M characters you get from time to time if you do much emacs work relating to Windows systems. If the first argument in search-forward doesn't copy over right, it can be inserted with C-q C-m.
Have fun!
(defun remove-dos-line-endings () "Removes those pesky ^M from a buffer" (interactive) (save-excursion (goto-char 0) (while (search-forward " " nil t) (replace-match "" nil t))))