* Appending items to variables in .dir-locals.el
@ 2022-09-21 7:48 Thuna
2022-09-21 11:36 ` Philip Kaludercic
2022-09-21 11:39 ` Lars Ingebrigtsen
0 siblings, 2 replies; 5+ messages in thread
From: Thuna @ 2022-09-21 7:48 UTC (permalink / raw)
To: emacs-devel
I think it would be good to be able to add items to variables that hold
lists in `.dir-locals.el'. Maybe with the special form `(append
VARIABLE . ITEMS))'? Considering `auto-mode-alist' has its own special
form, I think the need for this already exists.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Appending items to variables in .dir-locals.el
2022-09-21 7:48 Appending items to variables in .dir-locals.el Thuna
@ 2022-09-21 11:36 ` Philip Kaludercic
2022-09-21 18:40 ` Juri Linkov
2022-09-21 11:39 ` Lars Ingebrigtsen
1 sibling, 1 reply; 5+ messages in thread
From: Philip Kaludercic @ 2022-09-21 11:36 UTC (permalink / raw)
To: Thuna; +Cc: emacs-devel
Thuna <thuna.cing@gmail.com> writes:
> I think it would be good to be able to add items to variables that hold
> lists in `.dir-locals.el'. Maybe with the special form `(append
> VARIABLE . ITEMS))'? Considering `auto-mode-alist' has its own special
> form, I think the need for this already exists.
While not exactly what you want, you can add a lisp expression and have
it evaluated to the same effect. But yes, a proper feature would be
nice to have.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Appending items to variables in .dir-locals.el
2022-09-21 7:48 Appending items to variables in .dir-locals.el Thuna
2022-09-21 11:36 ` Philip Kaludercic
@ 2022-09-21 11:39 ` Lars Ingebrigtsen
1 sibling, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-21 11:39 UTC (permalink / raw)
To: Thuna; +Cc: emacs-devel
Thuna <thuna.cing@gmail.com> writes:
> I think it would be good to be able to add items to variables that hold
> lists in `.dir-locals.el'. Maybe with the special form `(append
> VARIABLE . ITEMS))'? Considering `auto-mode-alist' has its own special
> form, I think the need for this already exists.
Yes, I think that would be handy.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Appending items to variables in .dir-locals.el
2022-09-21 11:36 ` Philip Kaludercic
@ 2022-09-21 18:40 ` Juri Linkov
2022-09-21 19:06 ` Philip Kaludercic
0 siblings, 1 reply; 5+ messages in thread
From: Juri Linkov @ 2022-09-21 18:40 UTC (permalink / raw)
To: Philip Kaludercic; +Cc: Thuna, emacs-devel
>> I think it would be good to be able to add items to variables that hold
>> lists in `.dir-locals.el'. Maybe with the special form `(append
>> VARIABLE . ITEMS))'? Considering `auto-mode-alist' has its own special
>> form, I think the need for this already exists.
>
> While not exactly what you want, you can add a lisp expression and have
> it evaluated to the same effect. But yes, a proper feature would be
> nice to have.
Isn't (eval . (add-to-list 'VARIABLE ITEMS)) already short enough?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Appending items to variables in .dir-locals.el
2022-09-21 18:40 ` Juri Linkov
@ 2022-09-21 19:06 ` Philip Kaludercic
0 siblings, 0 replies; 5+ messages in thread
From: Philip Kaludercic @ 2022-09-21 19:06 UTC (permalink / raw)
To: Juri Linkov; +Cc: Thuna, emacs-devel
Juri Linkov <juri@linkov.net> writes:
>>> I think it would be good to be able to add items to variables that hold
>>> lists in `.dir-locals.el'. Maybe with the special form `(append
>>> VARIABLE . ITEMS))'? Considering `auto-mode-alist' has its own special
>>> form, I think the need for this already exists.
>>
>> While not exactly what you want, you can add a lisp expression and have
>> it evaluated to the same effect. But yes, a proper feature would be
>> nice to have.
>
> Isn't (eval . (add-to-list 'VARIABLE ITEMS)) already short enough?
AFAIK this won't check if VARIABLE is safe and the modification isn't
local.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-09-21 19:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-21 7:48 Appending items to variables in .dir-locals.el Thuna
2022-09-21 11:36 ` Philip Kaludercic
2022-09-21 18:40 ` Juri Linkov
2022-09-21 19:06 ` Philip Kaludercic
2022-09-21 11:39 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).