bug#17051: Order of evaluation in .dir-locals.el

Lars Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.cc-mode.general
Message-ID <[email protected]>
Alan Mackenzie <[email protected]> writes:

>> When I first visit a file under that project, I get the error: "Undefined
>> style: fontforge"
>
> I don't think the order of evaluation of variables in .dir-locals.el is
> defined.  The code (in .../lisp/files.el) is not easy to understand.  It
> could well be that, for that first file, the c-file-style is being
> applied before it has been defined.

Yes, I don't think the order is well-defined -- the manual talks about
priorities:

---
If the @file{.dir-locals.el} file contains multiple different values
for a variable using different mode names or directories, the values
will be applied in an order such that the values for more specific
modes take priority over more generic modes.  Values specified under a
directory have even more priority. 
---

but I don't see anything about the order.

However, there's the .dir-locals-2.el file -- it'll be run after the
first file, so using that would solve the original use case, I think?

But I don't think there's anything here to fix here, so I'm closing this
bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.