emacs-devel
[Top][All Lists]
Advanced

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

Re: Easy Customization for Directory Local Variables


From: Mauro Aranda
Subject: Re: Easy Customization for Directory Local Variables
Date: Mon, 2 Oct 2023 07:06:27 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1

On 2/10/23 04:21, Eli Zaretskii wrote:
>> From: Juri Linkov <juri@linkov.net>
>> Cc: maurooaranda@gmail.com,  adam@alphapapa.net,  emacs-devel@gnu.org
>> Date: Mon, 02 Oct 2023 09:43:54 +0300
>>
>>>> There is no single prefix in files-x.el, but still names are quite
>>>> consistent.  So you could choose any prefix you think would be
>>>> internally consistent between all your new functions and variables.
>>>
>>> Why should this be in files-x.el? why not in custom.el, for example?
>>
>> If these functions implement a new customization type then
>> a good place would be in custom.el indeed.  Only functions
>> that write the dir-locals file could remain in files-x.el.
>
> Or how about cus-edit.el?  That's where many/most Customize commands
> live.

cus-edit.el seems like the better choice for me.  When icons were added,
the functions to customize icons went in there.  The only difference
here is that the new functionality doesn't write to the custom-file,
rather to some .dir-locals.el.

Apart from a function that writes to the .dir-locals-2.el file, all
functions that manipulate the .dir-locals file are from files-x.el.  The
mentioned function is nowhere near smart as modify-dir-local-variable,
but I had to code it since I didn't find that to be supported in
files-x.el.  Maybe modify-dir-local-variable and the like could be
taught to handle .dir-locals-2.el too.



reply via email to

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