From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Understanding macroexp.el Date: Wed, 18 Nov 2015 12:37:00 +0100 Message-ID: References: <87h9kjd2dl.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1447846639 1569 80.91.229.3 (18 Nov 2015 11:37:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Nov 2015 11:37:19 +0000 (UTC) Cc: Stefan Monnier , Emacs Development To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 18 12:37:11 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zz131-0000Tz-0i for ged-emacs-devel@m.gmane.org; Wed, 18 Nov 2015 12:37:11 +0100 Original-Received: from localhost ([::1]:35338 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zz130-0005MY-At for ged-emacs-devel@m.gmane.org; Wed, 18 Nov 2015 06:37:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zz12u-0005J6-VV for emacs-devel@gnu.org; Wed, 18 Nov 2015 06:37:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zz12s-0003sO-2w for emacs-devel@gnu.org; Wed, 18 Nov 2015 06:37:04 -0500 Original-Received: from mx2.suse.de ([195.135.220.15]:38690) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zz12r-0003s2-Sf for emacs-devel@gnu.org; Wed, 18 Nov 2015 06:37:02 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Original-Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BB7C3AC68; Wed, 18 Nov 2015 11:36:37 +0000 (UTC) X-Yow: HELLO, little boys! Gimme a MINT TULIP!! Let's do the BOSSA NOVA!! In-Reply-To: <87h9kjd2dl.fsf@web.de> (Michael Heerdegen's message of "Wed, 18 Nov 2015 11:32:22 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:194701 Archived-At: Michael Heerdegen writes: > Here is an example where it matters: > > (defmacro test (exp) > (macroexp-let2 nil res exp > `(progn > (f ,res) > (g ,res)))) > > (note that the `progn' is mandatory here.) Without the patch: > > (macroexpand '(test (+ 1 2))) > ==> > (let* > ((#:res #1=(+ 1 2))) > (progn > (f #1#) > (g #1#))) > > > After patch: > > (macroexpand '(test (+ 1 2))) > ==> > (let* > ((#:res #1=(+ 1 2))) > (f #1#) > (g #1#)) For byte-compiled code there should be no difference between the two expansions. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."