emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: magic-mode-alist has too high a priority


From: Dominique de Waleffe
Subject: Re: magic-mode-alist has too high a priority
Date: Thu, 24 Feb 2005 21:35:53 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Stefan Monnier wrote:
When auto-mode-alist decides the buffer should use mode Foo and
magic-mode-alist thinks it should be type Bar, we have the
following possibilities:
- the file name's extension is wrong: we should use Bar.
- the magic code is wrong: we should use Foo.
- both are wrong.
- both are correct.

My guess is that in 99% of the cases, both are "correct".
Agreed.

So I suggest something like: magic-mode-alist doesn't take precedence over
auto-mode-alist.  Instead, we look them up both, and if there's a conflict,
we lookup a new var `mode-precedence-alist' to see if the user prefers one
over the other.  If that doesn't resolve the conflict, check
`derived-mode-p'.  If the conflict is still not resolved, prompt the user.

Indeed, that would allow both behaviours. Add that the default behaviour should probably be made as to be the least surprising for users (i.e. prefer auto-mode to magic).

D.
--
Dominique de Waleffe
E-mail: address@hidden, address@hidden
IM-ICQ: 271788942
IM-MSN:  address@hidden

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

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