[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.
- Re: C file recoginzed as image file, (continued)
- Re: C file recoginzed as image file, Chong Yidong, 2007/01/09
- Re: C file recoginzed as image file, Stuart D. Herring, 2007/01/09
- Re: C file recoginzed as image file, Stephen Leake, 2007/01/09
- Re: C file recoginzed as image file, Giorgos Keramidas, 2007/01/15
- Re: C file recoginzed as image file, Eli Zaretskii, 2007/01/09
- Re: C file recoginzed as image file, Alan Mackenzie, 2007/01/09
- Re: C file recoginzed as image file,
Eli Zaretskii <=
- Re: C file recoginzed as image file, Stefan Monnier, 2007/01/08
- Re: C file recoginzed as image file, Lennart Borgman (gmail), 2007/01/08
- Re: C file recoginzed as image file, Richard Stallman, 2007/01/08
- Re: C file recoginzed as image file, Lennart Borgman (gmail), 2007/01/09
- Re: C file recoginzed as image file, Jason Rumney, 2007/01/09
- Re: C file recoginzed as image file, Lennart Borgman (gmail), 2007/01/09
- Re: C file recoginzed as image file, Jason Rumney, 2007/01/09
- Re: C file recoginzed as image file, Lennart Borgman (gmail), 2007/01/09
- Re: C file recoginzed as image file, Richard Stallman, 2007/01/09
- Re: C file recoginzed as image file, Jason Rumney, 2007/01/10