Subject: Re: bug#47572: 27.1; (setf (map-elt m key) value) should return value but does not

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 06 May 2021 13:31:42 +0200

Matt Armstrong <[email-masked]> writes:

> Attached is an ert test that demonstrates the problem.  The crux is
> that:
>
>   (require 'map)
>   (setf (map-elt m key) value)
>
> returns VALUE only in the hash table implementation.  `setf' should
> return VALUE in all cases.
>
> For alists it returns either nil or (key . value) depending on whether a
> key is inserted or udpated in place.  For plists it returns similarly
> variable things.

Thanks; I've included your tests in Emacs 28, and fixed the map-elt code
(hopefully; it passes all the tests, at least).

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