Subject: bug#32129: 26.1; Bug in add-dir-local-variable when used with eval, progn and setenv

From: Noam Postavsky <[email-masked]>
Date: Fri, 13 Jul 2018 05:26:23 -0400

tags 32129 notabug
close 32129
quit

Luis Gerhorst <[email-masked]> writes:

> I'm sorry for the noise, I just retried it and it worked, TEST was
> set. So the generated .dir-locals.el does the right thing.

Right, I'm pretty sure you really do want setq-local though.

> Anyway: Shouldn't the .dir-locals.el look different? This is of course
> just a question of preference, if it makes the code more elegant or
> something I would accept that it's better to leave it as it is.

Yeah, it currently just does `pp' for the whole structure.  We would
need to special case the top level printing of values I think.  It might
be interesting to have a pretty printer that's able to take a sort of
"descriptor" of printing structure, to handle this sort of thing more
generally.  But I'm going to go ahead and close this report as notabug,
since special casing the dir-local printing is not worth the trouble.