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

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

bug#21268: 24.4; request: add-several-to-list


From: Lars Ingebrigtsen
Subject: bug#21268: 24.4; request: add-several-to-list
Date: Thu, 01 Aug 2019 21:59:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Michael Hoffman <gmane3-hoffman@sneakemail.com> writes:

> I would like to request the following function be added to subr.el:
>
> (defun add-several-to-list (list-var &rest elements)
>   "Add to LIST-VAR all ELEMENTS."
>   (dolist (element (reverse elements))
>     (add-to-list list-var element)))
>
> This is useful in adding many items to configuration variables without
> duplication, while keeping the same order, and avoiding repeated calls
> to add-to-list.

I think this seems like a too specialised function to be generally
useful.  And it's about the same thing as

(cl-delete-duplicates (append old new))

So I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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