Within CC mode, for C and C++ files inside a directory, I'd like to have the open braces following a case/do/for/if/while not indented, whatever the style is and without having to change anything in .emacs (in particular creating a global new style).
In .dir-locals.el, I've tried to modify c-offsets-alist, either directly:
((nil . ((eval . (add-to-list 'c-offsets-alist '(substatement-open . 0))))))
Or by using c-set-offset:
((nil . ((eval . (c-set-offset 'substatement-open 0)))))
Then I've tried to use c-file-offsets, still in .dir-locals.el:
((nil . ((c-file-offsets . ((substatement-open . 0))))))
But none seems to work.
How I can set substatement-open to 0 from .dir-locals.el for C and C++ mode ?