From: Trust me I am a Doctor <pillule@riseup.net>
To: help-gnu-emacs@gnu.org
Subject: Instrumenting macro calls
Date: Tue, 29 Jun 2021 22:05:55 +0200 [thread overview]
Message-ID: <87fsx0xuw8.fsf@riseup.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 548 bytes --]
Hi,
While exploring eieio I found that laconic comment
--- snip ---
;; In retrospect, this is a silly function.
(defun eieio-instance-tracker-find (key slot list-symbol)
"Find KEY as an element of SLOT in the objects in LIST-SYMBOL.
Returns the first match."
(object-assoc key slot (symbol-value list-symbol)))
--- snip ---
So I thought I could make my own query for a tracking list of eieio
objects. It is a macro that use pcase to destructuring-bind the argument
list into a query that may returns matching objects or slots
or whatever.
[-- Attachment #2: query macro --]
[-- Type: application/emacs-lisp, Size: 2784 bytes --]
[-- Attachment #3: Type: text/plain, Size: 293 bytes --]
Until now it seems to work ok. The issue I have with it, is
instrumenting the macro calls with edebug. Apparently edebug does not
understand that the forms are wrapped into (and ... ), and will evaluate
each of them even if some returns nil !
Is there a way to instruct edebug from that ?
next reply other threads:[~2021-06-29 20:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-29 20:05 Trust me I am a Doctor [this message]
2021-06-29 22:16 ` Instrumenting macro calls Stefan Monnier via Users list for the GNU Emacs text editor
2021-06-29 22:50 ` Trust me I am a Doctor
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=87fsx0xuw8.fsf@riseup.net \
--to=pillule@riseup.net \
--cc=help-gnu-emacs@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.
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).