>> > 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
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel