Re: File type misclassification
"Juanma Barranquero" <firstname.lastname@example.org> writes:
> On 3/20/07, David Kastrup <email@example.com> wrote:
>> opening the following file in emacs-snapshot from Ubuntu Edgy
>> (sorry, I don't have a fresher CVS Emacs at work) will throw the
>> buffer into PostScript mode, presumably because it starts with "%!".
>> This seems rather like overkill.
> Yep. It's magic-mode-alist's doing:
> ("%![^V]" . ps-mode)
First line of the file reads:
%!TEX encoding = UTF-8 Unicode
I see three fixes:
1) Restrict the magic for PostScript files to %!PS
("%!PS" . ps-mode)
2) Recognize the specific case of TEX
("%![^VT]" . ps-mode)
3) Remove it from magic-mode-alist.
Kim F. Storm <firstname.lastname@example.org> http://www.cua.dk