From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 47025@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#47025: 28.0.50; [feature/native-comp] pcase is preloaded, but not eln-compiled
Date: Wed, 10 Mar 2021 15:22:45 +0000 [thread overview]
Message-ID: <xjf35x3rq2i.fsf@sdf.org> (raw)
In-Reply-To: <jwvim5zun0n.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 10 Mar 2021 09:02:35 -0500")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> (load "emacs-lisp/macroexp")
>>> (if (byte-code-function-p (symbol-function 'macroexpand-all))
>>> nil
>>> ;; Since loaddefs is not yet loaded, macroexp's uses of pcase will simply
>>> ;; fail until pcase is explicitly loaded. This also means that we have to
>>> ;; disable eager macro-expansion while loading pcase.
>>> (let ((macroexp--pending-eager-loads '(skip))) (load "emacs-lisp/pcase"))
>>> ;; Re-load macroexp so as to eagerly macro-expand its uses of pcase.
>>> (let ((max-lisp-eval-depth (* 2 max-lisp-eval-depth)))
>>> (load "emacs-lisp/macroexp")))
>>> ====
>>>
>>> > need to preload pcase?
>>>
>>> I fear I don't have an answer as ATM I don't uderstand why it should be
>>> different compared to master.
>>
>> Stefan, any ideas why this happens on the native-comp branch but not
>> on master?
>
> It's probably the `byte-code-function-p` which tries to distinguish the
> case where macroexp has not yet been compiled, but on the native branch,
> I suspect that (byte-code-function-p (symbol-function 'macroexpand-all))
> will return nil when macroexp has been compiled because it's now
> a `subrp`.
Ops should have spotted that :/ thanks for the suggestion.
711b2c8349 fix this for me.
Eli let me know if we are okay to close.
Thanks
Andrea
next prev parent reply other threads:[~2021-03-10 15:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-09 17:59 bug#47025: 28.0.50; [feature/native-comp] pcase is preloaded, but not eln-compiled Eli Zaretskii
2021-03-09 20:21 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-10 13:10 ` Eli Zaretskii
2021-03-10 14:02 ` Stefan Monnier
2021-03-10 15:22 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-03-10 16:12 ` Eli Zaretskii
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=xjf35x3rq2i.fsf@sdf.org \
--to=bug-gnu-emacs@gnu.org \
--cc=47025@debbugs.gnu.org \
--cc=akrl@sdf.org \
--cc=eliz@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).