|
From: | Jason Rumney |
Subject: | Re: magic-mode-alist has too high a priority |
Date: | Thu, 24 Feb 2005 18:16:44 +0000 |
User-agent: | Mozilla Thunderbird 1.0 (Windows/20041206) |
Juri Linkov wrote:
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.So perhaps the best solution is to change the checking order to: 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))
[Prev in Thread] | Current Thread | [Next in Thread] |