[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How the backquote and the comma really work?
From: |
Marcin Borkowski |
Subject: |
Re: How the backquote and the comma really work? |
Date: |
Thu, 25 Jun 2015 20:46:26 +0200 |
On 2015-06-25, at 20:10, Drew Adams <drew.adams@oracle.com> wrote:
>> So, I assume that when Emacs Lisp interpreter encounters a
>> backquote, it looks at the expression after it. If it is anything
>> but a list, it just works like the usual quote, and the backquoted
>> expression evaluates to what was backquoted.
>
> Not really. A comma (& additional backquotes & additional commas...)
> still tells the backquote preceding it to evaluate whatever sexp the
> comma precedes.
>
> So `,foo evaluates variable foo, and `',foo evaluates foo and quotes
> the result.
>
> (setq foo 'bar) ; => bar
> (setq toto `,foo) ; => bar
> (setq titi `',foo) ; => 'bar
>
> (setq titi `',foo) is equivalent to (setq titi (list 'quote foo))
>
> Michael H's advice about following the macroexpansion is good.
Thanks, I stand corrected!
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
- Re: How the backquote and the comma really work?, (continued)
- Re: How the backquote and the comma really work?, Marcin Borkowski, 2015/06/25
- Re: How the backquote and the comma really work?, Michael Heerdegen, 2015/06/25
- RE: How the backquote and the comma really work?, Drew Adams, 2015/06/25
- Re: How the backquote and the comma really work?, Marcin Borkowski, 2015/06/25
- RE: How the backquote and the comma really work?, Drew Adams, 2015/06/25
- Re: How the backquote and the comma really work?, Robert Thorpe, 2015/06/25
- Message not available
- Re: How the backquote and the comma really work?, Rusi, 2015/06/25
- Re: How the backquote and the comma really work?, Michael Heerdegen, 2015/06/26
- Message not available
- Re: How the backquote and the comma really work?, Rusi, 2015/06/26
- Re: How the backquote and the comma really work?, Michael Heerdegen, 2015/06/26
Re: How the backquote and the comma really work?,
Marcin Borkowski <=
Re: How the backquote and the comma really work?, tomas, 2015/06/26
Re: How the backquote and the comma really work?, Emanuel Berg, 2015/06/26
Re: How the backquote and the comma really work?, sokobania . 01, 2015/06/30