[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36407: 27.0.50; `plist-get', `equal' etc. and circular "lists"
From: |
Pip Cet |
Subject: |
bug#36407: 27.0.50; `plist-get', `equal' etc. and circular "lists" |
Date: |
Thu, 27 Jun 2019 21:43:32 +0000 |
plist-get currently contains this code:
FOR_EACH_TAIL_SAFE (tail)
{
<check for success>
tail = XCDR (tail);
if (EQ (tail, li.tortoise))
break;
}
I don't understand why the last two lines are there. They're
unnecessary for proper plists; for circular plists, they result in
unintuitive behavior; and they depend on details of the
FOR_EACH_TAIL_SAFE implementation.
Can someone enlighten me?
As a tangential issue, shouldn't `equal' be symmetric?
(let* ((l1 '#1=(0 1 2 . #1#))
(l2 '(0 1 2 0 1 2 . #1#)))
(equal l2 l1) => t
(equal l1 l2) => "List contains a loop" error.
(plist-get l2 1) => 2
(plist-get l1 1) => nil
Patches attached.
0001-Remove-unnecessary-tortoise-checks.patch
Description: Text Data
0001-Make-equal-symmetric.patch
Description: Text Data
- bug#36407: 27.0.50; `plist-get', `equal' etc. and circular "lists",
Pip Cet <=