unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#34941: 27.0.50; map-inplace and map-not-inplace errors
@ 2019-03-22  2:20 Michael Heerdegen
  2019-03-22  9:34 ` Nicolas Petton
  2019-03-23  0:14 ` Michael Heerdegen
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Heerdegen @ 2019-03-22  2:20 UTC (permalink / raw)
  To: 34941; +Cc: Nicolas Petton


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






^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-03-27  9:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-22  2:20 bug#34941: 27.0.50; map-inplace and map-not-inplace errors Michael Heerdegen
2019-03-22  9:34 ` Nicolas Petton
2019-03-22 15:09   ` Michael Heerdegen
2019-03-24 20:54     ` Nicolas Petton
2019-03-27  9:23     ` Nicolas Petton
2019-03-23  0:14 ` Michael Heerdegen
2019-03-23  1:59   ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).