From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Newsgroups: gmane.emacs.bugs Subject: bug#40692: 28.0.50; Constant list modified inside function Date: Sun, 19 Apr 2020 09:08:37 +0200 Message-ID: <87d08454wa.fsf@gmail.com> References: <57990C74-5CA1-42E6-83EC-7F6858AFD0E7@gmail.com> <87ftd1883t.fsf@gmail.com> <87sgh0xvdt.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="1680"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Ivan Andrus , 40692@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 19 09:09:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jQ44l-0000L5-PY for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Apr 2020 09:09:11 +0200 Original-Received: from localhost ([::1]:38522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQ44k-0002p8-PJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Apr 2020 03:09:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54034) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQ44c-0002oN-U4 for bug-gnu-emacs@gnu.org; Sun, 19 Apr 2020 03:09:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jQ44c-0004Re-FS for bug-gnu-emacs@gnu.org; Sun, 19 Apr 2020 03:09:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60685) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jQ44c-0004RV-3B for bug-gnu-emacs@gnu.org; Sun, 19 Apr 2020 03:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jQ44b-0002xJ-US for bug-gnu-emacs@gnu.org; Sun, 19 Apr 2020 03:09:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Apr 2020 07:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40692 X-GNU-PR-Package: emacs Original-Received: via spool by 40692-submit@debbugs.gnu.org id=B40692.158728008311286 (code B ref 40692); Sun, 19 Apr 2020 07:09:01 +0000 Original-Received: (at 40692) by debbugs.gnu.org; 19 Apr 2020 07:08:03 +0000 Original-Received: from localhost ([127.0.0.1]:43998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQ43f-0002vy-Av for submit@debbugs.gnu.org; Sun, 19 Apr 2020 03:08:03 -0400 Original-Received: from mail-wm1-f66.google.com ([209.85.128.66]:54593) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQ43d-0002vR-1f for 40692@debbugs.gnu.org; Sun, 19 Apr 2020 03:08:01 -0400 Original-Received: by mail-wm1-f66.google.com with SMTP id h2so7267191wmb.4 for <40692@debbugs.gnu.org>; Sun, 19 Apr 2020 00:08:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-transfer-encoding; bh=bsT6erp4RB04oAC4ONDUwcDdD21tjQJFdMGSZNMdRZQ=; b=b/ifjB6DEPJF7MawgVRCBnNoFCTJ+Ns6IlD11cepxr3Lnmc14VVOzx83ghodOY+1+u vQLTAWu2FQQ0UPx5uXRJGXB/pmBkzAqJxyIPdaCJ3R+W66YQtl02OGxEFd52ccPcqAUV lhLJcNfk2hIGD/DwvgP7c9lA4nJ0j7NndkAyVgsFbj0PW5GF+9ILhOVCYQVH6bnydD1E MEZ17ZLFbu+MdHOULCI7aqPV5aVH8Y2+ZEvQdBcd+97jjxqNoh+1Pz1HcbFgcZTwZUZJ u8eAgJqZ1x1gcnnoRA0up/kqJ1sSi7zyny7SQ1CsRJESefNtr1vqEoZZqsxu+J6mE93a FEJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-transfer-encoding; bh=bsT6erp4RB04oAC4ONDUwcDdD21tjQJFdMGSZNMdRZQ=; b=r7fegx461iLtiH52Y+eGWr0YJFVHA6tda8V0Q0xsI3CkTjLb7iGS77dWTQriHcZ0/x O8I8mtmPJL2FfXsaalVZNfZ9te2q82gdITiZkyialE/yZjHNpWmroM5qzoKK+FZZYBm0 miAzWm7exhdo96KUHnsY8W1oFMRJeBBDo6fNN+J5pJkJcmZ7nV1X8QJj4jvWBPniHaxQ Aoje9jqguMKxGhbPp1HzAKxgRb001vSQzuVmOjiLFKVKQFQ1VxYW/rt3nN2pDN0DiepY ysrdHYj0YjVZE3nEp+GB3QQE19U/mBbBQeiH4kfNN7iQXpe93yMGKnnORBD08FCDm82N uPLw== X-Gm-Message-State: AGi0PuYzfCIv742fGz11a0WExSL9NevoVLLE+37eHUKeIY8M/BM5ceGb NYyP/doMQvZm1cTaYgFqd+w= X-Google-Smtp-Source: APiQypIFJaMXvaZsnfSrQNiqIJhOgIm/C+yr2GpB289w+M2kKWJRgq6SDvxrGL9noUs/7fjEbm3tnw== X-Received: by 2002:a05:600c:2214:: with SMTP id z20mr12478428wml.189.1587280075145; Sun, 19 Apr 2020 00:07:55 -0700 (PDT) Original-Received: from localhost ([185.112.167.47]) by smtp.gmail.com with ESMTPSA id o16sm39098205wrs.44.2020.04.19.00.07.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 00:07:54 -0700 (PDT) In-Reply-To: <87sgh0xvdt.fsf@web.de> (Michael Heerdegen's message of "Sun, 19 Apr 2020 00:49:02 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:178622 Archived-At: On Sun, 19 Apr 2020 00:49:02 +0200 Michael Heerdegen wrote: > =C5=A0t=C4=9Bp=C3=A1n N=C4=9Bmec writes: > >> > Now, I understand reference semantics of lists in general, but it >> > seems like this should be different. If this behavior is intentional, >> >> I think it is, although I admit I was confused by it, too, as I've >> somehow come to believe that e.g. `(list) macroexpands to (list 'list), >> but that's not the case: it expands to '(list). > > Yes, I had been bitten by this as well some time ago. I don't find the > discussion anymore, I had asked somewhere and the answer was that it's > an intended feature of backquote to produce an expansion like that. The "optimization" in absence of unquoted terms seems reasonable, and e.g. SBCL behaves the same. I find http://www.lispworks.com/documentation/HyperSpec/Body/02_df.htm somewhat ambiguous, but http://www.r6rs.org/final/html/r6rs/r6rs-Z-H-14.html is quite clear: "Semantics: If no unquote or unquote-splicing forms appear within the , the result of evaluating (quasiquote ) is equivalent to the result of evaluating (quote )." Also: "A quasiquote expression may return either fresh, mutable objects or literal structure for any structure that is constructed at run time during the evaluation of the expression. Portions that do not need to be rebuilt are always literal." --=20 =C5=A0t=C4=9Bp=C3=A1n