help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to delete ^M


From: Eric Hanchrow
Subject: Re: How to delete ^M
Date: 12 May 2003 15:59:48 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

    Each line of a file ended by ^M. I think this is caused by
    'ENTER'. How can I delete them simultaneously?

Here's what I use:

    (defun strip ()
      "Ensures that when the current buffer is saved, lines will not end
    with carriage returns.  Does so by setting the coding system to
    raw-text-unix."
      (interactive)
      (set-buffer-file-coding-system 'raw-text-unix))

-- 

      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,4-  ) )-,_. ,\ (  `'-'
    '---''(_/--'  `-'\_) fL
        -- Igor Pechtchanski


reply via email to

[Prev in Thread] Current Thread [Next in Thread]