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

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

bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist


From: Lars Ingebrigtsen
Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist
Date: Sat, 15 Oct 2022 15:56:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Philip Kaludercic <philipk@posteo.net> writes:

> Another idea could be to take inspiration from Guile's "Sandboxed
> Evaluation"[0] and provide a "safe subset" of Elisp that can be
> evaluated (with some additional checks).
>
> E.g. the following would allow evaluating `add-to-list' if the list if
> safe and the value is self-evaluating:

Oh, that's a good idea.  I wonder whether anybody's written an
interpreter for a "safe" version of Emacs Lisp -- then people could put
`if' statements etc also into these files.

We already mark functions as being side-effect-free, so it seems like
code like

(if (cl-oddp (% (random) 2))
    (setq ...))

would be "safe" together with the safep markup for assignments we
already have.  We could make a safe restricted language subset for use
both here and in similar circumstances.

> No, what I had in mind was not to trigger warnings but either to
> highlight unused variables or provide a command that would check it for
> you.

Oh, right.  That's another good idea.  😀






reply via email to

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