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: Basic Emacs Lisp question Date: Wed, 30 Apr 2008 18:31:23 +1000 Organization: Rapt Technologies Message-ID: <877iefeobo.fsf@lion.rapttech.com.au> References: <67p1csF2qe3gfU1@mid.dfncis.de> <87zlrctlbl.fsf@blackbart.sedgenet> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1209544934 4812 80.91.229.12 (30 Apr 2008 08:42:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Apr 2008 08:42:14 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 30 10:42:50 2008 connect(): Connection refused 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 1Jr7tb-0000H8-UC for geh-help-gnu-emacs@m.gmane.org; Wed, 30 Apr 2008 10:42:36 +0200 Original-Received: from localhost ([127.0.0.1]:60531 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jr7sv-0003kV-3r for geh-help-gnu-emacs@m.gmane.org; Wed, 30 Apr 2008 04:41:53 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!nntp.internode!news.internode.POSTED!not-for-mail Original-NNTP-Posting-Date: Wed, 30 Apr 2008 03:31:23 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:oxEa3dTFYTf7RKbep5RGz0lz/6U= Original-Lines: 37 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 121.44.88.177 Original-X-Trace: sv3-xw7qkBSzfM9hJC/P8EMvWa0i8cT1KSAhOwiuFaPPQGzIK2gcwu4eWDQ/RpnQeri9vfpUQ872OdnYwCF!lmi+JsIQSCJcJE3iucSUPmu4mLJSj8QbN+pdIa4VcB51LDcIPmHdfA6UO/997wUg7i8wnPfrCA== Original-X-Complaints-To: abuse@internode X-DMCA-Complaints-To: abuse@internode X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.38 Original-Xref: shelby.stanford.edu gnu.emacs.help:158280 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:53646 Archived-At: tyler writes: > Matthias Pfeifer writes: > >> What is the difference between >> >> (list 0 nil -1) >> >> and >> >> '(0 nil -1) >> > > In this instance, nothing. However, the '(...) form leaves it's > arguments unevaluated (quoted), while (list ...) evaluates them. Since > 0, nil and -1 all evaluate to themselves there is no difference in this > case. However, the following two statements are different: > > (list 0 fill-column -1) > > '(0 fill-column -1) > > A good place to start learning is the Introduction to Programming in > Emacs Lisp, which is available from gnu.org, if it isn't already present > in your info directory (i.e., C-h i m emacs lisp intro ). > Are you sure there is no difference? In many lisp dialects, the second form is more like a constant and cannot be modified in a reliable manner - IIRC this is due to how memory is allocated for the quoted form. In the first one, memory is allocated dynamically and so can be safely modified. Tim -- tcross (at) rapttech dot com dot au