From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#36407: 27.0.50; `plist-get', `equal' etc. and circular "lists" Date: Thu, 27 Jun 2019 21:43:32 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000d08c9b058c550f4b" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="177606"; mail-complaints-to="usenet@blaine.gmane.org" To: 36407@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 27 23:45:15 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hgcCh-000jzL-1W for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Jun 2019 23:45:15 +0200 Original-Received: from localhost ([::1]:54896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgcCf-0006NG-DF for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Jun 2019 17:45:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34887) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgcCX-0006N2-0i for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 17:45:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgcCV-0007dE-Q0 for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 17:45:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54632) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hgcCU-0007cM-O3 for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 17:45:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hgcCU-0006Pn-Kq for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 17:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Jun 2019 21:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36407 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.156167185624577 (code B ref -1); Thu, 27 Jun 2019 21:45:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Jun 2019 21:44:16 +0000 Original-Received: from localhost ([127.0.0.1]:39943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgcBk-0006OL-4u for submit@debbugs.gnu.org; Thu, 27 Jun 2019 17:44:16 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:57621) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgcBi-0006OD-2p for submit@debbugs.gnu.org; Thu, 27 Jun 2019 17:44:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34712) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgcBg-0006J6-0F for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 17:44:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgcBe-0006q9-Hy for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 17:44:11 -0400 Original-Received: from mail-oi1-x230.google.com ([2607:f8b0:4864:20::230]:39163) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hgcBe-0006on-AP for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 17:44:10 -0400 Original-Received: by mail-oi1-x230.google.com with SMTP id m202so2723477oig.6 for ; Thu, 27 Jun 2019 14:44:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=XwArh3QsYXHdW9LkCzYr0/F2L9i4OBEpKdnPMXHdvV4=; b=O2wYuaXx/VSk8VQ+qd28xuxryVB7rHhC6lVKSWpw/myVa8PnAuST5MvqrcZDH66QUC F2g2EUWcqNyR7OK/g8DMttZckg459H6duckwkm7D42gI6kcHpS5vCDkU/dOv5Uuqdd6s NgsNRskysbb7Rubfi1B/3abgtYOpjHInGg0nOycVZF+s61AgwdmAgQcYfP3xBByr9Img 8CE7omUA+gtjrUB+KhKXcp4vSRfK1b7pUUW3su/dKJFfMrtDyuG7Q1x1MwcUGlC3/ymc nQsOQR7/xBn79SKTcA+X0Mae610IFHzfvUriKOqamiaD/X3vipxzGg2EVVn4x3p88s+u 3jwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=XwArh3QsYXHdW9LkCzYr0/F2L9i4OBEpKdnPMXHdvV4=; b=uUeQsa/mUk291V91FL5wTbsqXYw7R3qYSTDycbs7fd32y16dU6ihTO8bVV2mcyIcjL 4Iz4lQQV7tt4RWSQwcwhG3Kws4dD6RO2WQiYuKa6gU99paZaMI0Xfr6SxvK//NpYBqUK pp6sXK3n8k4eOkHvKO9xO0nvnmamHCcO3M30LA6pC4kgicDH/jz5pJnJhTATYaFim7pm BOUN62x5lVCSAlAUF9li4/y5KP0YXXoqk5xVP3EjayPTXSG9egxYBMPz8zzJdXNy0J5b xeKJfW9lvqMuRSA10/tFe3reCItNabeYQIVfm2vatVjzG/SPb3U8ZwQbfqzI2XH9QwPo 5ZvQ== X-Gm-Message-State: APjAAAXVvTq+6dU/A74ERNrgZR0M/dmMEhdRVT0+KNhE7a2vkekJxDVy /lwUGwkFLz41IFQHpmpZm7JbO3z9FIGf7vLa35qYPlUM7/M= X-Google-Smtp-Source: APXvYqysfT+UGskAjOoaMD9XaUdJ1RXTXftv6Up2aLHLGxh11lwxDRe9AG8Qek5qD8ms4QU8qMXrXNNEk9Xtaalawow= X-Received: by 2002:aca:4790:: with SMTP id u138mr3741362oia.44.1561671848965; Thu, 27 Jun 2019 14:44:08 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:161664 Archived-At: --000000000000d08c9b058c550f4b Content-Type: text/plain; charset="UTF-8" plist-get currently contains this code: FOR_EACH_TAIL_SAFE (tail) { 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. --000000000000d08c9b058c550f4b Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Remove-unnecessary-tortoise-checks.patch" Content-Disposition: attachment; filename="0001-Remove-unnecessary-tortoise-checks.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WVBFIChOSUxQICh0YWlsKSwgUXBs aXN0cCwgcGxpc3QpOwogICBMaXNwX09iamVjdCBuZXdjZWxsID0gbGlzdDIgKHByb3AsIHZhbCk7 CkBAIC0zMDQ1LDggKzMwMzcsNiBAQCBERUZVTiAoInBsaXN0LW1lbWJlciIsIEZwbGlzdF9tZW1i ZXIsIFNwbGlzdF9tZW1iZXIsIDIsIDIsIDAsCiAgICAgICB0YWlsID0gWENEUiAodGFpbCk7CiAg ICAgICBpZiAoISBDT05TUCAodGFpbCkpCiAJYnJlYWs7Ci0gICAgICBpZiAoRVEgKHRhaWwsIGxp LnRvcnRvaXNlKSkKLQljaXJjdWxhcl9saXN0ICh0YWlsKTsKICAgICB9CiAgIENIRUNLX1RZUEUg KE5JTFAgKHRhaWwpLCBRcGxpc3RwLCBwbGlzdCk7CiAgIHJldHVybiBRbmlsOwpkaWZmIC0tZ2l0 IGEvc3JjL2pzb24uYyBiL3NyYy9qc29uLmMKaW5kZXggMjMyMzRjNzY3ZC4uNDg4MjBhMWNiMCAx MDA2NDQKLS0tIGEvc3JjL2pzb24uYworKysgYi9zcmMvanNvbi5jCkBAIC00MDQsNyArNDA0LDYg QEAgbGlzcF90b19qc29uX3RvcGxldmVsXzEgKExpc3BfT2JqZWN0IGxpc3AsCiAgICAgICAgICAg ICAgIHRhaWwgPSBYQ0RSICh0YWlsKTsKICAgICAgICAgICAgICAgQ0hFQ0tfQ09OUyAodGFpbCk7 CiAgICAgICAgICAgICAgIHZhbHVlID0gWENBUiAodGFpbCk7Ci0gICAgICAgICAgICAgIGlmIChF USAodGFpbCwgbGkudG9ydG9pc2UpKSBjaXJjdWxhcl9saXN0IChsaXNwKTsKICAgICAgICAgICAg IH0KICAgICAgICAgICBlbHNlCiAgICAgICAgICAgICB7Ci0tIAoyLjIwLjEKCg== --000000000000d08c9b058c550f4b Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Make-equal-symmetric.patch" Content-Disposition: attachment; filename="0001-Make-equal-symmetric.patch"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