From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?q?Germ=E1n_Arias?= Newsgroups: gmane.lisp.guile.user Subject: Re: Help to TeXmacs with Guile 2 Date: Sun, 01 Jun 2014 23:14:53 -0600 Message-ID: <4ba20ee9a910256f5ad86ed71ec6a10d@german-desktop> References: <20140601145413.066d6b3b@capac> Reply-To: germanandre@gmx.es NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Generated by Pantomime 1.2.0) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1401686151 8431 80.91.229.3 (2 Jun 2014 05:15:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Jun 2014 05:15:51 +0000 (UTC) Cc: Guile To: David Pirotte Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Jun 02 07:15:45 2014 Return-path: Envelope-to: guile-user@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 1WrKb3-0007vM-LQ for guile-user@m.gmane.org; Mon, 02 Jun 2014 07:15:45 +0200 Original-Received: from localhost ([::1]:43081 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrKb3-00054I-7M for guile-user@m.gmane.org; Mon, 02 Jun 2014 01:15:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrKaj-00053z-8A for guile-user@gnu.org; Mon, 02 Jun 2014 01:15:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WrKae-0002md-2N for guile-user@gnu.org; Mon, 02 Jun 2014 01:15:25 -0400 Original-Received: from mout.gmx.com ([74.208.4.201]:51724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrKad-0002mG-Sy for guile-user@gnu.org; Mon, 02 Jun 2014 01:15:20 -0400 Original-Received: from localhost.localdomain ([190.148.151.80]) by mail.gmx.com (mrgmxus002) with ESMTPSA (Nemesis) id 0MI52u-1WoZxT1iE2-003vrB; Mon, 02 Jun 2014 07:14:53 +0200 In-Reply-To: <20140601145413.066d6b3b@capac> User-Agent: GNUMail (Version 1.2.1) X-Provags-ID: V03:K0:KyV1CEIPx5SiFg2wdp4WfJg8ks8BLm5mBPxPJvffspCFpVLGNJy BAf1r1bqFZzTkgNLE9PNSSiOa68z0nZ05RSJTO7aovYiVHXn9Q/ZsuVo9DJv+W/KurJA0PQ IY/zPnyAEia1f5cfWIDjaf80BYgc8Mp+CNqnlnZxCF5Yl3judIQZH5/b0MAp1nyFGf3o3VM duBbvTqLtXWDKYbRaOdQA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 74.208.4.201 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:11283 Archived-At: On 2014-06-01 11:54:13 -0600 David Pirotte wrote: > Hello Germ=E1n, >=20 >> (if (guile-a?) >> (define-macro (define-public-macro head . body) >> `(define-public ,(car head) >> ;; FIXME: why can't we use procedure->macro >> ;; for a non-memoizing variant? >> (procedure->memoizing-macro >> (lambda (cmd env) >> (apply (lambda ,(cdr head) ,@body) (cdr cmd))))))) >=20 > For these guile version related code, I suggest something like this: >=20 > (cond-expand > (guile-2 > ... ...) > (else > (define-macro (unless test . body) > `(if (not ,test) (begin ,@body))) > (export unless)))) >=20 > Here is a real case example [which starts @ line 44]: >=20 > http://git.savannah.gnu.org/cgit/guile-gnome.git/tree/glib/gnome/gobj= ect/utils.scm >=20 > Cheers, > David >=20 >=20 Thanks for the answers. I solved this problem, although now I have other= problems. I will try to solve them, if not I request again your help. Germ=E1n.