[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: How the backquote and the comma really work?
From: |
Drew Adams |
Subject: |
RE: How the backquote and the comma really work? |
Date: |
Thu, 25 Jun 2015 11:10:51 -0700 (PDT) |
> 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.
RE: How the backquote and the comma really work?,
Drew Adams <=
- Re: How the backquote and the comma really work?, Michael Heerdegen, 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?, 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 availableRe: 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 availableRe: How the backquote and the comma really work?, Rusi, 2015/06/26