From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christian Ohler Newsgroups: gmane.emacs.devel Subject: Re: moving more cl seq/mapping support into core Date: Fri, 08 Oct 2010 12:45:24 +0930 Message-ID: <4CAE8CCC.5060306@fastmail.net> References: <4CAA0FFC.5020809@gmail.com> <4CAE7CCB.7030005@fastmail.net> <8739sh8m1m.fsf@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1286507743 23932 80.91.229.12 (8 Oct 2010 03:15:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Oct 2010 03:15:43 +0000 (UTC) Cc: eliz@gnu.org, MON KEY , dan.colascione@gmail.com, rms@gnu.org, emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 08 05:15:41 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P43Qr-0003te-3E for ged-emacs-devel@m.gmane.org; Fri, 08 Oct 2010 05:15:41 +0200 Original-Received: from localhost ([127.0.0.1]:50203 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P43Qp-0002Fa-S1 for ged-emacs-devel@m.gmane.org; Thu, 07 Oct 2010 23:15:39 -0400 Original-Received: from [140.186.70.92] (port=53512 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P43Qk-0002FT-0Q for emacs-devel@gnu.org; Thu, 07 Oct 2010 23:15:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P43Qi-0006bI-SS for emacs-devel@gnu.org; Thu, 07 Oct 2010 23:15:33 -0400 Original-Received: from out5.smtp.messagingengine.com ([66.111.4.29]:54444) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P43Qh-0006at-8B; Thu, 07 Oct 2010 23:15:31 -0400 Original-Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id 9FD0C3AC; Thu, 7 Oct 2010 23:15:30 -0400 (EDT) Original-Received: from frontend2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 07 Oct 2010 23:15:30 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=MmE2GJgopFf1kQ2PiKjwXn7L/5Q=; b=mU/Z7oKL4i74xUhCnCOCL/ulcaLBS/voXKbEww/uyG822ZrzpKJbQEk8p792b4aTk19dVjZMfJizRCkHtPq82idRKsRkIDqCJRiUxLY3z2xOVinwYUue+ccKbNumnl6LL6nwV90GqP0mqTBjoJWuRQGEVz/npKdyg9mKWoEEt1o= X-Sasl-enc: OeYQD+PQVF8+W3jDJiVIeUfq53XKjINGlJnvzYO/YyHa 1286507729 Original-Received: from [192.168.43.184] (unknown [120.16.59.111]) by mail.messagingengine.com (Postfix) with ESMTPSA id 887855E1884; Thu, 7 Oct 2010 23:15:27 -0400 (EDT) In-Reply-To: <8739sh8m1m.fsf@catnip.gol.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:131466 Archived-At: On 8/10/10 11:48, Miles Bader wrote: > Christian Ohler writes: >> : If cl.el is loaded, ERT needs to pass two arguments to >> macroexpand', only one otherwise. The solution is simple, but >> figuring out that this problem exists took me a while. > The normal (non-cl) macroexpand takes the same arguments, so why do > you need to make a distinction? It takes an environment argument, but I don't know where to get an environment value if cl.el is not loaded. Originally, I defined my macros with defmacro* and &environment, but such macros can only be expanded when cl.el is loaded, since their definition references `cl-macro-environment', which is only bound with cl.el. So I got rid of &environment and instead read `cl-macro-environment' directly if it is bound. It's quite possible that this solution is not quite right or that something even simpler works; I don't understand these mechanisms in detail. Looking at it again, I wonder if the following statement in one of ERT's comments is correct: ;; If `cl-macroexpand' isn't bound, the code that we're ;; compiling doesn't depend on cl and thus doesn't need an ;; environment arg for `macroexpand'. Is it true that we don't need an environment arg? Or do we have to get the byte-compiler's environment and pass it in? Christian.