[Top][All Lists]

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

Re: files.el

From: Juri Linkov
Subject: Re: files.el
Date: Thu, 28 Oct 2004 12:19:08 +0300
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

address@hidden (Daniel Pfeiffer) writes:
>> >> Generally I agree on the new precedence order you implemented
>> >> (i.e. -*- mode tag, interpreter, <?xml, auto-mode-alist).
>> I haven't looked at the code, but I just want to make sure we only look
>> at the first line and that a tar file whose first subfile starts with <?xml
>> will still be handled as a tar file, not as an xml file.
> Yes, of course.  Except for whitespace the file must immediately start with
> those characters.  A file that starts with echo "<?xml" or any other magic is
> definitely not a candidate.

How about adding a new user option for magic-string-regexp -> mode mapping.
The elements of such list could look, for example:

  ("^<\\?xml " . xml-mode)
  ("^<!DOCTYPE" . xml-mode)
  ("^.\\{,80\\}<html" . html-mode) ;; to look for <html within first 80 chars

Juri Linkov

reply via email to

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