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

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

About `macroexpand'


From: Xue Fuqiao
Subject: About `macroexpand'
Date: Sun, 30 Dec 2012 10:39:31 +0800

I wrote the following code:
(defmacro t-becomes-nil (variable)
  (if (eq variable t)
      (setq variable nil)))
(setq foo t)
(macroexpand '(t-becomes-nil foo))

The return value of `macroexpand' is nil.  I don't know why.  I think it should 
be:
(if (eq foo t)
    (setq foo nil)))

Can anybody help?
-- 
Best regards.



reply via email to

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