From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3495 invoked by alias); 29 Aug 2007 13:57:55 -0000 Received: (qmail 3281 invoked by uid 22791); 29 Aug 2007 13:57:51 -0000 X-Spam-Check-By: sourceware.org Received: from el-out-1112.google.com (HELO el-out-1112.google.com) (209.85.162.179) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 29 Aug 2007 13:57:43 +0000 Received: by el-out-1112.google.com with SMTP id r27so80591ele for ; Wed, 29 Aug 2007 06:57:40 -0700 (PDT) Received: by 10.115.33.1 with SMTP id l1mr11342waj.1188395859980; Wed, 29 Aug 2007 06:57:39 -0700 (PDT) Received: by 10.115.108.16 with HTTP; Wed, 29 Aug 2007 06:57:39 -0700 (PDT) Message-ID: <87a5b0800708290657u2e08520fme16e81075b14cdf4@mail.gmail.com> Date: Wed, 29 Aug 2007 13:57:00 -0000 From: "Will Newton" To: cgen@sourceware.org Subject: Passing args with nested pmacros MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-IsSubscribed: yes Mailing-List: contact cgen-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sourceware.org X-SW-Source: 2007-q3/txt/msg00006.txt.bz2 Hi all, I'm trying to simplify some cgen macros and I would like to be able to to map a pmacro over a list, but also pass the pmacro some other arguments. e.g. (define-pmacro (sub-macro item arg) ...) (define-pmacro (top-level top-level-arg) (.map (.pmacro (list-item) (sub-macro list-item top-level-arg)))) But this doesn't look like it's possible because .pmacro's don't do lexical scoping. Is there any way to do what I want? Thanks,