From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Han-Wen Nienhuys Newsgroups: gmane.lisp.guile.devel,gmane.comp.gnu.lilypond.devel Subject: definitions in macros? Date: Sun, 22 Mar 2020 20:07:11 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="10870"; mail-complaints-to="usenet@ciao.gmane.io" Cc: lilypond-devel To: Guile Devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sun Mar 22 20:07:41 2020 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jG5wj-0002i5-On for guile-devel@m.gmane-mx.org; Sun, 22 Mar 2020 20:07:41 +0100 Original-Received: from localhost ([::1]:49062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jG5wi-0002jx-LX for guile-devel@m.gmane-mx.org; Sun, 22 Mar 2020 15:07:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60846) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jG5wV-0002jd-2J for guile-devel@gnu.org; Sun, 22 Mar 2020 15:07:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jG5wT-00023p-Vd for guile-devel@gnu.org; Sun, 22 Mar 2020 15:07:26 -0400 Original-Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]:40148) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jG5wT-00023H-Oo; Sun, 22 Mar 2020 15:07:25 -0400 Original-Received: by mail-lf1-x136.google.com with SMTP id j17so8502375lfe.7; Sun, 22 Mar 2020 12:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=gekpXeiLldfLctZW6eA8PLkq0qRDUuccGG92ge01O9I=; b=Se6JrfZsfdaAI+mkzLSujP6FasQ66ZNiNkV4x3Jk53zAYKxU5DfoG4QF/U4MNoVYmv 8kf6erFKsmZCMzbHUv4CEZc2LHh2wAvc0A/03ekE/6iNlGBDDy7ATMO/pM/pWScggYeC VXnMpcomo1f8wiZt8C+0jL1g/QGjFgxrwptGwMeNpWoxVObv4+BbhNCz5jnUQGE0y86X jVfmf8dYrGrLsCRMakyWYp9WdPt7pmuW9Sw9e2KNw0h2w9XmCPfWyDNNARYmUw40skIu fHW/A7pF+DVUsDtltEj01ysF9fh+p3QBfcB6UZMEthV4otfmaN5Z78uOG3Dt5CNzzSqP Yq0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=gekpXeiLldfLctZW6eA8PLkq0qRDUuccGG92ge01O9I=; b=OItVqE6kUkF4hDtatbCz1sTcrH0CNloZOsSSAwaB4eIbw6OrlgD3W96LcMySo5Bg0G zwRDRxllvh9gLoqMNsK5SW9dNEbVeqkUsOvzlC9AnQ6kvfL49I0Quc+rK9TQwmAy82Hw 5saL8W9YykOpKLG3Lu5Lls9F8c4OF/jk+uj1VYgeZlg+iS6rVMPEjB77RubhLYGRUyMB GwncYwnZt3AFO8/yO+7xAvUE7yO7zyVYd9SeOpc2vy1D9vGbACot2Hjypr5RggTkNGta mYsHfVz3O214ux5cdTBWcPBh9NGYsbCuizStQGw/LNLhNuYvUJm30koJvplkpbenyZkO 0/Hg== X-Gm-Message-State: ANhLgQ3Fm9Cr6+O/t0cxZotvqt7HqjhdeK8A7AR0U0P309QVOYVSFyG7 29vbKiOhfDtpOAZ6jv3tA/0+3NHMbXoEl0HfTCcPdZOxpxU= X-Google-Smtp-Source: ADFU+vtVqhQKtTo+OwvcHn+80Wel3p5+rQub0ISb4oThIg8U90OVvSQEnRiyhmMbZrhmC1Jc/62OPZRhYMe2JUvN92k= X-Received: by 2002:a05:6512:68b:: with SMTP id t11mr11194286lfe.214.1584904042778; Sun, 22 Mar 2020 12:07:22 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::136 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20454 gmane.comp.gnu.lilypond.devel:74338 Archived-At: Hi there, in my quest to get lilypond working with GUILE 2+, I've hit another stumbling block. In order to make compilation with GUILE 2+ working, we have to move away from runtime symbol definition (ie. module-define! calls). In the code below, it looks like only one of the two definitions in the body of my-macro-new takes effect. Is this expected, and if so, why? (defmacro-public my-macro-old (command-and-args . definition) (module-define! (current-module) 'x1 "I am X1\n") (module-define! (current-module) 'x2 "I am X2\n")) (defmacro-public my-macro-new (command-and-args . definition) `(define p "i am P\n") `(define q "i am Q\n")) (my-macro-old 1 2) (my-macro-new 1 2) (display x1) (display x2) (display q) (display p) thanks, -- Han-Wen Nienhuys - hanwenn@gmail.com - http://www.xs4all.nl/~hanwen