From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#40827: 28.0.50; Macroexpansion at runtime Date: Sat, 25 Apr 2020 16:04:49 -0400 Message-ID: References: <874kt8snsq.fsf@matem.unam.mx> <87sggrfwo0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="118151"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Omar =?UTF-8?Q?Antol=C3=ADn?= Camarena , 40827@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 25 22:06:16 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 1jSR43-000Ub6-B3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Apr 2020 22:06:15 +0200 Original-Received: from localhost ([::1]:46752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSR41-0000Ec-V6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Apr 2020 16:06:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38328) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSR3q-0000EU-PW for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2020 16:06:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSR3q-0006JG-B3 for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2020 16:06:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48860) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jSR3p-0006Hx-VU for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2020 16:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jSR3p-0005ns-PE for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2020 16:06: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, 25 Apr 2020 20:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40827 X-GNU-PR-Package: emacs Original-Received: via spool by 40827-submit@debbugs.gnu.org id=B40827.158784510322234 (code B ref 40827); Sat, 25 Apr 2020 20:06:01 +0000 Original-Received: (at 40827) by debbugs.gnu.org; 25 Apr 2020 20:05:03 +0000 Original-Received: from localhost ([127.0.0.1]:60406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSR2t-0005mY-E7 for submit@debbugs.gnu.org; Sat, 25 Apr 2020 16:05:03 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:19691) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSR2r-0005lv-OD for 40827@debbugs.gnu.org; Sat, 25 Apr 2020 16:05:02 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 4B4D881144; Sat, 25 Apr 2020 16:04:56 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 768D7810EF; Sat, 25 Apr 2020 16:04:50 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1587845090; bh=BwNWXCCRzFaDTPZcCBc/eN0RK7jsXP83Z3YHFHRUDKI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=GU0Lk35DWGNgH0DdWe1u+8rwAOXMVmAtJRv6GdpEPPwcwYgzKKmwUVNQrnDtODfIm a407ymWoNOKkCAUIBK5GcvVfbsfpTu1gdNs2jF2kQg9iJkt4STHlPYVnuetCJnpvC8 8BDEiwG7H1ZrTBQkMFqquIUgUlZMsG1P/OEzxaVnDnb4PbxrleuOem7jTxe7H0qQAq n/66++rkN3bcZbgFCbRtAJ0hfIqCLIIjJVX7AOpbOd7G6Li8LFpvewgnV7Xw7tav4I thI2w3PQESboaEUzPW/KVL0jRzexH2HjxpvvHQ0OtDky7Wnio024SpTvCLDYDCmWV+ TZdwcMYCPF/VA== Original-Received: from alfajor (unknown [104.247.241.114]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 41F5A120497; Sat, 25 Apr 2020 16:04:50 -0400 (EDT) In-Reply-To: <87sggrfwo0.fsf@gmail.com> (Noam Postavsky's message of "Sat, 25 Apr 2020 10:49:03 -0400") 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:179030 Archived-At: >>> Occasionally problems result from the fact that a macro call is >>> expanded each time it is evaluated in an interpreted function, but is >>> expanded only once (during compilation) for a compiled function. If >>> the macro definition has side effects, they will work differently >>> depending on how many times the macro is expanded. We could be more nuanced, indeed, since the "expanded once" can also happen for interpreted code (and the "expand many times" can also happen in code that's in a compiled file, if that code happened to be "hidden" from the compiler, such as hidden within a `quote`). But the basic idea remains the same: macro expansion may happen only once as part of the preprocessing, or it may be performed anew each time the code is run (or anything in-between, really), so the code should not make assumptions about when macros are expanded or how many times they're expanded. Stefan