GNU bug report logs - #50927
Considering only entries with unique keys in map.el?

Previous Next

Package: emacs;

Reported by: Okamsn <okamsn <at> protonmail.com>

Date: Fri, 1 Oct 2021 00:56:01 UTC

Severity: normal

Tags: notabug

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Okamsn <okamsn <at> protonmail.com>
Cc: 50927 <at> debbugs.gnu.org
Subject: bug#50927: Considering only entries with unique keys in map.el?
Date: Fri, 01 Oct 2021 14:48:07 +0200
Okamsn <okamsn <at> protonmail.com> writes:

> Some kinds of maps, such as alists and plists, can contain duplicate
> keys.  These duplicates are effectively ignored in functions like
> `map-elt`, but are not ignored in functions like `map-do` or `map-length`.

As others have noted, this is part of how alists (etc) work, and we
can't change that -- it would break tons of code.

If you don't want duplicate keys, then you should only use functions
like `map-insert' etc to work on the maps.

So I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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

Previous Next


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