aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/guile/skribilo/writer.scm10
-rw-r--r--src/guile/srfi/srfi-64.upstream.scm7
-rw-r--r--tests/readers/rss-2.test6
3 files changed, 15 insertions, 8 deletions
diff --git a/src/guile/skribilo/writer.scm b/src/guile/skribilo/writer.scm
index 1032aae..20e8687 100644
--- a/src/guile/skribilo/writer.scm
+++ b/src/guile/skribilo/writer.scm
@@ -1,7 +1,7 @@
;;; writer.scm -- Markup writers.
;;; -*- coding: iso-8859-1 -*-
;;;
-;;; Copyright 2005, 2006, 2008, 2009 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright 2005, 2006, 2008, 2009, 2012 Ludovic Courtès <ludo@gnu.org>
;;; Copyright 2003, 2004 Erick Gallesio - I3S-CNRS/ESSI <eg@essi.fr>
;;;
;;;
@@ -89,9 +89,11 @@
(define (%procedure-arity proc)
- ;; Return the number of required arguments for PROC. This technique is
- ;; known to work with Guile 1.8 and Guile 1.9.5.
- (car (procedure-property proc 'arity)))
+ ;; Return the minimum number of required arguments for PROC.
+ (cond-expand (guile-2
+ (car (procedure-minimum-arity proc)))
+ (else
+ (car (procedure-property proc 'arity)))))
(define (make-writer-predicate markup predicate class)
(let* ((t2 (if class
diff --git a/src/guile/srfi/srfi-64.upstream.scm b/src/guile/srfi/srfi-64.upstream.scm
index 4ad9ccb..15de1f1 100644
--- a/src/guile/srfi/srfi-64.upstream.scm
+++ b/src/guile/srfi/srfi-64.upstream.scm
@@ -24,9 +24,12 @@
(chicken
(require-extension syntax-case))
(guile
- (use-modules (ice-9 syncase) (srfi srfi-9)
+ (use-modules (srfi srfi-9)
;;(srfi srfi-34) (srfi srfi-35) - not in Guile 1.6.7
- (srfi srfi-39)))
+ (srfi srfi-39))
+ (cond-expand ((not guile-2)
+ (ice-9 syncase))
+ (else (begin))))
(sisc
(require-extension (srfi 9 34 35 39)))
(kawa
diff --git a/tests/readers/rss-2.test b/tests/readers/rss-2.test
index 64eccea..e3a3b97 100644
--- a/tests/readers/rss-2.test
+++ b/tests/readers/rss-2.test
@@ -20,8 +20,10 @@
(define-module (tests rss-2)
:use-module (ice-9 match)
:use-module (skribilo reader)
- :use-module (srfi srfi-64)
- :use-module (ice-9 syncase))
+ :use-module (srfi srfi-64))
+
+(cond-expand (guile-2 (begin))
+ (else (use-modules (ice-9 syncase))))
(if (or (not (false-if-exception (resolve-interface '(sxml simple))))
(not (false-if-exception (resolve-interface '(htmlprag)))))