[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Simple elisp question
From: |
David Hansen |
Subject: |
Re: Simple elisp question |
Date: |
Thu, 03 Aug 2006 20:56:20 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) |
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