GNU bug report logs - #75170
add-to-alist: new function

Previous Next

Package: emacs;

Reported by: Roland Winkler <winkler <at> gnu.org>

Date: Sun, 29 Dec 2024 05:35:02 UTC

Severity: wishlist

Full log


Message #184 received at 75170 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: winkler <at> gnu.org, monnier <at> gnu.org, "Alfred M. Szmidt" <ams <at> gnu.org>,
 75170 <at> debbugs.gnu.org, eliz <at> gnu.org, acorallo <at> gnu.org
Subject: Re: bug#75170: add-to-alist: new function
Date: Wed, 22 Jan 2025 09:30:57 +0100
>>>>> On Tue, 21 Jan 2025 12:50:16 -0600, Stefan Kangas <stefankangas <at> gmail.com> said:

    Stefan> Robert Pluim <rpluim <at> gmail.com> writes:
    >> map.el assumes that a list that starts with an atom is a plist, and
    >> any other list is an alist. alist-get and assoc obviously disagree.

    Stefan> This is a tangent, but I'd be curious to know how much use map.el is
    Stefan> getting.  It doesn't seem to be too popular in emacs.git at least.

I knew that something like `map-let' and `map-delete' existed, but
couldnʼt remember their names, and couldnʼt find them (the elisp
manual talks about 'sequences', but that covers lists and arrays, and
talks about "seq.el"). Perhaps we need to add a node to (info "(elisp)
Lists") covering "map.el"?

Also:

(defalias 'plist-delete #ʼmap-delete)

might be a good idea, to prevent people (me :-)) reinventing it.

Robert
-- 




This bug report was last modified 142 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.