From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: (list) and '(list) Date: Fri, 27 Apr 2007 10:58:34 +1000 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <87vefityyt.fsf@lion.rapttech.com.au> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1177637679 9706 80.91.229.12 (27 Apr 2007 01:34:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 27 Apr 2007 01:34:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 27 03:34:36 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HhFM0-0007AR-54 for geh-help-gnu-emacs@m.gmane.org; Fri, 27 Apr 2007 03:34:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HhFRn-00086e-42 for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Apr 2007 21:40:31 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!feeder.news-service.com!213.132.189.1.MISMATCH!multikabel.net!feed10.multikabel.net!feeder1.cambrium.nl!feed.tweaknews.nl!138.199.65.86.MISMATCH!sn-xt-ams-06!sn-xt-ams-04!sn-ams!sn-feed-ams-01!sn-post-ams-02!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux) Cancel-Lock: sha1:0hwWtZ2CDXsnVGqMeNTRlDtapG8= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 31 Original-Xref: shelby.stanford.edu gnu.emacs.help:147642 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:43245 Archived-At: A Soare 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