help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I get diagnostic output from a macro?


From: Alan Mackenzie
Subject: How do I get diagnostic output from a macro?
Date: Mon, 28 Nov 2005 10:29:33 +0000
User-agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686))

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 via email to

[Prev in Thread] Current Thread [Next in Thread]