From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Backquote Date: Tue, 11 Apr 2006 23:37:34 -0400 Message-ID: <87vetf31vg.fsf-monnier+emacs@gnu.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1144813181 14518 80.91.229.2 (12 Apr 2006 03:39:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 12 Apr 2006 03:39:41 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 12 05:39:39 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FTWCd-0004XR-A0 for ged-emacs-devel@m.gmane.org; Wed, 12 Apr 2006 05:39:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FTWCc-0005K1-Ux for ged-emacs-devel@m.gmane.org; Tue, 11 Apr 2006 23:39:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FTWCQ-0005JZ-0o for emacs-devel@gnu.org; Tue, 11 Apr 2006 23:39:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FTWCO-0005I7-40 for emacs-devel@gnu.org; Tue, 11 Apr 2006 23:39:21 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FTWCN-0005I2-VZ for emacs-devel@gnu.org; Tue, 11 Apr 2006 23:39:20 -0400 Original-Received: from [209.226.175.110] (helo=tomts43-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FTWHO-0000Zc-5G for emacs-devel@gnu.org; Tue, 11 Apr 2006 23:44:30 -0400 Original-Received: from alfajor ([70.55.147.51]) by tomts43-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060412033918.YXTG1543.tomts43-srv.bellnexxia.net@alfajor>; Tue, 11 Apr 2006 23:39:18 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id D36C1D8538; Tue, 11 Apr 2006 23:37:34 -0400 (EDT) Original-To: "Herbert Euler" In-Reply-To: (Herbert Euler's message of "Wed, 12 Apr 2006 08:56:03 +0800") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:52730 Archived-At: > 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 ' to (quote ). What the , ` and ,@ expand to depends on the specific flavor of Lisp. I don't know what it is in CommonLisp, but in Scheme ` is (quasiquote ), , is (unquote ), and ,@ is (unquote-splicing ). There may also be differences in the details: in Emacs Lisp, , only maps to (\, ) if it occurs within a `, 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