emacs-devel
[Top][All Lists]
Advanced

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

Re: Should `auto-coding-functions' be mode-specific?


From: Juri Linkov
Subject: Re: Should `auto-coding-functions' be mode-specific?
Date: Sun, 07 Jan 2007 18:22:57 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.90 (gnu/linux)

>> But then why not to go further and use the same regexp as used for
>> detecting HTML files in `magic-mode-alist'?  It seems reasonable
>> to detect the HTML encoding exactly in the same files that later
>> recognized as HTML according to the file contents.
>
> I think it's a good idea, and it is easy to do (see below).
> But it would reopen your original issue: that encoding detection
> doesn't work in Mozilla bookmark files.

Mozilla bookmark files get detected as SGML according to the sgml-mode
rule in magic-mode-alist.  This is ok to visit Mozilla bookmark files
in SGML mode, since these are not quite HTML files, but nonetheless
we should try to detect their encoding.

We either could create a new function sgml-meta-auto-coding-function
(like sgml-html-meta-auto-coding-function), or add encoding detection
of HTML-like SGML files to sgml-html-meta-auto-coding-function by
fetching and applying the sgml-mode rule as well as html-mode rule
from magic-mode-alist.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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