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
View this message in rfc822 format
Alan Mackenzie <acm <at> muc.de> 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
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.