From: Troy Hinckley <troyhinckley@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: none
Date: Fri, 30 Jul 2021 23:09:29 -0600 [thread overview]
Message-ID: <CALOSHoTgqTJT1RHkNGp_vwihhG8tHfJoSXUUe2yqG8HzsTYzqg@mail.gmail.com> (raw)
In-Reply-To: <jwveebfh4rm.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]
byte-run.el does use backquotes
https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/emacs-lisp/byte-run.el#n122
However I had not thought about the impacts of lazy evaluation. I guess
this would require that you load the code twice: First with the
interpreter, then with the byte compiler, since you can't compile a macro
that has not been defined.
On Fri, Jul 30, 2021 at 3:33 PM Stefan Monnier <monnier@iro.umontreal.ca>
wrote:
> Troy Hinckley [2021-07-27 17:54:25] wrote:
> > Subject: Load order for elisp files
> > User-agent: mu4e 1.2.0; emacs 28.0.50
> > I am trying to better understand the bootstrap process for Emacs and I
> > have run into a chicken and egg problem. When looking for where the
> > basic functions are defined, I can see that defmacro and defun are
> defined in
> > byte-run.el. However the code needed to evaluate a macro is in
> > backquote.el.
>
> Hmm... no, the code in `backquote.el` is only used to macro expand uses
> of backquotes (which are commonly used in macro definitions but not in
> all of them) and `byte-run.el` is indeed careful not to use backquotes,
> specifically because that would break the bootstrap.
>
> IIRC there are cases where we rely on even more subtle details, more
> specifically, I seem to remember that we have functions whose body uses
> macros that aren't yet defined when we define the function, and this
> still works OK because this is done at a stage where macro expansion is
> still lazy, so the macros in the body of the function are only expanded
> when the function gets called (or when it gets byte-compiled) both of
> which "happen" to take place later, when the corresponding macros have
> been defined.
>
>
> Stefan
>
>
[-- Attachment #2: Type: text/html, Size: 2274 bytes --]
next prev parent reply other threads:[~2021-07-31 5:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-27 23:54 (unknown) Troy Hinckley
2021-07-30 21:33 ` none Stefan Monnier
2021-07-31 5:09 ` Troy Hinckley [this message]
2021-07-31 16:22 ` none Stefan Monnier
-- strict thread matches above, loose matches on Subject: below --
2024-03-13 12:48 (unknown) Eli Zaretskii
2024-03-13 13:57 ` none Po Lu
2024-03-13 14:40 ` none Eric Abrahamsen
2022-07-21 11:36 (unknown) Gregory Heytings
2022-07-21 16:11 ` none Manuel Giraud
2021-12-20 2:29 (unknown) Davin Pearson
2021-12-20 14:13 ` none Stefan Monnier
2016-09-28 12:26 (unknown) Takesi Ayanokoji
2016-09-28 17:05 ` none John Wiegley
2005-06-04 0:56 (no subject) Luc Teirlinck
2005-06-05 16:49 ` none Kim F. Storm
2003-03-07 12:04 None abrahamade
2002-11-28 17:01 iso-8859-1 and non-latin-1 chars Dave Love
2002-12-06 16:38 ` Dave Love
2002-12-10 23:47 ` Dave Love
2002-12-13 2:58 ` Kenichi Handa
2002-12-14 18:31 ` Richard Stallman
2002-12-17 11:41 ` None Kenichi Handa
2002-09-09 15:53 Text mode menu wishlist Sacha Chua
2002-09-09 17:27 ` Alex Schroeder
2002-09-10 1:45 ` Sacha Chua
2002-09-10 7:41 ` Thien-Thi Nguyen
2002-09-10 7:48 ` Miles Bader
2002-09-10 8:35 ` (no subject) Thien-Thi Nguyen
2002-09-10 8:47 ` none Miles Bader
2002-09-10 13:56 ` none Sacha Chua
2002-09-10 23:25 ` none Miles Bader
2002-09-30 5:59 ` none Sacha Chua
2002-10-01 6:18 ` none Richard Stallman
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=CALOSHoTgqTJT1RHkNGp_vwihhG8tHfJoSXUUe2yqG8HzsTYzqg@mail.gmail.com \
--to=troyhinckley@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).