From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Hansen Newsgroups: gmane.emacs.help Subject: Re: associative list won't append variable contents Date: Tue, 31 Jan 2006 11:31:52 +0100 Organization: disorganized Message-ID: <873bj4wuw7.fsf@robotron.kosmorama> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138704817 3907 80.91.229.2 (31 Jan 2006 10:53:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 10:53:37 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 31 11:53:34 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F3t8U-0002zd-Vx for geh-help-gnu-emacs@m.gmane.org; Tue, 31 Jan 2006 11:53:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F3tB6-0000Zk-8S for geh-help-gnu-emacs@m.gmane.org; Tue, 31 Jan 2006 05:56:04 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Original-X-Trace: news.uni-berlin.de V7mZLHsb/13R6Hv1NWcjwwLmAu+WsaOPxTVpWXqctbEg== X-Orig-Path: robotron.ath.cx!news Mail-Copies-To: nobody User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:T9lcg1LwShNx+fgARIpEJ/jRCAI= Original-Xref: shelby.stanford.edu gnu.emacs.help:137307 Original-To: help-gnu-emacs@gnu.org 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:32930 Archived-At: On Tue, 31 Jan 2006 05:18:25 GMT Shred wrote: > (setq car-0 foo-0) > (setq cdr-0 foo-1) > (setq file-list (append '((car-0 . cdr-0)) file-list)) > > I want the contents of car-0 and cdr-0 to be the actual > car and cdr. > > Lisp creates > > ((car-0 . cdr-0)) > > not > > ((foo-0 . foo-1)) > > Shouldn't this work? The `quote' inhibits all evaluation. Either use the `list'and `cons' function (append (list (cons car-0 cdr-0)) file-list) or the IMHO easier to read `backquote' (C-h f backquote RET for more information): (append `((,car-0 . ,cdr-0)) file-list) David