From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] trunk r117002: Correctly treat progn contents as toplevel forms when byte compiling Date: Tue, 22 Apr 2014 12:23:36 -0700 Message-ID: <5356C1B8.4070007@dancol.org> References: <535558EA.7070506@dancol.org> <53559BD2.3000006@dancol.org> <5355D244.2050104@dancol.org> <5355F442.6080606@dancol.org> <5356A56B.4060501@dancol.org> <5356B15B.7020802@dancol.org> <172ea415-25d9-48d8-bc98-8017ff5ff332@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="44aaTRKoSjXddvBpxudfc9mUE5whGqiRa" X-Trace: ger.gmane.org 1398194635 5140 80.91.229.3 (22 Apr 2014 19:23:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Apr 2014 19:23:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: Drew Adams , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 22 21:23:49 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 1WcgIH-0001HR-0M for ged-emacs-devel@m.gmane.org; Tue, 22 Apr 2014 21:23:49 +0200 Original-Received: from localhost ([::1]:56858 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcgIG-0004ay-I4 for ged-emacs-devel@m.gmane.org; Tue, 22 Apr 2014 15:23:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcgIE-0004ap-0V for emacs-devel@gnu.org; Tue, 22 Apr 2014 15:23:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WcgIC-0003MI-PA for emacs-devel@gnu.org; Tue, 22 Apr 2014 15:23:45 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:46786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcgIC-0003Lz-Ev for emacs-devel@gnu.org; Tue, 22 Apr 2014 15:23:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=dEb5ZmG+GhLUvhobTADQBCjhLW6f+RGJFWZDgqB/gSs=; b=RxoF/bemUSsdLTzrbV95DfDlRbh/cS23aLpysI34U0LDy/VWzYcpAxA8cy2bueqpiNZS+cWK+ViAPvX45Hfp2fw7jg++wcV+fFBFcMOR5ElG5DqGhBoIdWDvBGwH9ZQAvULTwORHJfuvmjErfUJUg3J58C3yYSvKhaWnzMDmJMSSuxDiPHMDJyRYrjI171WwEZA6qwg2SnqOUbnEq2sK30HFv8xBRbZF1wzpcMs35dslT8qGye4A/vJp686ckrVkUF6Bzke4Dym1mMvGRNPPq+GykpY2HwIlZ37dlblabbPyPGgJU+X117WHP0YP9e1rPJ7HRiWEM4R/5SvVCJdpdA==; Original-Received: from [2601:8:b200:2b6::2b1] by dancol.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1WcgI9-00011O-9s; Tue, 22 Apr 2014 12:23:41 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: <172ea415-25d9-48d8-bc98-8017ff5ff332@default> X-Enigmail-Version: 1.6 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 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:171590 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --44aaTRKoSjXddvBpxudfc9mUE5whGqiRa Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 04/22/2014 11:44 AM, Drew Adams wrote: >> That said, the CL way is much better. It's conceptually simpler to say= >> that defmacro at toplevel is well-defined (progn contents being >> considered "toplevel") and everything else is undefined than to try to= >> support this defmacro stuff in *all* contexts and run into the excitin= g >> corner inherent in your approach... >=20 > Are you saying that in CL if defmacro is used elsewhere than at top lev= el > it is not well-defined? That doesn't sound right to me. >=20 > (Apologies if I misunderstand. If so, or if irrelevant, please ignore.= ) Compilers appear to differ. Consider the code below: (defun foo () (defmacro bar () 1) (bar)) (format t "~s" (foo)) SBCL and ECL both signal an error. CLISP compiles the file, substituting (bar) with 1, then complains when calling foo that bar is redefined. The SBCL and ECL behavior is what I'd expect from reading the spec, but maybe I misunderstood something. --44aaTRKoSjXddvBpxudfc9mUE5whGqiRa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTVsG4AAoJEMAaIROpHW7IaLAP/RQavE37NQG8Nil/CHsOYa3F 2nPqhmnkclrdCXs8OFIkx95XzmZI0kzo5kMcLrea+2bQ2J8kd8dbvWsOMQ84xWr0 m8CmPP+boIx84hND0p5qA8lZoSH6eC5/4YmWTJct2is5xG3yOoxKQNSeMOUeZI4H v99GbPcSvaI2ducQuekmsBu8UxMkXEE8/etJxmXhoav/T+Y6ivZvBuwjSR8doEjY xIZwO1uhhCFCHBnZhWPQ4KpURAgn9PcXy0Ahq2HNS/LqVUWLcQs0/76jbTvPSWFI THOUY3Nxd7lnRCRh0bn9TCmtA+sKoCLBM3LPlKiNv7rVgxR0ib40baS6KIgPQVEX Uo4KooJ7ETzHnSejPVdI1CP/hELvQJDlKz8SdyT7W0ncVOhIweHs0cGous+F4nfv L+OP7ualndJ6OK88Ek8aXq3oMGPvb4erRDxzYv2KxYmlXax08fnUemg7nyprF1/d 7tZ4q7lHG9bBsnKtZAIfTM9wBW/0whnTKCGDCKxcy57EQRx2562kxl7MR4FJ7a4w X8ACgCcxGhhmqaB9DjgogYeT/CEPBbKv2UhAjSvA2C+fM8LJwN5Lv0BGUEL1HIgA CC7sglIbK3MlDSR3y3vYZoy/P1wBdULitbB7mAUztldE5Sw+6gGBA1TWPMMCQvOG NgxmpbxIGmTF0lfbY38B =75r6 -----END PGP SIGNATURE----- --44aaTRKoSjXddvBpxudfc9mUE5whGqiRa--