diff options
author | Ludovic Courtès | 2012-04-25 16:03:11 +0200 |
---|---|---|
committer | Ludovic Courtès | 2012-04-25 16:03:11 +0200 |
commit | 14909ebe049bcffa22ff45c6216e465d90e7e8a9 (patch) | |
tree | d991e921bd6d37a8579475f43dd650e11d7f6600 | |
parent | 75e8fc92c066e0651278527802ecdc9ef979f319 (diff) | |
download | skribilo-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.
-rw-r--r-- | src/guile/skribilo/writer.scm | 10 | ||||
-rw-r--r-- | src/guile/srfi/srfi-64.upstream.scm | 7 | ||||
-rw-r--r-- | tests/readers/rss-2.test | 6 |
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))))) |