emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: Emacs very slow opening file]


From: Stefan Monnier
Subject: Re: address@hidden: Emacs very slow opening file]
Date: Thu, 29 Sep 2005 15:44:53 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> > So, I would conclude, that there is no bug at all.  Emacs can't
>> > possibly know, that the "Local Variables:" block isn't meant to be
>> > interpreted in the diff file.  
> [...]
>> Perhaps, Emacs has to detect that the file is a patch before
>> checking "-*- ... -*-" and "Local Variables".

> I don't think that any magical file-type recognition mechanism should
> overwrite explicitly stated modes.

I completely agree with that, but I do think that the rule for "what is
a Local-Variables section" is not strict enough.  It'd be good to tighten
them, or at least make it possible to tighten them.

E.g. major modes could set a "local-variables-prefix-regexp" which the text
leading to the "Local Variables" should match.  E.g. c-mode could set it to
"\\`[ \t]*\\(//\\|/?\\*)[ \t]*\\'"  Problem is: in order for
this to be useful for the OP, the test should be done *after* using the
Local-Variables's section (i.e. after switching to C mode).  Still, it
doesn't sound unfeasible, and would help reduce the likelihood of mistakenly
using a Local-Variables section.


        Stefan




reply via email to

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