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

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 16 Oct 2022 11:43:19 +0200

Philip Kaludercic <[email-masked]> writes:

>> Yes, that's much better than my initial suggestion.  But I like the
>> safe-lisp approach better.
>
> ... why not both?  I can imagine that safe-lisp will take a while before
> it becomes usable, just because something like `safe-eval-p' has to be
> quite exhaustive, and at the very least handle all special forms.  Elisp
> isn't a Scheme so that means that a number of methods have to be
> implemented...

We're not in a hurry here.  😀  If we're aiming for a `safe-eval-p'
solution, then adding another syntax that will then be deprecated again
seems counter-productive.

But Stefan's syntax does look attractive, and allows both manual editing
and automatic editing, which a safe-lisp approach doesn't.  And the
safe-list approach also makes backwards compatibility more iffy -- if we
introduce `cond' in safe-lisp in Emacs 33, we'd still want the file to
not bug out in Emacs 32.

So safe-lisp would just have to ignore forms that are unknown to it,
which is less attractive than just ignoring

  (:some-new-thing ...)

in Stefan's syntax.

Uhm uhm hm.