GNU bug report logs -
#17051
Order of evaluation in .dir-locals.el
Previous Next
Reported by: Reuben Thomas <rrt <at> sc3d.org>
Date: Thu, 20 Mar 2014 15:02:01 UTC
Severity: minor
Tags: confirmed
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #14 received at control <at> debbugs.gnu.org (full text, mbox):
reassign 17051 emacs,cc-mode
severity 17051 minor
tag 17051 + confirmed
quit
The reason this doesn't work is revealed in the docstring of c-before-hook:
c-before-hack-hook is a compiled Lisp function in ‘cc-mode.el’.
(c-before-hack-hook)
Set the CC Mode style and "offsets" when in the buffer’s local variables.
They are set only when, respectively, the pseudo variables
‘c-file-style’ and ‘c-file-offsets’ are present in the list.
This function is called from the hook ‘before-hack-local-variables-hook’.
Of course `before-hack-local-variables-hook' runs before any local
variables are set, so there is no "correct" order that a user can use
in .dir-locals.el to define a new style: `c-file-style' always applies
before any other variables.
This bug report was last modified 3 years and 175 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.