all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: florian <lorian@fsavigny.de>
To: help-gnu-emacs@gnu.org
Subject: Weird error message "wrong-type-argument symbolp (quote foo)"
Date: Wed, 10 Jun 2009 04:45:04 -0700 (PDT)	[thread overview]
Message-ID: <d4d56866-3a7d-49cd-a77d-7d1bf31370a6@n19g2000vba.googlegroups.com> (raw)

Dear wizards,

I would not have thought that such an error message was possible,
since (quote foo) should be the same as 'foo, hence, a symbol. I have
managed to produce it like this:

(let ((foo 1)
	(bar 2)
	(fubar 3))
    (dolist (var '('foo 'bar 'fubar))
      (message "%S's value is %d"
	       var (symbol-value var))))


The following form, which should produce the same error, however, does
not complain (just as I expected):

(let ((var (quote foo)))
  (symbol-value var))

As expected, it also makes no difference if I write it as

(let ((var 'foo))
  (symbol-value var))

Also, symbolp and symbol-value do not complain if they get sth like
"(quote foo)" as argument. Can anybody point me to what on earth is
going on in the first form? Thanks so much!

Florian


             reply	other threads:[~2009-06-10 11:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-10 11:45 florian [this message]
2009-06-10 12:12 ` Weird error message "wrong-type-argument symbolp (quote foo)" Teemu Likonen
2009-06-10 12:18   ` Teemu Likonen
2009-06-12 19:46     ` florian

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=d4d56866-3a7d-49cd-a77d-7d1bf31370a6@n19g2000vba.googlegroups.com \
    --to=lorian@fsavigny.de \
    --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.