[Top][All Lists]

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

Re: C file recoginzed as image file

From: Eli Zaretskii
Subject: Re: C file recoginzed as image file
Date: Mon, 08 Jan 2007 21:48:17 +0200

> From: address@hidden (Kim F. Storm)
> Date: Mon, 08 Jan 2007 16:25:47 +0100
> Cc: address@hidden, address@hidden, address@hidden, address@hidden,
>       address@hidden
> >
> > Basically, I think that determining the major mode for a given file should
> > neither give precedence to auto-mode-alist nor magic-mode-alist.  Instead it
> > should consider both.  Each one can associate a file with a set of possible
> > major modes (typically the set will be singleton) or say "don't know"
> > (which would be basically the set of all major modes).
> >
> > E.g. auto-mode-alist would give "don't know" for a file named "/b/c/foo" but
> > would give the set { perl-mode, prolog-mode } for a file named
> > "/b/c/foo.pl".  Then magic-mode-alist would give other sets of modes (based
> > on things like the #! interpreter name, the -*- ... -*- cookie, etc...).
> > If the intersection of the two sets is a singleton, then use that
> > major-mode, otherwise query the user to decide whether to believe the file
> > name or the contents.  After all, an inconsistently named file is generally
> > a sign that there's something wrong, so it's good to prompt the user
> > about it.
> This is definitely the best proposal I've seen so far for solving this.

But not something we should do before the release, IMO, however
tempting it may be.

reply via email to

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