summaryrefslogtreecommitdiff
path: root/src/guile
diff options
context:
space:
mode:
authorLudovic Courtès2012-04-25 16:03:11 +0200
committerLudovic Courtès2012-04-25 16:03:11 +0200
commit14909ebe049bcffa22ff45c6216e465d90e7e8a9 (patch)
treed991e921bd6d37a8579475f43dd650e11d7f6600 /src/guile
parent75e8fc92c066e0651278527802ecdc9ef979f319 (diff)
downloadskribilo-14909ebe049bcffa22ff45c6216e465d90e7e8a9.tar.gz
skribilo-14909ebe049bcffa22ff45c6216e465d90e7e8a9.tar.lz
skribilo-14909ebe049bcffa22ff45c6216e465d90e7e8a9.zip
Avoid deprecated features on Guile 2.
* src/guile/skribilo/writer.scm (%procedure-arity): Use `procedure-minimum-arity' on Guile 2. * src/guile/srfi/srfi-64.upstream.scm: Use (ice-9 syncase) only when not on Guile 2. * tests/readers/rss-2.test (guile-2): Likewise.
Diffstat (limited to 'src/guile')
-rw-r--r--src/guile/skribilo/writer.scm10
-rw-r--r--src/guile/srfi/srfi-64.upstream.scm7
2 files changed, 11 insertions, 6 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