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

Re: File type misclassification

"Juanma Barranquero" <lekktu@gmail.com> writes:

> On 3/20/07, David Kastrup <dak@gnu.org> 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 <storm@cua.dk> http://www.cua.dk

Reply to: