aboutsummaryrefslogtreecommitdiff
path: root/src/guile
diff options
context:
space:
mode:
authorLudovic Courtès2012-04-25 19:59:42 +0200
committerLudovic Courtès2012-04-25 19:59:42 +0200
commit6cfc926fd1f003942d3c80880d1cd243f0c710ec (patch)
tree5d00c7798b852909d43b6dc922a53ac6f2ccb4fb /src/guile
parent14909ebe049bcffa22ff45c6216e465d90e7e8a9 (diff)
downloadskribilo-6cfc926fd1f003942d3c80880d1cd243f0c710ec.tar.gz
skribilo-6cfc926fd1f003942d3c80880d1cd243f0c710ec.tar.lz
skribilo-6cfc926fd1f003942d3c80880d1cd243f0c710ec.zip
evaluator: Don't use `debug-options' on Guile 2.
* src/guile/skribilo/evaluator.scm (%evaluate): Add a `guile-2' version that doesn't use `debug-options'.
Diffstat (limited to 'src/guile')
-rw-r--r--src/guile/skribilo/evaluator.scm11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/guile/skribilo/evaluator.scm b/src/guile/skribilo/evaluator.scm
index 07a578b..36a5ede 100644
--- a/src/guile/skribilo/evaluator.scm
+++ b/src/guile/skribilo/evaluator.scm
@@ -1,7 +1,7 @@
;;; eval.scm -- Skribilo evaluator.
;;; -*- coding: iso-8859-1 -*-
;;;
-;;; Copyright 2005, 2006, 2009 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright 2005, 2006, 2009, 2012 Ludovic Courtès <ludo@gnu.org>
;;; Copyright 2003, 2004 Erick Gallesio - I3S-CNRS/ESSI <eg@essi.fr>
;;;
;;;
@@ -60,8 +60,11 @@
;; Evaluate EXPR in the current module. EXPR is an arbitrary S-expression
;; that may contain calls to the markup functions defined in a markup
;; package such as `(skribilo package base)', e.g., `(bold "hello")'.
- (let ((opts (debug-options)))
- (dynamic-wind
+ (cond-expand
+ (guile-2 (eval expr module))
+ (else
+ (let ((opts (debug-options)))
+ (dynamic-wind
(lambda ()
;; Force use of the debugging evaluator so that we can track source
;; location.
@@ -71,7 +74,7 @@
(eval expr module))
(lambda ()
;; Restore previous evaluator options.
- (debug-options opts)))))
+ (debug-options opts)))))))
;;;