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 22:09:22 -0400 Message-ID: References: <535558EA.7070506@dancol.org> <53559BD2.3000006@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1398132602 29780 80.91.229.3 (22 Apr 2014 02:10:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Apr 2014 02:10:02 +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 04:09:53 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 1WcQ9f-0002jb-1J for ged-emacs-devel@m.gmane.org; Tue, 22 Apr 2014 04:09:51 +0200 Original-Received: from localhost ([::1]:52351 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcQ9e-0005xj-Cr for ged-emacs-devel@m.gmane.org; Mon, 21 Apr 2014 22:09:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcQ9U-0005xE-MW for emacs-devel@gnu.org; Mon, 21 Apr 2014 22:09:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WcQ9H-0002zK-38 for emacs-devel@gnu.org; Mon, 21 Apr 2014 22:09:40 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:38980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcQ9G-0002zA-Uh for emacs-devel@gnu.org; Mon, 21 Apr 2014 22:09:27 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s3M29MLR001276; Mon, 21 Apr 2014 22:09:23 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id AC889600CA; Mon, 21 Apr 2014 22:09:22 -0400 (EDT) In-Reply-To: <53559BD2.3000006@dancol.org> (Daniel Colascione's message of "Mon, 21 Apr 2014 15:29:38 -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 <752> : streams <1164241> : uri <1736908> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 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:171559 Archived-At: > Any macro that expands to something like this: > (progn (defmacro abc (arg) 1) (defun def () (abc 2))) That's not the kind of example I was thinking if. Do you have a real example, maybe? > Some of the iface stuff I was working on used this functionality. > The comments in bytecomp.el suggest that EIEIO has similar stuff. No, that comment is about eieio.el using eval-and-compile over large swaths of code, which is very unusual, so I made eval-and-compile behave more like the usual top-level (before that eval-and-compile expanded all its macros in a single pass). > In any case, it's a reasonable thing to want to do, so we should > support it. I'm not sure I want to impose myself this level of detail. Especially since it'll also have to be ported to the eager macro-expansion code. And OTOH your macro could expand calls to `abc' "manually" in the code it returns, and hence avoid this need. Stefan