From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.help Subject: Re: Basic Emacs Lisp question Date: Wed, 30 Apr 2008 21:36:50 +0300 Organization: SunSITE.dk - Supporting Open source Message-ID: <87ej8n9ol9.fsf@kobe.laptop> References: <67p1csF2qe3gfU1@mid.dfncis.de> <87od7sa6ke.fsf@kobe.laptop> <85r6cnl5y6.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1209616868 8733 80.91.229.12 (1 May 2008 04:41:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 1 May 2008 04:41:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 01 06:41:44 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 1JrQc2-0005Pd-NB for geh-help-gnu-emacs@m.gmane.org; Thu, 01 May 2008 06:41:42 +0200 Original-Received: from localhost ([127.0.0.1]:35240 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JrQbK-0005cO-O0 for geh-help-gnu-emacs@m.gmane.org; Thu, 01 May 2008 00:40:58 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!feed118.news.tele.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) Cancel-Lock: sha1:xhuBpqgmz/CgYBPd5OXlVVNuhBQ= Original-Lines: 28 Original-NNTP-Posting-Host: 77.49.189.8 Original-X-Trace: news.sunsite.dk DXC=nnHObjDR?WU; OkaSc<8a?TYSB=nbEKnk[l:4`YVO27`_L^MjWbH?lJH1Tkj\Vhm25aGX9fUIGOI9>\GQa[ Original-X-Complaints-To: staff@sunsite.dk Original-Xref: shelby.stanford.edu gnu.emacs.help:158302 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:53670 Archived-At: On Wed, 30 Apr 2008 17:26:25 +0200, David Kastrup wrote: >Giorgos Keramidas writes: >>On Tue, 29 Apr 2008 17:49:19 +0200, Matthias Pfeifer wrote: >>> Hello, >>> >>> What is the difference between >>> >>> (list 0 nil -1) >>> >>> and >>> >>> '(0 nil -1) >> >> In Common Lisp (list 0 nil -1) is required to 'cons' a new list every >> time it is called. Quoting the list as in '(0 nil -1) is not required >> to build a new list. In fact, in compiled code it may reuse the same >> static object over and over again. > > Wrong word choice. Not "may", but "must". ' produces a list in the > Lisp reader. Nothing may afterwards create gratuitious unannounced > copies. So whether your code is compiled or interpreted: if it is not > reread, no new object is created. Ah! Many thanks for the explanation, David. I am only beginning to grasp Lisp myself too, so I wasn't aware that '-quoting produces the list in the reader :)