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 #10 received at control <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
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: Sun, 04 Apr 2021 19:31:48 +0100
found 47572 25.3.1
quit

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.

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




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

Previous Next


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