From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Andrea Corallo <acorallo@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: master b2416d2c029 4/6: Don't load comp when installing an existing trampoline
Date: Mon, 13 Nov 2023 13:46:36 -0500 [thread overview]
Message-ID: <jwv1qcta48q.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20231109113503.9890EC0C198@vcs2.savannah.gnu.org> (Andrea Corallo via Mailing list for Emacs changes's message of "Thu, 9 Nov 2023 06:35:03 -0500 (EST)")
Hi Andrea,
> --- a/lisp/emacs-lisp/nadvice.el
> +++ b/lisp/emacs-lisp/nadvice.el
> @@ -389,7 +389,7 @@ is also interactive. There are 3 cases:
> `(advice--add-function ,how (gv-ref ,(advice--normalize-place place))
> ,function ,props))
>
> -(declare-function comp-subr-trampoline-install "comp")
> +(declare-function comp-subr-trampoline-install "comp-run")
>
> ;;;###autoload
> (defun advice--add-function (how ref function props)
> @@ -407,7 +407,7 @@ is also interactive. There are 3 cases:
> (unless (memq subr-name '(macroexpand rename-buffer))
> ;; Must require explicitly as during bootstrap we have no
> ;; autoloads.
> - (require 'comp)
> + (require 'comp-run)
> (comp-subr-trampoline-install subr-name))))
2 things:
- The `declare-function` should be moved to right after (require
'comp-run), i.e. when we do know that the function should be available
and it will thus silence only spurious warnings.
- Why do we do that in `advice--add-function`, which is used by
`advice-add` indeed but also by `add-function`, e.g. when adding
a function to a `foo-function`variable or to a process filter,
where there's no trampoline to install.
- Why do we need this at all?
Won't `Ffset` call `comp-subr-trampoline-install` for us anyway.
Stefan
next parent reply other threads:[~2023-11-13 18:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <169952969842.2327.17551267288789292121@vcs2.savannah.gnu.org>
[not found] ` <20231109113503.9890EC0C198@vcs2.savannah.gnu.org>
2023-11-13 18:46 ` Stefan Monnier [this message]
2023-11-14 9:33 ` master b2416d2c029 4/6: Don't load comp when installing an existing trampoline Andrea Corallo
2023-11-14 14:07 ` Stefan Monnier
2023-11-16 8:35 ` Andrea Corallo
2023-11-16 9:34 ` Andrea Corallo
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=jwv1qcta48q.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=acorallo@gnu.org \
--cc=emacs-devel@gnu.org \
/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).