From: Alan Mackenzie <acm@muc.de>
Subject: How do I get diagnostic output from a macro?
Date: Mon, 28 Nov 2005 10:29:33 +0000 [thread overview]
Message-ID: <e6memd.c8.ln@acm.acm> (raw)
GNU Emacs 21.3.
I'd like to get diagostic output whilst expanding a macro. I type this
into my *scratch* buffer:
(defmacro foo ()
(message "evaluating foo")
(eval-when-compile (message "e-w-c: compiling foo")))
^
|
<point 1>
(defun bar ()
(foo))
^
|
<point 2>
(bar)
^
|
<point 3>
When I do C-x C-e at <point 1>, I get no message output. I would have
expected to see "e-w-c compiling foo" in the message area.
When I do C-x C-e at <point 2>, I still get no output. I would have
expected "evaluating foo")
Finally, C-x C-e at <point 3> outputs both "evaluating foo" and "e-w-c:
compiling foo".
I'm baffled. What do I have to put into the macro so as to get
"evaluating foo" at <point 2>? Does it make any difference if the
`(defmacro foo ...)' is byte compiled?
Thanks for the help!
--
Alan Mackenzie (Munich, Germany)
Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").
reply other threads:[~2005-11-28 10:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=e6memd.c8.ln@acm.acm \
--to=acm@muc.de \
/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).