GNU bug report logs - #7767
23.2.91; file-local-variables-alist should have the permanent-local property

Previous Next

Package: emacs;

Reported by: Alex Harsanyi <harsanyi <at> mac.com>

Date: Sat, 1 Jan 2011 04:43:02 UTC

Severity: normal

Found in version 23.2.91

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alex Harsanyi <harsanyi <at> mac.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 7767 <at> debbugs.gnu.org, Alan Mackenzie <acm <at> muc.de>
Subject: bug#7767: 23.2.91; file-local-variables-alist should have the permanent-local property
Date: Sun, 2 Jan 2011 07:26:36 +0800
On 2 Jan 2011, at 3:38 AM, Stefan Monnier wrote:

>> I tried to debug the problem and it seems that `hack-local-variables'
>> will collect the local variables into `file-local-variables-alist' than
>> run the hook `before-hack-local-variables-hook' which containts the
>> function `c-before-hack-hook'.
>> `c-before-hack-hook' will see the `mode' variable and call `c++-mode'
>> which than will call `kill-all-local-variables' setting
>> `file-local-variables-alist' to nil so that the remaining variables are
>> not processed.
> 
> It sounds like cc-mode does something odd here.

On further investigation, this only happens when the mode setting 
changes the mode of the file.  That is, a file named "hello.c" with a 
"mode: c++" setting.  It does not happen otherwise, because 
`hack-one-local-variable' will not enable a major mode if it is 
already set for the file.

However, `c-before-hack-hook' does enable the mode itself via a call to 
`hack-one-local-variable'.

Best Regards,
Alex.




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

Previous Next


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