[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two problems with directory-local variables

From: Phil Sainty
Subject: Re: Two problems with directory-local variables
Date: Mon, 17 Sep 2018 21:28:27 +1200
User-agent: Orcon Webmail

On 2018-09-17 20:08, Marcin Borkowski wrote:
but this entry in .dir-locals.el does not work:
((nil . ((eval '(message "hello")))))

That is because the syntax is incorrect.  You want:

((nil . ((eval . (message "hello")))))

or equivalently, without dotted pair syntax in the eval:

((nil . ((eval message "hello"))))

Note that your version was equivalent to evaluating:

('(message "hello"))

When I type this in .dir-locals.el:
((nil . ((eval (lambda () (message "hello"))))))
it works as expected.

Indeed, as that's evaluating this form:

((lambda () (message "hello")))

Although I wouldn't recommend that over the former


reply via email to

[Prev in Thread] Current Thread [Next in Thread]