GNU bug report logs - #47368
28.0.50; map-elt returns nil without "deprecated" TESTFN

Previous Next

Package: emacs;

Reported by: dalanicolai <dalanicolai <at> gmail.com>

Date: Wed, 24 Mar 2021 22:54:02 UTC

Severity: normal

Tags: patch

Found in versions 28.0.50, 27.1

Fixed in version 28.1

Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Bug is archived. No further changes may be made.

Full log


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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Nicolas Petton <nicolas <at> petton.fr>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>,
 dalanicolai <dalanicolai <at> gmail.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 47368 <at> debbugs.gnu.org
Subject: Re: bug#47368: 28.0.50; map-elt returns nil without "deprecated"
 TESTFN
Date: Sat, 27 Mar 2021 20:37:23 +0000
Trying the CC again, this time with a hopefully correct address.
Sorry about the noise.

"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>
>>> What's a good way to solve this?  Obviously the map abstraction doesn't
>>> fit so super well for alists because unlike the other map type alists
>>> don't know "their" test function.  But disallowing alists that don't
>>> test with `eq' seems an unnecessary restriction.  Can we say that the
>>> argument is allowed only for alists?
>>
>> How 'bout always using `equal`?
>
> No objections here.  CCing Nicolas in case he has any comments.
>
> Just some code archaeology for more context:
>
> - Pre-Emacs-25 map-elt used assoc.
> - Emacs 25 map-elt used alist-get without TESTFN.
> - Emacs 26 map-elt gained TESTFN at the same time that alist-get did,
>   in https://bugs.gnu.org/27584.
> - Emacs 27 deprecated map-elt's TESTFN.

-- 
Basil




This bug report was last modified 3 years and 329 days ago.

Previous Next


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