From: Tim X <timx@nospam.dev.null>
To: help-gnu-emacs@gnu.org
Subject: Re: (list) and '(list)
Date: Fri, 27 Apr 2007 10:58:34 +1000 [thread overview]
Message-ID: <87vefityyt.fsf@lion.rapttech.com.au> (raw)
In-Reply-To: mailman.2557.1177600988.7795.help-gnu-emacs@gnu.org
A Soare <alinsoar@voila.fr> writes:
> Can somebody tell me if there already is a code that makes the distintion between a list that evaluates as a function like
>
> (function ...
>
> and between a list that evaluates to itself :
>
> '(list ... , and its aliases like (quote (list ... etc
>
First, you have it around the wrong way. ' is the shorthand (alias if you like)
for (quote .....). If you ignore ', then a clear pattern emerges. Essentially,
all lists are evaluated when viewed from the top level. The (quote ....) is
different in that it short circuits evaluation - it returns its arguements
without evaluating them. In all other situations, the arguements are evaluated.
Putting it another way, given any list
(x y z)
x is always evaluated, but if x is the function quote, evaluation halts there.
otherwise, y and z are evaluated to determine the arguements to x.
I suspect you may be asking thw rong question. Maybe explain more about what
you want to do and others on the list will be able to give you better
advice/direction.
Tim
--
tcross (at) rapttech dot com dot au
next prev parent reply other threads:[~2007-04-27 0:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.2557.1177600988.7795.help-gnu-emacs@gnu.org>
2007-04-26 21:55 ` (list) and '(list) Pascal Bourguignon
2007-04-27 0:58 ` Tim X [this message]
2007-04-30 18:53 A Soare
-- strict thread matches above, loose matches on Subject: below --
2007-04-30 18:15 A Soare
2007-04-27 10:37 A Soare
2007-04-26 15:17 A Soare
2007-04-27 10:25 ` Kai Grossjohann
[not found] ` <mailman.2588.1177669955.7795.help-gnu-emacs@gnu.org>
2007-04-27 10:39 ` David Kastrup
2007-04-27 11:05 ` Pascal Bourguignon
2007-04-30 12:49 ` Kai Grossjohann
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=87vefityyt.fsf@lion.rapttech.com.au \
--to=timx@nospam.dev.null \
--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.