On 7 June 2016 at 12:23, Alan Mackenzie <acm@muc.de> wrote:

Why are you defining the new style "fontforge" every time a file gets
visited?

​The idea was to define a per-project style every time that project's directory was visited.​

  Couldn't you simply define it once, directly in your .emacs,
before any C files are loaded (e.g., via desktop-save-mode)?

I would prefer to keep the per-project style with the project code.​
 
​​
Would you please try defining your CC Mode style outside of
.dir-locals.el, as suggested above.

​That works fine (I do it for other styles that are more widely applicable).​

--