To quickly recap, CC Mode treats ‘c-file-style’ differently depending on
whether it comes from .dir-locals.el or a file-local variable. For
example, having the following in init.el:
(setq-default 'c-basic-offset 4)
consider the following two scenarios:
1) /tmp/foo/.dir-locals.el exists and contains a single line:
((nil . ((c-file-style . "bsd"))))
Opening an empty /tmp/foo/foo.c file results in ‘c-basic-offset’
being four and ‘c-file-style’ being "bsd".
2) /tmp/bar/.dir-locals.el does not exist but /tmp/bar/bar.c does and
contains a single line:
/* -*- c-file-style: "bsd" -*- */
Opening that file results in ‘c-basic-offset’ being eight and
‘c-file-style’ being "bsd". (Value of eight for the offset comes
from "bsd" style).
I maintain that in both cases ‘c-basic-offset’ should be the same.
I further maintain that its value should be eight. Alan disagrees and
maintains that cc-mode-hook should overwrite settings in dir-local
variables but should be overwritten by settings in file-local variables.