From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime Newsgroups: gmane.emacs.help Subject: RE: [External] : Re: Passing result of macroexpand-all as argument to a function Date: Wed, 09 Aug 2023 21:32:44 +0000 Message-ID: References: <7UdMwafROXrUj4VaBblHwkDb-7OTPRW1sNmYNp-sgDXy8OcnRSi5lVBqSH6paHUUhAFI4k2PczFtkC6qIZVFnFRxmlB5GVn-AljwKbn_JcI=@protonmail.com> <878rak6g0d.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36384"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Heerdegen , "help-gnu-emacs@gnu.org" To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 09 23:33:43 2023 Return-path: Envelope-to: geh-help-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 1qTqoI-0009BE-QX for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 09 Aug 2023 23:33:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTqnj-0002Ee-AA; Wed, 09 Aug 2023 17:33:07 -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 1qTqnh-0002EN-FN for help-gnu-emacs@gnu.org; Wed, 09 Aug 2023 17:33:05 -0400 Original-Received: from mail-40135.protonmail.ch ([185.70.40.135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTqnf-0001EW-O9 for help-gnu-emacs@gnu.org; Wed, 09 Aug 2023 17:33:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1691616779; x=1691875979; bh=PE2fkOIUQFEIlmp+jgQ5kFOkHWqbgM/83O18ML5C5nc=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=HVtArIgNwa/iY5XVMBWaBGTzqHtMXpxi80R3DhUHcWigh1pDbImk9iKd0hWtuqKfx pFy4uT3a0UzVz7Wk98F+t04XmCPQND4oAmiMy5jC0pwV1j5GUIJMu/JnKumcz9BssG nfO2Y0Rel/gK3U7qW4UUHHdtsbTs4QI4N4OiX+l7eGqPS1gJyfSduhtxilPxaLSjYb j1VXAh4p1D33K5L3H/USIx4EahwV0kGE8p3MzgPY7z9a+ionEd4chcVGLZx6Vm1Gp7 QOw+HtaSlZIk/Sm3mVqKFmweOR4eI8WqLpOeaguFz13mgqyVAzq3T4+Y2mWIN1BghE DkQOOrFbSwrPQ== In-Reply-To: Feedback-ID: 57735886:user:proton Received-SPF: pass client-ip=185.70.40.135; envelope-from=heimeborgia@protonmail.com; helo=mail-40135.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:144726 Archived-At: Sent with Proton Mail secure email. ------- Original Message ------- On Thursday, August 10th, 2023 at 9:24 AM, Drew Adams wrote: > > The usefulness of macroexpand seems to be the ability to output > > up to a specific expansion level, that's all. >=20 >=20 > Two main uses of macro expansion: >=20 > 1. For coders, to debug their macro definitions. > Expansion lets you see the code you're telling > the macro to produce. >=20 > 2. For byte-compilation, so for performance. > As I mentioned the expanded code gets substituted > for the source macro call, in line. (Nay, its > byte-compilation gets substituted.) >=20 > For #1 you as a developer call `macroexpand'. > For #2 code in the byte-compiler calls it (in > effect). I think we resolved this whole thing about macros then.=20 > > > If you byte-compile the Lisp source code then the > > > macro call gets macroexpanded during compilation, > > > and the result of expansion is then compiled to > > > produce the byte-compiled code. In effect, the > > > macro-call source code disappears and is replaced > > > by the expansion, in line, and the resulting code > > > is then byte-compiled.