Subject: Re: bug#75170: add-to-alist: new function

From: Robert Pluim <[email-masked]>
Date: Wed, 22 Jan 2025 09:30:57 +0100

>>>>> On Tue, 21 Jan 2025 12:50:16 -0600, Stefan Kangas <[email-masked]> said:

    Stefan> Robert Pluim <[email-masked]> 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
--