From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: Creating a list Date: Thu, 19 Nov 2009 08:47:09 -0500 Organization: A noiseless patient Spider Message-ID: References: <87k4xnge1t.fsf@Traian.DecebalComp> <87y6m2kj3m.fsf@lola.goethe.zz> <874ooqhjaw.fsf@Traian.DecebalComp> <874ooqkah6.fsf@lola.goethe.zz> <873a4afyi0.fsf@Traian.DecebalComp> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1258642637 8825 80.91.229.12 (19 Nov 2009 14:57:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Nov 2009 14:57:17 +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 Nov 19 15:57:12 2009 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 1NB8RT-0001i3-Sx for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Nov 2009 15:57:04 +0100 Original-Received: from localhost ([127.0.0.1]:34453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NB8RQ-00053a-8p for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Nov 2009 09:57:00 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!news2.euro.net!xlned.com!feeder3.xlned.com!feeder.news-service.com!188.40.43.213.MISMATCH!feeder.eternal-september.org!eternal-september.org!barmar.motzarella.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 41 Original-X-Trace: news.eternal-september.org U2FsdGVkX19L8QFEWMGWFmNJDkUE518PdJqurwhedaFb4ryAOepNqK/pY1pJBUBQHzA0FbPw5RAJqMzrmn2dmE6bIW6o1lj50YL2LoI8tQ7rGrJ4cVAM0BIpKVTL/MIwvaVl4Poj4dw= Original-X-Complaints-To: abuse@eternal-september.org Original-NNTP-Posting-Date: Thu, 19 Nov 2009 13:47:09 +0000 (UTC) User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) X-Auth-Sender: U2FsdGVkX1/43tzbevbDVqow/r1L4fqUCVgk4VaZZus= Cancel-Lock: sha1:FXDeKv+yfNrdckOLbdhmaA6Zxjc= Original-Xref: news.stanford.edu gnu.emacs.help:174849 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:69923 Archived-At: In article <873a4afyi0.fsf@Traian.DecebalComp>, Cecil Westerhof wrote: > David Kastrup writes: > > >>>> At the moment I create a list with: > >>>> (setq ret-val (cons total-amount (cons current-amount ()))) > >>>> I thought about doing it with: > >>>> (setq ret-val (cons total-amount '(current-amount))) > >>>> > >>>> But then the second value is the string current-amount > >>> > >>> Wrong. The _symbol_ current-amount. > >> > >> When evaluating I got: > >> (1570378.2570192777 current-amount) > >> That is why I thought I got the string. > > > > A string would have quote marks around it. > > Off course. I think you mean "of course". > > But I have a few questions on my mind. > - Why is the first shown as value and the second as _symbol_? Because you quoted the list containing the symbol, so it wasn't evaluated. > - current-amount is a local variable. How is it possible that the symbol > is still defined? Symbols are permanent, only bindings are local. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** *** PLEASE don't copy me on replies, I'll read them in the group ***