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: [EMAIL PROTECTED], [EMAIL PROTECTED]
IM-ICQ: 271788942
IM-MSN:  [EMAIL PROTECTED]

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

_______________________________________________
Emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to