GNU bug report logs - #34941
27.0.50; map-inplace and map-not-inplace errors

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Fri, 22 Mar 2019 02:22:02 UTC

Severity: normal

Tags: fixed

Found in version 27.0.50

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: bug-gnu-emacs <at> gnu.org
Cc: Nicolas Petton <nicolas <at> petton.fr>
Subject: 27.0.50; map-inplace and map-not-inplace errors
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





This bug report was last modified 6 years and 47 days ago.

Previous Next


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