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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 47368 <at> debbugs.gnu.org,
 dalanicolai <dalanicolai <at> gmail.com>, Nicolas Petton <nico <at> petton.fr>
Subject: Re: bug#47368: 28.0.50; map-elt returns nil without "deprecated"
 TESTFN
Date: Fri, 26 Mar 2021 18:57:13 +0000
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.