From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#57397: cl-letf blindly macroexpands places Date: Sat, 27 Aug 2022 10:48:17 -0400 Message-ID: References: <877d2xdjdi.fsf@web.de> <87leralavg.fsf@web.de> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="424"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 57397@debbugs.gnu.org, Lars Ingebrigtsen To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 27 16:49:15 2022 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 1oRx7b-000AQf-Bv for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Aug 2022 16:49:15 +0200 Original-Received: from localhost ([::1]:38512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oRx7a-000514-CH for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Aug 2022 10:49:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRx7O-00050l-AJ for bug-gnu-emacs@gnu.org; Sat, 27 Aug 2022 10:49:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38788) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oRx7O-0007Ug-1Y for bug-gnu-emacs@gnu.org; Sat, 27 Aug 2022 10:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oRx7N-0008FI-Pg for bug-gnu-emacs@gnu.org; Sat, 27 Aug 2022 10:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Aug 2022 14:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57397 X-GNU-PR-Package: emacs Original-Received: via spool by 57397-submit@debbugs.gnu.org id=B57397.166161171431662 (code B ref 57397); Sat, 27 Aug 2022 14:49:01 +0000 Original-Received: (at 57397) by debbugs.gnu.org; 27 Aug 2022 14:48:34 +0000 Original-Received: from localhost ([127.0.0.1]:56770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRx6v-0008Ec-Oo for submit@debbugs.gnu.org; Sat, 27 Aug 2022 10:48:34 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:28506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRx6s-0008EM-Ac for 57397@debbugs.gnu.org; Sat, 27 Aug 2022 10:48:32 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 722894411C7; Sat, 27 Aug 2022 10:48:24 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id CE8B144115A; Sat, 27 Aug 2022 10:48:18 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1661611698; bh=c0Y6PfMqu1yS2n9Zt3IFhRCo5/94iWK6jxgKXyz+QsI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=kqzVAvPiYDzHMRVP8SA4q7fLjX4FGjJQCzMllicI6NWn/kBtLczBV4nSPXybIZh7G tJ9VeG/LznELgpmkjJCkzcNnaW/vr0nGnae37lon0FcutEu7ItDeZSnQprWAy9XxfK slMVX9jfPZjbTcGqk4Oxir2B1HaUFx/t+dkSssbNFR2ZXXBREpWBJy3MF12Mm99D8V 9WEDyfyZJX+YkU7kKpo0ibcD2qCK9CwzayYmGVaCoz90IQmehts7XJuBkdzJyNOCK9 P5Yb3VFRGxci8JxSA5xdx0QeP5q1WyN83VULgWF0BGKq/3ZVEHdAfJVlrOew87nFDs cYu1Qfhvooavw== Original-Received: from pastel (unknown [45.72.195.111]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9D5291202DA; Sat, 27 Aug 2022 10:48:18 -0400 (EDT) In-Reply-To: <87leralavg.fsf@web.de> (Michael Heerdegen's message of "Sat, 27 Aug 2022 03:43:15 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:240934 Archived-At: >> > Maybe it's enough to expand only symbol macros? >> Yes, that should still cover the original need in bug#26073 without >> breaking your use case. > Was it necessary to really expand symbol macros to fix that bug, or is > the purpose only to handle the following `symbolp' test correctly? No the problem shows up in the `gv-letplace` that follows immediately, so by the time we get to the `symbolp` test it's too late. But I suspect that the better fix is to skip the macroexpand call here and to change `gv-get` so as to do a `macroexpand-1` call even if its arg is a `symbolp`. >> But regardless of this, we should probably turn `gv-synthetic-place` >> into a function so it's more robust. > Why is it a macro? Beats me. I tried to ask the original author but he was not available for comments. > Seems to work quite as well (using the same body and > gv-spec) when defined as a function. The only downside is that the code is less efficient (the getter has to construct the closure of the setter, then call `gv-synthetic-place` which then just throws it away) but that should be easy to fix with a compiler macro. Stefan