bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25929: 25.2; map-delete doesn't delete permanently 1st alist elt


From: Tino Calancha
Subject: bug#25929: 25.2; map-delete doesn't delete permanently 1st alist elt
Date: Thu, 02 Mar 2017 16:17:57 +0900

X-Debbugs-CC: <address@hidden>

(cl-loop for i below 3 collect
  (let ((map (list (cons 0 3)
                   (cons 1 4)
                   (cons 2 5))))
    (map-delete map i)
    (null (map-elt map i))))
=> (nil t t) ; The first pair, i.e. '(0 . 3) is not permanently deleted.

I've used the word 'permantly' because it seems it is temporary
deleted:

(cl-loop for i below 3 collect
  (let ((map (list (cons 0 3)
                   (cons 1 4)
                   (cons 2 5))))
    (null (map-elt
           (map-delete map i)
           i))))
=> (t t t)

*) It happens just for alist, other maps are fine.
*) The test suite doesn't detect this issue because `test-map-delete'
   happen to delete just the 2rd element of the maps.

In GNU Emacs 25.2.3 (x86_64-pc-linux-gnu, GTK+ Version 3.22.7)
 of 2017-03-02
Repository revision: 640661838dbba8185990e839712c91a14641ddf3





reply via email to

[Prev in Thread] Current Thread [Next in Thread]