From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: germanp82@hotmail.com, 57627@debbugs.gnu.org,
Eli Zaretskii <eliz@gnu.org>, Andrea Corallo <akrl@sdf.org>
Subject: bug#57627: 29.0.50; [native-compilation] cl-loaddefs.el recompiled on startup
Date: Sat, 15 Oct 2022 12:13:32 +0200 [thread overview]
Message-ID: <871qr95r8z.fsf@gnus.org> (raw)
In-Reply-To: <jwvilkmp7p5.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 14 Oct 2022 15:00:00 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> After spending many milliseconds thinking about it, my conclusion is
> that the bytecompiler should add a little code snippet like
> (puthash load-file-name t comp--no-native-compile) in the
> file if `no-native-compile` was specified. So it then be easy for the
> lazy native compilation to detect that it should skip this file (since
> lazy native compilation is triggered after loading the file) by just
> consulting `comp--no-native-compile`.
>
> For that, there's no need to change the way `no-native-compile` is specified.
True, but it's kinda hacky, and if possible, I'd like to avoid adding
more hacks in this area...
>> That is, in this case, we'd say
>>
>> (pragma 'no-native-compile)
>>
>> somewhere in the file.
>
> I guess that could work for `no-native-compile`, indeed. But if you ask
> to native compile this file and the pragma is halfway down the file,
> what happens?
Yes, that's no good. Uhm... we could make a rule that all `pragma's
have to appear as the first form(s) in a Lisp file? And error out if
somebody tries to add a `pragma' later in the file.
I think that would make sense in general -- we're trying to express
something about the file as a whole, after all.
>> We could have
>>
>> (pragma 'dynamic-binding)
>
> I guess this one could work (of course, it'd have to be at top-level),
> and we could switch back&forth within the same file (yuck!).
>
> But if we allow such `pragma` to be output by macros, then it becomes
> tricky for `eval-region` to reliably decide which dialect to use.
Hm, yes... But we have the same issue today, don't we? That is
(progn
(pop-to-buffer "*foo*")
(emacs-lisp-mode)
(insert ";;; -*- lexical-binding: t -*-\n(message \"Lex: %s\" lexical-binding)")
(eval-region (pos-bol) (point)))
Well, OK, that's the same result with point-min, but...
> So we could allow such `pragma`, but we'd likely end up restricting its
> syntax so we're able to find it with something like a regexp search, so
> in the end it's not clear what's the advantage over
> file-local variables.
If they have to be the first forms, there may be some advantages...
next prev parent reply other threads:[~2022-10-15 10:13 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-06 11:38 bug#57627: 29.0.50; [native-compilation] cl-loaddefs.el recompiled on startup German Pacenza
2022-09-06 15:02 ` Lars Ingebrigtsen
2022-09-06 15:46 ` German Pacenza
2022-09-06 15:51 ` Lars Ingebrigtsen
2022-09-06 16:33 ` Andrea Corallo
2022-09-06 16:41 ` Eli Zaretskii
2022-09-06 19:23 ` Andrea Corallo
2022-09-06 20:40 ` Lars Ingebrigtsen
2022-09-07 2:33 ` Eli Zaretskii
2022-09-07 12:47 ` Lars Ingebrigtsen
2022-09-07 13:01 ` German Pacenza
2022-09-07 13:06 ` Lars Ingebrigtsen
2022-09-07 13:41 ` Lars Ingebrigtsen
2022-09-07 13:08 ` Eli Zaretskii
2022-09-07 13:10 ` Lars Ingebrigtsen
2022-09-07 18:06 ` Andrea Corallo
2022-09-08 11:57 ` Lars Ingebrigtsen
2022-09-09 12:57 ` Andrea Corallo
2022-09-09 17:09 ` Lars Ingebrigtsen
2022-09-09 19:03 ` Andrea Corallo
2022-09-10 4:33 ` Lars Ingebrigtsen
2022-09-10 4:38 ` Lars Ingebrigtsen
2022-10-14 10:53 ` Lars Ingebrigtsen
2022-10-14 19:00 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-15 10:13 ` Lars Ingebrigtsen [this message]
2022-10-15 14:19 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-16 8:21 ` Lars Ingebrigtsen
2022-10-17 7:47 ` Andrea Corallo
2022-10-17 8:49 ` Lars Ingebrigtsen
2022-10-17 8:52 ` Andrea Corallo
2022-10-17 9:06 ` Eli Zaretskii
2022-10-17 9:13 ` Lars Ingebrigtsen
2022-10-17 11:59 ` Arash Esbati
2022-10-17 12:01 ` Lars Ingebrigtsen
2022-10-17 12:09 ` Arash Esbati
2022-10-17 12:21 ` Lars Ingebrigtsen
2022-10-17 12:31 ` Lars Ingebrigtsen
2022-10-17 12:53 ` Arash Esbati
2022-10-17 12:59 ` German Pacenza
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871qr95r8z.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=57627@debbugs.gnu.org \
--cc=akrl@sdf.org \
--cc=eliz@gnu.org \
--cc=germanp82@hotmail.com \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.