[Top][All Lists]

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

Re: setting eol-type for new files

From: Kenichi Handa
Subject: Re: setting eol-type for new files
Date: Tue, 26 Sep 2000 14:26:58 +0900 (JST)

Stephen Gildea <gildea@intouchsys.com> writes:
> But the specific case I want--Emacs on NT, new file on Unix file
> system via Samba--doesn't work.

> I have this in my .emacs file:

> (set-language-environment "latin-1")
> (modify-coding-system-alist 'file "\\`[Uu]:" 'latin-1-unix)

> This does cause existing files to be latin-1-unix, even if they
> have DOS-style ^M's at the end of each line.  I'm not convinced that
> is a feature, which is why I ask for a way to specify coding system
> separately for new and existing files.

But that is a feature.  If you want to auto-detect eol type,
you should specify just 'latin-1.  Specifying 'latin-1 means
text encoding is regarded as latin-1 but EOL-type is
auto-detected, and if the auto-detection fails (because of a
new file, a file without any EOL, a file with inconsistent
EOL), it falls backs to unix style EOL.

And, for DOS and NT, you may be able to use

Ken'ichi HANDA

reply via email to

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