]> git.eshelyaron.com Git - emacs.git/commit
* lisp/emacs-lisp/map.el: Avoid special casing lists.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 17 Dec 2018 19:51:01 +0000 (14:51 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 17 Dec 2018 19:51:01 +0000 (14:51 -0500)
commit55838e4e6a176317367c6759e0520395e80c856f
tree49f0293f48e1084e076a936e8b3476f35efe7cf5
parent2c3f7f9c45985c36fd9e86c334b49b10e8c8c270
* lisp/emacs-lisp/map.el: Avoid special casing lists.

(map-not-inplace, map-inplace): New errors.
(map-insert): New generic function.
(map-put!): Signal map-not-inplace rather than a generic 'error'.
(map-elt): Use map-not-inplace and map-insert to avoid hardcoding
a special case for lists.

* test/lisp/emacs-lisp/map-tests.el (test-map-put!): Rename from
test-map-put.  Also test the errors signaled.
etc/NEWS
lisp/emacs-lisp/map.el
test/lisp/emacs-lisp/map-tests.el