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

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

Understanding macros and the compilation flow


From: LanX
Subject: Understanding macros and the compilation flow
Date: Wed, 08 Dec 2010 15:11:24 -0000
User-agent: G2/1.0

Hi

I've put the following code into *scratch* and did M-x eval-buffer and
got a for me suprising result:

-------------------
(defmacro mac () '(insert "             ; => before "))

(defun func () (mac))

(func)          ; => before

(defmacro mac () '(insert "             ; => after"))

(func)          ; => after
-----------------

Seems like I didn't understand the compilation process, for my
understanding the redefinition of the macro "mac" after defining the
function "func" should not effect the expansion anymore...

Please, what am I missing here?


reply via email to

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