unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* About `macroexpand'
@ 2012-12-30  2:39 Xue Fuqiao
  2012-12-30  3:50 ` Filipp Gunbin
  0 siblings, 1 reply; 5+ messages in thread
From: Xue Fuqiao @ 2012-12-30  2:39 UTC (permalink / raw)
  To: help-gnu-emacs

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.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-12-30  7:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-30  2:39 About `macroexpand' Xue Fuqiao
2012-12-30  3:50 ` Filipp Gunbin
2012-12-30  5:35   ` Xue Fuqiao
2012-12-30  7:06     ` Filipp Gunbin
2012-12-30  7:40       ` Xue Fuqiao

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