How to keep dir-local variables when switching major modes?
I'm committing to a project where standard indentations and tabs are 3-chars wide, and it's using a mix of HTML, PHP, and JavaScript. Since I use Emacs for everything, and only want the 3-char indentation for this project, I set up a ".dir-locals.el" file at the root of the project to apply to all files/all modes under it: ; Match projets's default indent of 3 spaces per level- and don't add tabs ( (nil . ( (tab-width . 3) (c-basic-offset . 3) (indent-tabs-mode . nil) )) ) Which works fine when I first open a file. The problem happens when switching major modes- for example to work on a chunk