]> git.eshelyaron.com Git - emacs.git/commit
Fix merging of ambiguous nil maps
authorBasil L. Contovounesios <contovob@tcd.ie>
Tue, 3 Aug 2021 23:48:50 +0000 (00:48 +0100)
committerBasil L. Contovounesios <contovob@tcd.ie>
Sat, 14 Aug 2021 10:24:54 +0000 (11:24 +0100)
commit37d48edf6d406a4730caa0393f7695de2bfadfcc
treef2fad1ae506e4def91c2c59be3b74ffaea3ee46b
parent1bfbb2b706db6a7ca9420b27d22a737deccdd5b0
Fix merging of ambiguous nil maps

* lisp/emacs-lisp/map.el: Bump version to 3.1.
(map--merge): New merging subroutine that uses a hash table in place
of lists, for both efficiency and avoiding ambiguities (bug#49848).
(map-merge): Rewrite in terms of map--merge.
(map-merge-with): Ditto.  This ensures that FUNCTION is called
whenever two keys are merged, even if they are not eql (which could
happen until now).  It also makes map-merge-with consistent with
map-merge, thus achieving greater overall predictability.
* etc/NEWS: Announce this weakening of guarantees.
* test/lisp/emacs-lisp/map-tests.el (test-map-merge)
(test-map-merge-with): Don't depend on specific orderings.  Test
that nil is correctly merged into a plist.
etc/NEWS
lisp/emacs-lisp/map.el
test/lisp/emacs-lisp/map-tests.el