GNU bug report logs -
#15577
24.3; dir-local variables not applied when switching major-mode
Previous Next
Reported by: yary <not.com <at> gmail.com>
Date: Wed, 9 Oct 2013 20:15:01 UTC
Severity: normal
Merged with 23407
Found in version 24.3
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
For anyone following this discussion, I moved the non-dir-local parts to:
bug#15658: Easy way to make a file-local variable also permanent-local
bug#15659: Simple method for preserving minor-mode
>> Moving dir-local setup code to after-change-major-mode-hook would be a
>> simple fix for issue #1. File-local (as it is now) in
>> after-change-major-mode-hook would cause some problems eg. if a
>> file-local sets the mode!
>
>Obviously if we move the mode-setting part, we introduce a bug, so we
>wouldn't move it (it's already handled separately for the same kind of
>reasons).
Right. So it looks like a patch for moving dir-local setup to
after-change-major-mode-hook is in order. Where I fall down in the
implementation is figuring out what exactly changes so that I don't
change behavior for find-file or kill-all-local-variables, and also
don't set dir-locals twice when opening a file (without using
defadvice which seems wrong in the core). Plus I'd have to get started
as a contributor. Neither are insurmountable, though I think I don't
have much more time to devote to these at the moment.
This bug report was last modified 9 years and 13 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.