[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Improve find-sibling-rules option type
From: |
Mauro Aranda |
Subject: |
Re: [PATCH] Improve find-sibling-rules option type |
Date: |
Sun, 24 Sep 2023 06:44:48 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 |
On 24/9/23 02:33, Eli Zaretskii wrote:
>> Cc: "Paul W. Rankin" <hello@paulwrankin.com>
>> Date: Sun, 24 Sep 2023 11:03:27 +1000
>> From: "Paul W. Rankin" via "Emacs development discussions."
<emacs-devel@gnu.org>
>>
>> * lisp/files.el (find-sibling-rules): use alist with tags for custom
>> type
>> ---
>> This is preferable than having to enter a sexp as a user option.
>
> Thanks.
>
> Mauro, any comments?
In particular, AFAICT there could be more than one EXPANSION. In that
case, :value-type should be a repeat of strings, not just a string. In
addition, regexp should be used as the :key-type type. (I see that
Philip already spotted this)
In general, when converting from sexp to a more specific type, I think
we have to take extra precaution and check the code for how the
variable it's used (i.e., the docstring might not tell the whole story).
If ever in doubt, then it might be better and safer to offer a choice
with the more specific type first, and keep sexp as a catch-all
alternative.