From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Pirotte Newsgroups: gmane.lisp.guile.user Subject: Re: Help to TeXmacs with Guile 2 Date: Sun, 1 Jun 2014 14:54:13 -0300 Message-ID: <20140601145413.066d6b3b@capac> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1401645315 6452 80.91.229.3 (1 Jun 2014 17:55:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Jun 2014 17:55:15 +0000 (UTC) Cc: Guile To: germanandre@gmx.es Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Jun 01 19:55:09 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 1Wr9yO-0006ET-Iz for guile-user@m.gmane.org; Sun, 01 Jun 2014 19:55:08 +0200 Original-Received: from localhost ([::1]:41582 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wr9yO-0003yn-9N for guile-user@m.gmane.org; Sun, 01 Jun 2014 13:55:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wr9y9-0003yE-Ih for guile-user@gnu.org; Sun, 01 Jun 2014 13:54:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wr9y3-0003hd-Ku for guile-user@gnu.org; Sun, 01 Jun 2014 13:54:53 -0400 Original-Received: from maximusconfessor.all2all.org ([79.99.200.102]:43827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wr9y3-0003YD-Ef for guile-user@gnu.org; Sun, 01 Jun 2014 13:54:47 -0400 Original-Received: from localhost (unknown [192.168.0.2]) by maximusconfessor.all2all.org (Postfix) with ESMTP id 9C834A04C0CD; Sun, 1 Jun 2014 19:54:24 +0200 (CEST) Original-Received: from maximusconfessor.all2all.org ([192.168.0.1]) by localhost (maximusconfessor.all2all.org [192.168.0.2]) (amavisd-new, port 10024) with ESMTP id hvoEjTg6cqjh; Sun, 1 Jun 2014 19:35:22 +0200 (CEST) Original-Received: from capac (unknown [189.60.113.125]) by maximusconfessor.all2all.org (Postfix) with ESMTPSA id 06FD8A04C0DB; Sun, 1 Jun 2014 19:54:16 +0200 (CEST) In-Reply-To: X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 79.99.200.102 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:11282 Archived-At: Hello Germ=C3=A1n, > (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))))))) For these guile version related code, I suggest something like this: (cond-expand (guile-2 ... ...) (else (define-macro (unless test . body) `(if (not ,test) (begin ,@body))) (export unless)))) Here is a real case example [which starts @ line 44]: http://git.savannah.gnu.org/cgit/guile-gnome.git/tree/glib/gnome/gobject/u= tils.scm Cheers, David