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: Simple elisp question Date: Thu, 03 Aug 2006 20:56:20 +0200 Organization: disorganized Message-ID: <871wrxveaz.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 1154632213 16067 80.91.229.2 (3 Aug 2006 19:10:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 3 Aug 2006 19:10:13 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 03 21:10:08 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 1G8iZp-0005y0-GZ for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Aug 2006 21:09:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G8iZo-00055Z-KU for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Aug 2006 15:09:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G8iZV-00052Z-H1 for help-gnu-emacs@gnu.org; Thu, 03 Aug 2006 15:09:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G8iZT-00050u-7k for help-gnu-emacs@gnu.org; Thu, 03 Aug 2006 15:09:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G8iZS-00050Y-Op for help-gnu-emacs@gnu.org; Thu, 03 Aug 2006 15:09:26 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1G8icq-0006Sw-Mr for help-gnu-emacs@gnu.org; Thu, 03 Aug 2006 15:12:56 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1G8iZ6-0005nQ-Fa for help-gnu-emacs@gnu.org; Thu, 03 Aug 2006 21:09:04 +0200 Original-Received: from e178005109.adsl.alicedsl.de ([85.178.5.109]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 Aug 2006 21:09:04 +0200 Original-Received: from david.hansen by e178005109.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 Aug 2006 21:09:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-To: help-gnu-emacs@gnu.org Original-Lines: 22 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: e178005109.adsl.alicedsl.de Mail-Copies-To: nobody User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:4J1GRFIYh6W5S27Pyj8sKDmPaZo= 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:36444 Archived-At: On Thu, 03 Aug 2006 13:47:33 -0400 Chris McMahan wrote: > Here's a basic elisp question: > > I want to use the value of a variable within a list, rather than the > name of the variable. How do I do this? Here's the code in question. > > (setq gnus-select-method > '(nntp "news_server")) > > I want to replace the hard-coded "news_server" with the value of a > variable I've defined called my_news_server defined with > (setq my_news_server "news_server") (list 'nntp my_news_server) or the fancy way (read in th elisp manual about backquote and unquote): `(nntp ,my_news_server) David