unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: comparing symbols coming from gensym?
Date: Wed, 24 Aug 2005 08:48:12 -0700	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICIEAOCMAA.drew.adams@oracle.com> (raw)
In-Reply-To: <E1E7nDq-0002ci-00@lab1.ma.utexas.edu>

    Why is it that
    (setq a (gensym)) ;=> G2007
    a                 ;=> G2007
    (equal a 'G2007)  ;=> nil
    while
    (setq a 'foo)    ;=> foo
    a                ;=> foo
    (equal a 'foo)   ;=> t

Perhaps because gensym, like make-symbol, doesn't intern the symbol it
creates? The reader interns `foo' in (setq a 'foo). So, they are different
symbols: one is interned in obarray; the other is an uninterned symbol.

  reply	other threads:[~2005-08-24 15:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-24  4:50 comparing symbols coming from gensym? Joe Corneli
2005-08-24 15:48 ` Drew Adams [this message]
     [not found] <mailman.4802.1124860720.20277.help-gnu-emacs@gnu.org>
2005-08-24  8:24 ` Alan Mackenzie
2005-08-24 15:57   ` Joe Corneli
2005-08-24  9:00 ` N. Raghavendra

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=DNEMKBNJBGPAOPIJOOICIEAOCMAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /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.
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).