From 6cfc926fd1f003942d3c80880d1cd243f0c710ec Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 25 Apr 2012 19:59:42 +0200 Subject: 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'. --- src/guile/skribilo/evaluator.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/guile') 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 +;;; Copyright 2005, 2006, 2009, 2012 Ludovic Courtès ;;; Copyright 2003, 2004 Erick Gallesio - I3S-CNRS/ESSI ;;; ;;; @@ -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))))))) ;;; -- cgit v1.2.3