[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 09:59:03 +0900 (JST)

Stephen Gildea <gildea@intouchsys.com> writes:
>>    Is anything wrong with customizing file-coding-system-alist and/or
>>    auto-coding-alist?

> I can't use file-coding-system-alist because it is ignored for new
> files.  (This is the suspected bug I reported in my previous message.)

> I don't want to use auto-coding-alist because it overrides "Coding:"
> tags in the file.

?? Which version of Emacs are you using?

I've just tested file-coding-system-alist on the current
development code and on Emacs 20.7.  Both Emacs works as I
expected, i.e, they pay attention to
file-coding-system-alist even for a new file, and the
specification of file-coding-system-alist doesn't override
coding: tag.

Here's what I've done for testing.

;; All *.lt1 files should be read by latin-1 coding system.
(setq file-coding-system-alist
      (cons '("\\.lt1\\'" . (latin-1 . latin-1))

Then C-x C-f newfile.lt1 RET sets buffer-file-coding-system
of the buffer for newfile.lt1 to latin-1 (regardless of the
existence of newfile.lt1).

Then, I inserted this line at the head of the file and saved
;; -*- coding: latin-2; -*-

Then, I re-read it.  Now buffer-file-coding-system is set to

Ken'ichi HANDA

reply via email to

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