Juri Linkov wrote:
So perhaps the best solution is to change the checking order to:Rather than introduce yet another user variable for setting the mode automagically, why don't we get rid of magic-mode-alist and build that functionality into auto-mode-alist instead.
1. -*-...-*-
2. auto-mode-interpreter-regexp
3. auto-mode-alist
4. magic-mode-alist
Then the user can set the relative precedence of magic and glob patterns to their hearts content, and if they look at auto-mode-alist, it is clear what order the rules will be applied in.
For example we could use a list in place of regexp to mean an extended method of determining file type, with the car of the list indicating the method to be used:
(add-to-list 'auto-mode-alist '((magic "<\\?xml ") . xml-mode))
_______________________________________________ Emacs-pretest-bug mailing list [email protected] http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
