emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and,


From: Dmitry Gutov
Subject: Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations
Date: Wed, 2 Jun 2021 02:04:56 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 01.06.2021 21:47, João Távora wrote:
In what way?  Really, all other things being equal, in what way is
threading arguments through lots of functions, bloating the arglist,
implementations and the docstrings of said functions, calling group-fun
multiple times and in multiple places in minibuffer.el better than_not_
doing those things?

Why do you think it forces you to "thread" them?

Firs of all, you can construct the same composite values you wanted using the current calling convention of the group-function. And then use them the same way.

Whether this results in better minibuffer.el code is debatable: your diff has more additions than deletions, and one rather long line.

OTOH, someone in a different codebase might appreciate that the group-function decouples the mapping to group names from the transformations of the items, and thus one can do the latter closer to where the items are printed, instead of having to "thread" the transformed values to their place of use (from where the grouping logic was called).

Using a text property is a handy workaround, but ideally one shouldn't have to use it.



reply via email to

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