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#65017: 29.1; Byte compiler interaction with cl-lib function objects, removes symbol-function Date: Sat, 12 Aug 2023 14:28:44 -0400 Message-ID: References: <8B08E514-B2D5-48F5-BA90-4F5A9492F8F9@gmail.com> 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="30421"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , 65017@debbugs.gnu.org, Eric Marsden To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 12 20:29:21 2023 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 1qUtMW-0007iT-VM for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Aug 2023 20:29:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qUtMG-00053e-JD; Sat, 12 Aug 2023 14:29:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qUtME-000534-Jh for bug-gnu-emacs@gnu.org; Sat, 12 Aug 2023 14:29:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qUtME-0002wS-BY for bug-gnu-emacs@gnu.org; Sat, 12 Aug 2023 14:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qUtMD-0004od-UH for bug-gnu-emacs@gnu.org; Sat, 12 Aug 2023 14:29: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, 12 Aug 2023 18:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65017 X-GNU-PR-Package: emacs Original-Received: via spool by 65017-submit@debbugs.gnu.org id=B65017.169186493418489 (code B ref 65017); Sat, 12 Aug 2023 18:29:01 +0000 Original-Received: (at 65017) by debbugs.gnu.org; 12 Aug 2023 18:28:54 +0000 Original-Received: from localhost ([127.0.0.1]:57421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUtM5-0004o9-Tk for submit@debbugs.gnu.org; Sat, 12 Aug 2023 14:28:54 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:41455) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUtM4-0004nt-FU for 65017@debbugs.gnu.org; Sat, 12 Aug 2023 14:28:53 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B90D11000EF; Sat, 12 Aug 2023 14:28:46 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1691864925; bh=Wzlbu/+9kdyJ1D+wMcgOW7iaF38j9CCYY4db0FQSSHE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=enPKWvX6K7+x4zE1sJLn6WJO9NzAToh+X2E8C0FES6aZSdLa+iDRCW3INMh8bLExu QRRxZBgGv+dWgePvWgvWQBxBZ56Tlt4QWwPZdDPD9PEBO81/DMbJ5nhzFJ4TzwzCc7 KPW7/XttzEX2RYCjJ/sKzHLiclO5uTZoOb3yz7Zg+L4IT1YkpiA/OayNY0HC4fuZNi 8vMERsW5Wyqyvn8TpbJ2AE17Dylje59BtnPdenFJcW0W82b9Pjf9Q737yLSCVkXyVp tum7eXr90OnMX7MtmxJzT6Sb/3z8wb4o8MO8SCtqMot8Et+KUPQo36/gvYpXUwukYq XmBR2voztWMRA== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id AA39E1000AD; Sat, 12 Aug 2023 14:28:45 -0400 (EDT) Original-Received: from pastel (69-165-141-248.dsl.teksavvy.com [69.165.141.248]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7CB2D120281; Sat, 12 Aug 2023 14:28:45 -0400 (EDT) In-Reply-To: (Alan Mackenzie's message of "Sat, 12 Aug 2023 16:46:42 +0000") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:267327 Archived-At: > The code is substituting (function F) with a non-eq (function F). > You're saying this has some effect in macroexp--expand-all. I can't see > that, yet. All I see is FORM, (function F), being substituted by a > different (function F) in L327 of macroexp.el. Then there are the pcase > arms for (function (lambda ....)) and for (function ....). Are either > of these pcase arms affected by the "expansion" of FORM? If so, how? > Or am I looking at the wrong place entirely? `cl-flet` needs to replace (function LOCALFUN) with LOCALVAR within the body of the let, for those LOCALFUNs defined in the `cl-flet`. That's easy to do with a macro. But it also should leave all other uses of `function` untouched. That's the part that does not map well to macros since macros are repeatedly expanded until they return something that's not a macro call. >> It's not a function but a special operator, which is thus handled in >> a hard-coded way by `macroexp--expand-all`. > Is it the case that this hard-coded handling for function is prevented > by the macro "expansion" of (function F)? Yes, we first expand the macros and then try to handle the result which should be one of the hard-coded cases (or is otherwise assumed to be a function call). Stefan