From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Philipp <p.stephani2@gmail.com>, 48585@debbugs.gnu.org
Subject: bug#48585: 28.0.50; Missing Edebug instrumentation for some 'if-let' variants
Date: Sat, 16 Jul 2022 18:25:55 -0400 [thread overview]
Message-ID: <jwvv8rwd7jq.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87wncen0jq.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 15 Jul 2022 12:16:25 +0200")
>> The 'symbolp' specification element causes Edebug to not instrument the
>> 'x' symbol. However, the 'symbolp' specification is also necessary
>> here; we couldn't just replace it with 'form' because that would make
>> the branches overlap. What we'd need here is something like
>> [&and symbolp form], i.e. match only in case of a symbol, but also
>> instrument as a form. IIUC Edebug doesn't support such constructs yet.
>
> Perhaps Stefan has some comments here; added to the CCs.
The instrumentation takes place before expanding the macro, so either we
instrument the `x` into a form (edebug-<foo> ... x ...) or we leave the
`x` untouched and have no instrumentation. We can't have it both ways
from that side.
So if we want the occurrence of `x` which *evaluates* `x` (as opposed to
the occurrence that *binds* the new variable) to be instrumented, we
need to change the macro to accept a "variable name" of the form
(edebug-<foo> ... x ...) and somehow strip the edebug instrumentation
when we use the argument as a variable name in a binding position.
As someone who doesn't much like `if-let`, I'll let someone else figure
out how to that somewhat cleanly. Also to be honest I also wonder if
that would be worthwhile.
Stefan
next prev parent reply other threads:[~2022-07-16 22:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-22 11:37 bug#48585: 28.0.50; Missing Edebug instrumentation for some 'if-let' variants Philipp
2022-07-15 10:16 ` Lars Ingebrigtsen
2022-07-16 22:25 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-07-17 0:13 ` Michael Heerdegen
2022-07-17 1:36 ` Michael Heerdegen
2022-07-17 2:04 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-17 15:45 ` Michael Heerdegen
2022-07-15 23:15 ` Michael Heerdegen
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=jwvv8rwd7jq.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=48585@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=monnier@iro.umontreal.ca \
--cc=p.stephani2@gmail.com \
/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).