help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How the backquote and the comma really work?


From: Michael Heerdegen
Subject: Re: How the backquote and the comma really work?
Date: Thu, 25 Jun 2015 20:40:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Drew Adams <drew.adams@oracle.com> writes:

> So `,foo evaluates variable foo, and `',foo evaluates foo and quotes
> the result.

Yes, that's an aspect that was missing in the mental model: backquote
works recursively, i.e. unquoting at deeper list levels is handled as
well.

> (setq titi `',foo) ; => 'bar

Whereby we don't want to conceal that the "'" is also a reader macro:
'thing -> (quote thing).

Here is the expression the reader generates for "`',foo":

  (read "`',foo") ==> (\` (quote (\, foo)))

(be sure to eval with print-quoted nil, the default).


Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]