GNU bug report logs - #47572
27.1; (setf (map-elt m key) value) should return value but does not

Previous Next

Package: emacs;

Reported by: Matt Armstrong <matt <at> rfc20.org>

Date: Fri, 2 Apr 2021 21:09:02 UTC

Severity: normal

Tags: fixed

Found in versions 27.1, 25.3.1

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Matt Armstrong <matt <at> rfc20.org>
Cc: 47572 <at> debbugs.gnu.org
Subject: Re: bug#47572: 27.1; (setf (map-elt m key) value) should return
 value but does not
Date: Thu, 06 May 2021 13:31:42 +0200
Matt Armstrong <matt <at> rfc20.org> 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




This bug report was last modified 4 years and 72 days ago.

Previous Next


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