* Backquote
@ 2006-04-12 0:56 Herbert Euler
2006-04-12 3:37 ` Backquote Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Herbert Euler @ 2006-04-12 0:56 UTC (permalink / raw)
Hello,
To understand how ` works, I read lisp/emacs-lisp/backquote.el.
And I found:
;; When the Lisp reader sees `(...), it generates (\` (...)).
;; When it sees ,... inside such a backquote form, it generates (\,
...).
;; For ,@... it generates (\,@ ...).
Do all Lisp readers have this feature? And is behavior of backquote
in GNU Emacs simillar to other Lisp implementations, especially for
nested backquotes?
Thanks in advance.
Regards,
Guanpeng Xu
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Backquote
2006-04-12 0:56 Backquote Herbert Euler
@ 2006-04-12 3:37 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2006-04-12 3:37 UTC (permalink / raw)
Cc: emacs-devel
> To understand how ` works, I read lisp/emacs-lisp/backquote.el.
> And I found:
> ;; When the Lisp reader sees `(...), it generates (\` (...)).
> ;; When it sees ,... inside such a backquote form, it generates (\, ...).
> ;; For ,@... it generates (\,@ ...).
> Do all Lisp readers have this feature?
More or less. It's just a generalization of the original mapping from '<e>
to (quote <e>). What the , ` and ,@ expand to depends on the specific
flavor of Lisp. I don't know what it is in CommonLisp, but in Scheme `<e> is
(quasiquote <e>), ,<e> is (unquote <e>), and ,@<e> is (unquote-splicing <e>).
There may also be differences in the details: in Emacs Lisp, ,<e> only maps
to (\, <e>) if it occurs within a `<e>, whereas I think this mapping is done
unconditionally in most other Lisps.
> And is behavior of backquote in GNU Emacs similar to other Lisp
> implementations, especially for nested backquotes?
Yes. Tho it depends which version of Emacs Lisp: the behavior of nested
backquotes was changed in Emacs-CVS (the change makes it behave more like
other Lisps and is clearly just a bugfix).
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-04-12 3:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-12 0:56 Backquote Herbert Euler
2006-04-12 3:37 ` Backquote Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).