all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Xue Fuqiao <xfq.free@gmail.com>
To: Filipp Gunbin <fgunbin@fastmail.fm>
Cc: help-gnu-emacs@gnu.org
Subject: Re: About `macroexpand'
Date: Sun, 30 Dec 2012 13:35:44 +0800	[thread overview]
Message-ID: <20121230133544.8aca3a27288ec8b408339599@gmail.com> (raw)
In-Reply-To: <86vcbk8aga.fsf@w2139spb.ru.yotateam.com>

On Sun, 30 Dec 2012 07:50:45 +0400
Filipp Gunbin <fgunbin@fastmail.fm> wrote:

> The comparison doesn't make any sense and what
> is actually overwritten is the local value of `variable'.

I still don't understand.  I tried this:
(defmacro t-becomes-nil (variable)
  (list 'if (list 'eq variable t)
      (list 'setq variable nil)))
(setq foo t)
(macroexpand '(t-becomes-nil foo))

But it returns (if (eq foo t) (setq foo nil)))
What's the difference between these two macros?
-- 
Best regards.



  reply	other threads:[~2012-12-30  5:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-30  2:39 About `macroexpand' Xue Fuqiao
2012-12-30  3:50 ` Filipp Gunbin
2012-12-30  5:35   ` Xue Fuqiao [this message]
2012-12-30  7:06     ` Filipp Gunbin
2012-12-30  7:40       ` Xue Fuqiao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121230133544.8aca3a27288ec8b408339599@gmail.com \
    --to=xfq.free@gmail.com \
    --cc=fgunbin@fastmail.fm \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.