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: [Emacs-diffs] trunk r117002: Correctly treat progn contents as toplevel forms when byte compiling Date: Mon, 21 Apr 2014 18:09:07 -0400 Message-ID: References: <535558EA.7070506@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1398118186 16377 80.91.229.3 (21 Apr 2014 22:09:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Apr 2014 22:09:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 22 00:09:39 2014 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 1WcMPC-0001fs-Mm for ged-emacs-devel@m.gmane.org; Tue, 22 Apr 2014 00:09:38 +0200 Original-Received: from localhost ([::1]:51756 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcMPC-0001Jj-7T for ged-emacs-devel@m.gmane.org; Mon, 21 Apr 2014 18:09:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcMOz-00012u-Cp for emacs-devel@gnu.org; Mon, 21 Apr 2014 18:09:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WcMOm-0003L2-HY for emacs-devel@gnu.org; Mon, 21 Apr 2014 18:09:25 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:51470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcMOm-0003KR-Ct for emacs-devel@gnu.org; Mon, 21 Apr 2014 18:09:12 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s3LM98OY018903; Mon, 21 Apr 2014 18:09:08 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id E27A9600CA; Mon, 21 Apr 2014 18:09:07 -0400 (EDT) In-Reply-To: <535558EA.7070506@dancol.org> (Daniel Colascione's message of "Mon, 21 Apr 2014 10:44:10 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4919=0 X-NAI-Spam-Version: 2.3.0.9378 : core <4919> : inlines <751> : streams <1164208> : uri <1736721> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:171550 Archived-At: >>> Correctly treat progn contents as toplevel forms when byte compiling >> Your commit messages should be copies of the ChangeLog entry. >> Could you describe the case(s) that this fixes? > See the testcases. Generally speaking, this change fixes situations > where the byte-compiler miscompiles code that contains (or generates) > top-level progns that define macros, then use them. Can you show an example of a macro that does that? >>> + ;; Macroexpand (not macroexpand-all!) >> That could be a problem. > Why? We macroexpand-all forms later when we actually compile or eval them. Not sure why, exactly. It just feels like it could be a problem. Usually, we assume it's safe to use macroexpand-all, and it's not 100% crystal clear why we could be sure that macroexpand-all won't be used. > Unless there's a good reason to depart from CL, we should follow CL's > approach to things. CL in a good sane default, and in this case, CL > specifies exactly the right behavior. Yes. But Elisp's design constraints, especially w.r.t macro expansion, are slightly different, partly for historical reasons, partly for technical reasons. It might not be relevant here, but I just want to make double sure. Stefan