[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
syntax.
-Phil
- Two problems with directory-local variables, Marcin Borkowski, 2018/09/17
- Re: Two problems with directory-local variables,
Phil Sainty <=
- Re: Two problems with directory-local variables, Marcin Borkowski, 2018/09/17
- Re: Two problems with directory-local variables, Juri Linkov, 2018/09/17
- Re: Two problems with directory-local variables, Phil Sainty, 2018/09/17
- Re: Two problems with directory-local variables, Juri Linkov, 2018/09/17
- Re: Two problems with directory-local variables, Stefan Monnier, 2018/09/17
- Re: Two problems with directory-local variables, Juri Linkov, 2018/09/19
- RE: Two problems with directory-local variables, Drew Adams, 2018/09/19
- Re: Two problems with directory-local variables, Juri Linkov, 2018/09/20