emacs-devel
[Top][All Lists]
Advanced

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

Re: Making `eglot-server-programs' a custom variable?


From: Philip Kaludercic
Subject: Re: Making `eglot-server-programs' a custom variable?
Date: Sat, 12 Nov 2022 09:40:23 +0000

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Philip Kaludercic <philipk@posteo.net>
>> Cc: jporterbugs@gmail.com,  arash@gnu.org,  emacs-devel@gnu.org,
>>   joaotavora@gmail.com
>> Date: Sat, 12 Nov 2022 08:45:38 +0000
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> >> My issue here is that while you can modify the list, when saved you will
>> >> store the entire modified list, and no the modifications you made on the
>> >> base variable.
>> >
>> > The way to do this is to have a basic value as a defvar, and store the
>> > corrections to that in a defcustom.
>> 
>> But in that case you need to load the library to get the default value,
>
> I don't see why.  And even if it's so, why is it a problem to load the
> library?

(I'm not just talking about Eglot right now)  If the default value is
defined in an non-autoloaded variable, you have to load the library to
access the value -- otherwise it simply wasn't loaded.

The "issue" here is just that loading everything you want to modify
during initialisation can get slow.

>> in which case you might as well store the default value in the
>> defcustom.
>
> But you already explained why storing in a defcustom doesn't solve the
> problem?  So why are you suggesting to do that anyway?

^^ I am not sure I explained that?  If you have to load the library to
get the default, writing

    (setopt foo (cons 'bar foo))

or

    (setopt foo (cons 'bar foo-default))

doesn't make much of a difference to me.

>> Also, I don't think this helps people who use the Customize
>> interface?
>
> Why doesn't it help?

Maybe I have missed something, if a user option has a `repeat' or
`alist' type, you can't just say "append this and that value to the end
of some other value".  All you get to modify is the entire list, and all
you get to store is the entire list.



reply via email to

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