GNU bug report logs - #8586
23.3.50; Directory-local variable ignored when file-local variables set mode

Previous Next

Package: emacs;

Reported by: Reuben Thomas <rrt <at> sc3d.org>

Date: Fri, 29 Apr 2011 19:39:02 UTC

Severity: normal

Merged with 5239

Found in version 23.3.50

Fixed in version 24.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 8586 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Reuben Thomas <rrt <at> sc3d.org>
Cc: 8586 <at> debbugs.gnu.org
Subject: Re: bug#8586: 23.3.50;
	Directory-local variable ignored when file-local variables set mode
Date: Mon, 23 May 2011 13:04:34 -0400
Reuben Thomas wrote:

> While it would fix this bug, I'm not sure I approve: it looks as
> though it makes things more complicated, and when the "real fix"
> eventually arrives, would presumably have to remain in place for those
> who'd adopted this partial solution in the mean time...not great.

These comments don't apply. This isn't a partial solution, and no-one
needs to "adopt" anything.

I'm making set-auto-mode respect mode: cookies whether they be at the
start or end of the file. That's how it should work, IMO. It also
removes the "major mode must be specified first" restriction (bug#5239).

The only issue I see with it is that normal-mode will be less efficient
than it could be, because set-auto-mode and hack-local-variables may
parse similar regions of the file in similar ways.

Ideally, the file would be parsed only once to get coding:, mode: and
variables, which would then be applied (also allowing bug#7169 to be
fixed). But this is not straightforward to do, because these features
are currently spread over at least 4 functions, so I don't see it
happening any time soon.




This bug report was last modified 14 years and 54 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.