From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Why is FUNC in cl-callf not allowed to be an expression? Date: Fri, 24 May 2019 11:29:37 -0400 Message-ID: References: <874l631ek1.fsf@web.de> <87r2961gox.fsf@web.de> <87mujohasa.fsf@web.de> <87a7fn3c6c.fsf@web.de> <875zqabh3t.fsf@web.de> <87zhnma11c.fsf@web.de> <871s0y3weo.fsf@web.de> <87tvdshew9.fsf@web.de> <87ftp7palg.fsf@web.de> <874l5m2b2p.fsf@web.de> <87h89kivx7.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="221110"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 24 17:34:20 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hUCD5-000vHX-8m for ged-emacs-devel@m.gmane.org; Fri, 24 May 2019 17:34:19 +0200 Original-Received: from localhost ([127.0.0.1]:56300 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUCD3-0008Mw-31 for ged-emacs-devel@m.gmane.org; Fri, 24 May 2019 11:34:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUCCo-0008Hw-DY for emacs-devel@gnu.org; Fri, 24 May 2019 11:34:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hUC8d-0000Gp-3t for emacs-devel@gnu.org; Fri, 24 May 2019 11:29:44 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:5715) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hUC8c-0000G3-Sx for emacs-devel@gnu.org; Fri, 24 May 2019 11:29:43 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 07E5D8117A; Fri, 24 May 2019 11:29:41 -0400 (EDT) Original-Received: from mail02.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id EA1D580B8C; Fri, 24 May 2019 11:29:39 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1558711780; bh=WdMxNxePi6Ui2g6js5Rm0JpJAgCMXIsktLidqQz6Zf4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=kTT8ol81MHdFzMJh3xMWt71OfsJZPtxVkdMjBr692h5j8i4inDXT3GX3WN2nJaj2A QBYbColuhhtKMlGAH5oQW54x3z8ebtnPscYQ30NDRVF6UVaSd2LZ31Kpts/6/8gnzP GjkQh8Ilo/zWCuDP3ejn4+JosbVlZZMWyzns0n+vJNule3K5ESJstWyDfn6JWP+2hk ELTE/qND6L/KmFFB8J/5JP/+lUbGuvyrG72ic07W5j6gP1QSlACTObBKYsXlFxaj8m Azn0Zuap/EBxLFt4pk9xlD1m2i3k7PNNUuA4vEimWajLoa2OHsS16ycwUX9HjmIvow Fa74/qfePIxTA== Original-Received: from alfajor (unknown [167.88.27.42]) by mail02.iro.umontreal.ca (Postfix) with ESMTPSA id 7DA5B1207A2; Fri, 24 May 2019 11:29:39 -0400 (EDT) In-Reply-To: <87h89kivx7.fsf@web.de> (Michael Heerdegen's message of "Fri, 24 May 2019 01:38:12 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236963 Archived-At: > I would like to speak that out somewhere because it's not obvious, and Agreed. > also explicitly for local macros (because the current docstring saying I don't see them as any different, but clearly some users don't see it this way, so we can put a reminder there, indeed. > Can we say that macros are "expanded in the global environment", or Sounds good. > should we just say that the expander functions are not allowed to refer > to local variables (though, that would still leave some questions open, > e.g. what about local (flet-bound) local functions or other local > macros?). Something like it, yes (using "refer" can be tricky because they can emit code which then refers to it, and this can be seen as "the macro refers to" even though technically it's different). > My patch spoke about when these macros are expanded because of such > subtleties, I thought it could be better to imagine with that wording. In macros.texi (@node Compiling Macros) as well as in loading.texi (@cindex eager macro expansion) we allude to when macros are expanded, but I think we should be more upfront about it somewhere. A separate @node about when macro expansion can take place and what environment it can rely on would be welcome. Stefan