From: Heime <heimeborgia@protonmail.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: Michael Heerdegen <michael_heerdegen@web.de>,
"help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: RE: [External] : Re: Passing result of macroexpand-all as argument to a function
Date: Wed, 09 Aug 2023 21:32:44 +0000 [thread overview]
Message-ID: <l--eS-zAhJEjGFF1aY5P-3nzgz8H9P-gSPSWJqALz3atIRWDnkAwkW-f8FuuVvP1b2L3JsLskJwCh0T1bZRD7w9LpGV2AtxXXriKDVbou_Q=@protonmail.com> (raw)
In-Reply-To: <SJ0PR10MB54887E09BD315DFE74CF506EF312A@SJ0PR10MB5488.namprd10.prod.outlook.com>
Sent with Proton Mail secure email.
------- Original Message -------
On Thursday, August 10th, 2023 at 9:24 AM, Drew Adams <drew.adams@oracle.com> wrote:
> > The usefulness of macroexpand seems to be the ability to output
> > up to a specific expansion level, that's all.
>
>
> Two main uses of macro expansion:
>
> 1. For coders, to debug their macro definitions.
> Expansion lets you see the code you're telling
> the macro to produce.
>
> 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.)
>
> 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.
> > > 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.
prev parent reply other threads:[~2023-08-09 21:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 0:22 Passing result of macroexpand-all as argument to a function Heime
2023-08-09 1:37 ` Pierre Rouleau
2023-08-09 2:04 ` Heime
2023-08-09 2:26 ` Corwin Brust
2023-08-09 2:40 ` Heime
2023-08-09 2:27 ` [External] : " Drew Adams
2023-08-09 2:53 ` Heime
2023-08-09 4:02 ` Pierre Rouleau
2023-08-09 4:14 ` Drew Adams
2023-08-09 3:37 ` Michael Heerdegen
2023-08-09 4:13 ` Heime
2023-08-09 4:36 ` Michael Heerdegen
2023-08-09 4:54 ` Heime
2023-08-09 15:21 ` Drew Adams
2023-08-09 4:28 ` Drew Adams
2023-08-09 3:39 ` Michael Heerdegen
2023-08-09 5:06 ` Heime
2023-08-09 15:27 ` [External] : " Drew Adams
2023-08-09 20:34 ` Heime
2023-08-09 21:24 ` Drew Adams
2023-08-09 21:32 ` Heime [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='l--eS-zAhJEjGFF1aY5P-3nzgz8H9P-gSPSWJqALz3atIRWDnkAwkW-f8FuuVvP1b2L3JsLskJwCh0T1bZRD7w9LpGV2AtxXXriKDVbou_Q=@protonmail.com' \
--to=heimeborgia@protonmail.com \
--cc=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=michael_heerdegen@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).