bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#33309: Add flatten-list?


From: Michael Albinus
Subject: bug#33309: Add flatten-list?
Date: Mon, 10 Dec 2018 09:44:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Alex Branham <address@hidden> writes:

Hi Alex,

>> 1. Even Common Lisp doesn't bother with one.
>>    (And there are lots of Common Lisp
>>    functions I'd sooner see added to Emacs.)
>>
>> 2. It's trivial to define when needed, and
>>    there are not a lot of existing uses of it.
>
> Like I said, there's at least four implementations in Emacs of the same
> thing, and who knows how many in 3rd-party packages in ELPA or
> elsewhere. I'm not sure what you consider "a lot," but DRY kicks in
> around three times for me.

For the records, in Tramp I need also this function. I'm just going to
define it myself (derived from eshell-flatten-list), but I'll happily
switch to a common flatten-list.

>> 3. The functions you mention do not all behave
>>    the same.  Even their arg lists are not the
>>    same.  (But sure, they could all be made to
>>    use a common version, if that were important.)
>>
>> 4. (flatten-list 42) => (42)
>>
>>    The doc string says nothing about the case
>>    where the argument LIST (a bad name here)
>>    is not a list.  And if the arg need not be
>>    a list then "-list" in the function name
>>    is not good.
>
> Right, I didn't mean to imply that the one I sent be added in its
> current state. I just meant to kick off discussion. I basically
> copy/pasted it from somewhere (lpr, I think?). If added it'll need to be
> properly documented and perhaps message-flatten-list and the others made
> obsolete aliases.

Unless nobody else objects, I'd like to encourage you to prepare a patch
to be added to the master branch. This could include the replacement of
the existing implementations.

> Thanks,
> Alex

Thanks, and best regards, Michael.





reply via email to

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