vlion: cut of the flammarion woodcut, colored (Default)
[personal profile] vlion in [community profile] emacs
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!


(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))))

From:
Anonymous( )Anonymous This account has disabled anonymous posting.
OpenID( )OpenID You can comment on this post while signed in with an account from many other sites, once you have confirmed your email address. Sign in using OpenID.
User
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

 
Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.

Profile

emacs: Emacs Community Logo (Default)
emacs community

December 2011

S M T W T F S
    123
45678910
1112131415 1617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 26th, 2017 08:29 am
Powered by Dreamwidth Studios