[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [External] : Rename .dir-locals.el to .dir-locals.eld
From: |
Michael Welsh Duggan |
Subject: |
Re: [External] : Rename .dir-locals.el to .dir-locals.eld |
Date: |
Fri, 21 Jan 2022 09:17:05 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Drew Adams <drew.adams@oracle.com> writes:
>> > 2. Isn't every Elisp sexp "code"? How are you
>> > going to distinguish "code" from other sexps?
>>
>> Try 'M-x eval-buffer' in any buffer visiting a .dir-locals.el file.
>
> Lisp data is Lisp code. Lisp code can raise
> errors.
>
> Narrow any bit of fine Lisp code randomly and
> eval it. It's still code; it's just unlikely
> to be `eval'able without error.
>
> I think you're talking about Lisp code that's
> Lisp-`read'able without error, but not
> necessarily `eval'able without error.
>
> If so, fine. But that, in itself, doesn't
> say why it merits a different file extension.
> There may be good reasons. So far, haven't
> heard any.
>From my point of view, it is an indication that the lisp forms in the
file are not guaranteed to be (and most likely will not be) evaluated.
Having a separate mode means that buffers with this mode can
automatically avoid linting as if they were top level forms intended for
evaluation. Having a separate extension makes it easy to automatically
use a different editing mode. Also, the extension and mode are good
indicators to the user that any forms generally meant for evaluation
(like backquote) are not guaranteed to enter a context in which they
will be evaluated.
All of this is just my opinion. I did not go back and reread the
discussion that led to lisp-data-mode. I remember that I was swayed by
the reasons in that discussion, so the reasons I state above may not be
good enough to merit the change in your opinion.
--
Michael Welsh Duggan
(md5i@md5i.com)
- Rename .dir-locals.el to .dir-locals.eld, Stefan Monnier, 2022/01/20
- RE: [External] : Rename .dir-locals.el to .dir-locals.eld, Drew Adams, 2022/01/20
- Re: [External] : Rename .dir-locals.el to .dir-locals.eld, Stefan Monnier, 2022/01/20
- Re: [External] : Rename .dir-locals.el to .dir-locals.eld, Dmitry Gutov, 2022/01/20
- RE: [External] : Rename .dir-locals.el to .dir-locals.eld, Drew Adams, 2022/01/20
- Re: [External] : Rename .dir-locals.el to .dir-locals.eld, Dmitry Gutov, 2022/01/20
- Re: [External] : Rename .dir-locals.el to .dir-locals.eld,
Michael Welsh Duggan <=
- RE: [External] : Rename .dir-locals.el to .dir-locals.eld, Drew Adams, 2022/01/21
Re: Rename .dir-locals.el to .dir-locals.eld, Po Lu, 2022/01/20
Re: Rename .dir-locals.el to .dir-locals.eld, Robin Tarsiger, 2022/01/20
Re: Rename .dir-locals.el to .dir-locals.eld, Eli Zaretskii, 2022/01/21
Re: Rename .dir-locals.el to .dir-locals.eld, Lars Ingebrigtsen, 2022/01/21