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

From: "Basil L. Contovounesios" <[email-masked]>
Date: Sun, 04 Apr 2021 19:31:48 +0100

found 47572 25.3.1
quit

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.

Indeed, this bug seems to be present since map.el was introduced in
Emacs 25.

> For plists it returns similarly variable things.
>
> Here is the output I get from the attached test.  The .el is attached afterwards.

Would you be interested in also providing a patch for map.el?

Thanks,

-- 
Basil