help-gnu-emacs
[Top][All Lists]
Advanced

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

Why no setq, eval in a dir-locals?


From: Colin Baxter 😺
Subject: Why no setq, eval in a dir-locals?
Date: Fri, 11 Feb 2022 10:57:57 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.90 (gnu/linux)

Hello,

To backup tex files in the same working directory, I have a .dir-locals
file containing the following lines:

#+begin_src emacs-lisp
((latex-mode . (
(kept-old-versions . 2)
(kept-new-versions . 16)
(delete-old-versions . t)
(make-backup-files . t)
(version-control . t)
)))
#+end_src
It works well.

I am curious though as to why I do not seem to need "setq" and "eval"
terms. These are needed however if I wish to put the backups in a
sub-directory:

#+begin_src emacs-lisp
((latex-mode . (
(eval setq backup-directory-alist '(("." . "sub-directory/")))
(kept-old-versions . 2)
(kept-new-versions . 16)
,,, etc.
#+end_src

This too works well.

Can anyone tell me why the two cases appear to be different.

Thank you.

Best wishes,




reply via email to

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