"Ryan Bowman" <[EMAIL PROTECTED]> writes: > I run Emacs (21.3.50.1) on Windows XP. When I open a file emacs > detects if the file contains unix or windows line endings and uses the > appropriate.
Ok. > When I create a new file it uses Unix line endings. You must have: (setq default-buffer-file-coding-system 'unix) or something equivalent in your .emacs. Try it with "emacs -q" to verify. > I would like emacs to always use dos line endings (because everyone > else I work with uses Eclipse on Windows). I now know I can use C-x > RET c dos RET C-x C-f to open a file in dos mode, but that's fairly > lengthy to perform everytime I need to open a new file. I wanted to > write a simple function that called > (universal-coding-system-argument "dos") then called (find-file) but > universal-coding-system-argument seems geared toward interactive > calls. What is a good way to collect the above commands into one? If you only want _new_ files to use DOS line endings, use (setq default-buffer-file-coding-system 'dos) If you want to automatically convert existing files to DOS line endings, that's a different story. -- -- Stephe
