Subject: bug#34941: 27.0.50; map-inplace and map-not-inplace errors

From: Michael Heerdegen <[email-masked]>
Date: Fri, 22 Mar 2019 03:20:44 +0100

Hi,

in *scratch* I eval for testing

  (map-put! nil 1 1)

and get the error message

  map-put!: Cannot modify map in-place: %S: ((1 . 1))

I guess this "%S" in the error definition doesn't work as intended, it
is printed literally - likewise for the map-inplace error I guess.

And IMHO the code outputs the value of the wrong variable:

      (let ((oldmap map))
        (setf (alist-get key map key nil (or testfn #'equal)) value)
        (unless (eq oldmap map)
          (signal 'map-not-inplace (list map)))))
                                         ^^^

with OLDMAP that would make more sense IMO.  To be clear, the error
message I would expect would be

  map-put!: Cannot modify map in-place: nil

TIA,

Michael.

In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
 of 2019-03-21 built on drachen
Repository revision: acf2e0691e64b94185c493defb281ef280087d7a
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12003000
System Description: Debian GNU/Linux buster/sid