[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15577: 24.3; dir-local variables not applied when switching major-mo
From: |
yary |
Subject: |
bug#15577: 24.3; dir-local variables not applied when switching major-mode |
Date: |
Mon, 14 Oct 2013 14:41:34 -0400 |
Thinking about switching major modes more, my instinct is that the
right solution involves being "smarter" both about which local
variables to clear and reloading any {dir,file}-local variables for
the new node.
Basically, at the start, instead of calling
"kill-all-local-variables", only clear the locals that were set as a
consequence of the old mode. That is, if it was set directly by the
old mode, or by dir-local matching the old mode, delete it. Don't
delete a buffer-local variable if it was set explicitly by the user
after opening during the editing session.
Then after the new mode has set itself, recheck dir-locals and set any
that match the new mode.
Alas I don't use file-locals so am not sure how their use cases fit.
Ignore any "mode:" specifiers and maybe "eval:" as well after the
mode-change, I'd guess.
- bug#15577: 24.3; dir-local variables not applied when switching major-mode, yary, 2013/10/09
- bug#15577: 24.3; dir-local variables not applied when switching major-mode, Glenn Morris, 2013/10/09
- bug#15577: 24.3; dir-local variables not applied when switching major-mode, yary, 2013/10/10
- bug#15577: 24.3; dir-local variables not applied when switching major-mode, Glenn Morris, 2013/10/10
- bug#15577: 24.3; dir-local variables not applied when switching major-mode, Stefan Monnier, 2013/10/10
- bug#15577: 24.3; dir-local variables not applied when switching major-mode, yary, 2013/10/10
- bug#15577: 24.3; dir-local variables not applied when switching major-mode,
yary <=
- bug#15577: 24.3; dir-local variables not applied when switching major-mode, yary, 2013/10/16
- bug#15577: 24.3; dir-local variables not applied when switching major-mode, yary, 2013/10/18
- bug#15577: 24.3; dir-local variables not applied when switching major-mode, Stefan Monnier, 2013/10/18
- bug#15577: 24.3; dir-local variables not applied when switching major-mode, yary, 2013/10/19
- bug#15577: 24.3; dir-local variables not applied when switching major-mode, Stefan Monnier, 2013/10/19
- bug#15577: 24.3; dir-local variables not applied when switching major-mode, yary, 2013/10/20
- bug#15577: 24.3; dir-local variables not applied when switching major-mode, Phil Sainty, 2013/10/20
- bug#15577: 24.3; dir-local variables not applied when switching major-mode, Stefan Monnier, 2013/10/21
- bug#15577: 24.3; dir-local variables not applied when switching major-mode, yary, 2013/10/21
- bug#15577: 24.3; dir-local variables not applied when switching major-mode, Stefan Monnier, 2013/10/21