Subject: bug#15577: 24.3; dir-local variables not applied when switching major-mode

From: yary <[email-masked]>
Date: Thu, 10 Oct 2013 14:34:20 -0400

Before posting the mode-change-clobbering-locals behavior as a bug, I
asked about it on stackoverflow, which generated a thorough
explanation : http://stackoverflow.com/questions/19280851/how-to-keep-dir-local-variables-when-switching-major-modes
-y

On Wed, Oct 9, 2013 at 5:42 PM, Glenn Morris <[email-masked]> wrote:
> yary wrote:
>
>> If I create a ".dir-locals.el" that applies to all major modes, such as:
>>   ((nil . ((tab-width . 3))))
>> It works when first opening any file under that directory- good. But, if
>> I switch the buffer's major-mode, it loses the directory-local
>> tab-width -
>
> File-local variables behave in the same way.