unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How do I get diagnostic output from a macro?
@ 2005-11-28 10:29 Alan Mackenzie
  0 siblings, 0 replies; only message in thread
From: Alan Mackenzie @ 2005-11-28 10:29 UTC (permalink / 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").

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-11-28 10:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-28 10:29 How do I get diagnostic output from a macro? Alan Mackenzie

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).