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: Thu, 25 Aug 2022 15:33:45 -0400 Message-ID: References: <877d2xdjdi.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="14877"; 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 Thu Aug 25 21:35:52 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 1oRIds-0003gl-5v for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Aug 2022 21:35:52 +0200 Original-Received: from localhost ([::1]:39566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oRIdr-0007g7-4F for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Aug 2022 15:35:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39148) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRId4-0007fL-8h for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 15:35:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33375) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oRId3-0002nd-VC for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 15:35:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oRId3-0001fs-QK for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 15:35: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: Thu, 25 Aug 2022 19:35: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.16614560436346 (code B ref 57397); Thu, 25 Aug 2022 19:35:01 +0000 Original-Received: (at 57397) by debbugs.gnu.org; 25 Aug 2022 19:34:03 +0000 Original-Received: from localhost ([127.0.0.1]:51349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRIc7-0001eI-8W for submit@debbugs.gnu.org; Thu, 25 Aug 2022 15:34:03 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:7864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRIc5-0001dm-0w for 57397@debbugs.gnu.org; Thu, 25 Aug 2022 15:34:01 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 942568007C; Thu, 25 Aug 2022 15:33:54 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7AAA78043C; Thu, 25 Aug 2022 15:33:52 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1661456032; bh=F5D2Wo6J8dElmp4kqmjiqPbJ6IzFhSEdGCpWoNF7kuM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=nsFVo9vPhiRgs+54xI0kdFOVZwfoGmKVX7JurLszTrlPbrM51xOI7uPb2JSr/+0FR 0/d+YHuTVFi8zRlcWEvJ0k35+nDdMr0TRSWDxTEDDJxo+UJfv79gBzOFohiOvidsgI Z2XDAaMAS6R2Td9ug8Vs4eRn2opXnkok1O5q7tEysDsWFULJ7KUNzj0VuKePb4zhvP A8iIQAKoe/PcuSGMqQh6Q/EwiiX9OXTYDBDhMRbhlZ9kagjhuMtNnz0ue80VV6sZu7 c6t6UMit1BmDIP4pPenaTTFfCjv5ekR2EtuM4Nrim290z9+nvQWZTrA6VAnBl/+TmG d7r3IJcryUikA== Original-Received: from alfajor (66-163-28-139.ip.tor.radiant.net [66.163.28.139]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id EAD741204E9; Thu, 25 Aug 2022 15:33:51 -0400 (EDT) In-Reply-To: <877d2xdjdi.fsf@web.de> (Michael Heerdegen's message of "Thu, 25 Aug 2022 06:42:17 +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:240746 Archived-At: > to support symbol macros better: > > #+begin_src emacs-lisp > (defun cl--letf (bindings simplebinds binds body) > ;; It's not quite clear what the semantics of cl-letf should be...10.. > (if (null bindings) > (if (and (null binds) (null simplebinds)) (macroexp-progn body)..20..) > (let* ((binding (car bindings)) > (place (macroexpand (car binding) macroexpand-all-environment)));<--!! > (gv-letplace (getter setter) place..12..)))) > #+end_src > > I think this is an error in the general case. It's at least always > wrong when (car PLACE) is a macro name with a gv spec defined. Indeed, defining a gv spec for a macro is fiddly. > 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. But regardless of this, we should probably turn `gv-synthetic-place` into a function so it's more robust. Stefan