[PATCH] unless - only when [to :)] running guile version < 2

David Pirotte <[email protected]> Thu, 21 Mar 2013 18:55:06 -0300
Newsgroups gmane.lisp.guile.gtk
Message-ID <20130321185506.20c9a401@capac>
--MP_/0./3KYb8lPO9+tWf1ws.YJ3
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hello,

A little WARNING 'en moins' :)

Cheers,
David

--MP_/0./3KYb8lPO9+tWf1ws.YJ3
Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename=0001-since-version-2.0.5-guile-defines-its-core-macros-wh.patch

From ad3ace988f06a96c8df3e3dbb51cb8b7a939d44e Mon Sep 17 00:00:00 2001
From: David PIROTTE <[email protected]>
Date: Thu, 21 Mar 2013 18:36:10 -0300
Subject: [PATCH] since version 2.0.5, guile defines its core macros when and
 unless -> so they should not be defined unless :) running
 an earlier version then guile-2

---
 glib/gnome/gobject/utils.scm |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/glib/gnome/gobject/utils.scm b/glib/gnome/gobject/utils.scm
index fd88c8f..8f0b3e8 100644
--- a/glib/gnome/gobject/utils.scm
+++ b/glib/gnome/gobject/utils.scm
@@ -35,7 +35,7 @@
                 re-export-modules
                 define-macro-with-docs define-with-docs
                 define-generic-with-docs define-class-with-docs
-                unless with-accessors))
+                with-accessors))
 
 ;;;
 ;;; {Miscellaneous}
@@ -199,8 +199,11 @@ Uses @code{gtype-name->scheme-name}."
                                  (resolve-interface ',mod)))
                  args))))
 
-(define-macro (unless test . body)
-  `(if (not ,test) (begin ,@body)))
+(cond-expand
+ (guile
+  (define-macro (unless test . body)
+    `(if (not ,test) (begin ,@body)))
+  (export unless)))
 
 (cond-expand
  (guile-2
-- 
1.7.10.4


--MP_/0./3KYb8lPO9+tWf1ws.YJ3
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
guile-gtk-general mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/guile-gtk-general

--MP_/0./3KYb8lPO9+tWf1ws.YJ3--