[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: .dir-locals.el vs. guix-devel-mode
From: |
Taylan Ulrich Bayırlı/Kammer |
Subject: |
Re: .dir-locals.el vs. guix-devel-mode |
Date: |
Mon, 28 Sep 2015 22:05:19 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Alex Kost <address@hidden> writes:
> [...]
>
> More generally, I'm strongly against using "eval" in .dir-locals. IMO
> this file should be used only to set local variables, and ideally it
> shouldn't evaluate an arbitrary code.
Just to clarify: I suppose you mean using eval for things other than
which Emacs can automatically determine to be safe. E.g.
(eval . (put 'foo 'scheme-indent-function <n>))
for integer <n> is safe; Emacs will eval that silently if I'm not
mistaken.
But for things where Emacs pesters the user because it finds it
"unsafe," I find that very annoying.
> So I think .dir-locals.el is not the proper place for indentation rules.
> IMHO they should be moved to "guix-devel.el" and the manual should
> recommend using 'guix-devel-mode' for editing guix package files as it
> provides the proper indenting, highlighting and some useful key
> bindings.
IMO anything that can be put into .dir-locals.el without making Emacs
pester the user should be put there. It's a delight for a Guix newb to
get such settings automatically, because otherwise M-q and TAB will
break existing correct indentation in edited source files, which is very
annoying, and also it might lead to extra patch review round-trips when
the user creates a patch with wrong indentation without noticing.
Just my two cents as a passerby in this thread...
Taylan