From 3a72d5b1cf38fc3c579336e76e2b0354dcd4c4ae Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 24 Mar 2009 23:10:54 +0100 Subject: Add `(skribilo-module-syntax)'. * src/guile/skribilo/utils/syntax.scm (skribilo-module-syntax): New macro. * src/guile/*/*.scm: Use `(skribilo-module-syntax)' instead of `(fluid-set! current-reader %skribilo-module-reader)'. The goal is to be more compilation-friendly. --- src/guile/skribilo.scm | 2 +- src/guile/skribilo/ast.scm | 4 ++-- src/guile/skribilo/biblio.scm | 2 +- src/guile/skribilo/biblio/template.scm | 2 +- src/guile/skribilo/color.scm | 2 +- src/guile/skribilo/debug.scm | 2 +- src/guile/skribilo/engine.scm | 2 +- src/guile/skribilo/engine/base.scm | 2 +- src/guile/skribilo/engine/context.scm | 2 +- src/guile/skribilo/engine/html.scm | 2 +- src/guile/skribilo/engine/html4.scm | 2 +- src/guile/skribilo/engine/info.scm | 2 +- src/guile/skribilo/engine/latex.scm | 2 +- src/guile/skribilo/engine/lout.scm | 2 +- src/guile/skribilo/engine/xml.scm | 2 +- src/guile/skribilo/evaluator.scm | 2 +- src/guile/skribilo/index.scm | 2 +- src/guile/skribilo/lib.scm | 2 +- src/guile/skribilo/location.scm | 4 ++-- src/guile/skribilo/module.scm | 2 +- src/guile/skribilo/output.scm | 2 +- src/guile/skribilo/package/acmproc.scm | 2 +- src/guile/skribilo/package/base.scm | 2 +- src/guile/skribilo/package/diff.scm | 2 +- src/guile/skribilo/package/eq.scm | 2 +- src/guile/skribilo/package/eq/lout.scm | 2 +- src/guile/skribilo/package/html-navtabs.scm | 2 +- src/guile/skribilo/package/jfp.scm | 2 +- src/guile/skribilo/package/letter.scm | 2 +- src/guile/skribilo/package/lncs.scm | 2 +- src/guile/skribilo/package/pie.scm | 2 +- src/guile/skribilo/package/pie/lout.scm | 2 +- src/guile/skribilo/package/scribe.scm | 2 +- src/guile/skribilo/package/sigplan.scm | 2 +- src/guile/skribilo/package/slide.scm | 2 +- src/guile/skribilo/package/slide/base.scm | 2 +- src/guile/skribilo/package/slide/html.scm | 2 +- src/guile/skribilo/package/slide/latex.scm | 2 +- src/guile/skribilo/package/slide/lout.scm | 2 +- src/guile/skribilo/package/web-article.scm | 2 +- src/guile/skribilo/package/web-book.scm | 2 +- src/guile/skribilo/package/web-book2.scm | 2 +- src/guile/skribilo/prog.scm | 2 +- src/guile/skribilo/reader/outline.scm | 2 +- src/guile/skribilo/reader/rss-2.scm | 2 +- src/guile/skribilo/resolve.scm | 2 +- src/guile/skribilo/source.scm | 2 +- src/guile/skribilo/source/c.scm | 2 +- src/guile/skribilo/sui.scm | 4 ++-- src/guile/skribilo/table.scm | 2 +- src/guile/skribilo/utils/compat.scm | 2 +- src/guile/skribilo/utils/syntax.scm | 6 +++++- src/guile/skribilo/utils/text-table.scm | 2 +- src/guile/skribilo/verify.scm | 2 +- 54 files changed, 61 insertions(+), 57 deletions(-) (limited to 'src') diff --git a/src/guile/skribilo.scm b/src/guile/skribilo.scm index 40649e0..7208a00 100644 --- a/src/guile/skribilo.scm +++ b/src/guile/skribilo.scm @@ -49,7 +49,7 @@ ;; Install the Skribilo module syntax reader. -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) (if (not (keyword? :kw)) (error "guile-reader sucks")) diff --git a/src/guile/skribilo/ast.scm b/src/guile/skribilo/ast.scm index d71ec31..3de6947 100644 --- a/src/guile/skribilo/ast.scm +++ b/src/guile/skribilo/ast.scm @@ -1,6 +1,6 @@ ;;; ast.scm -- Skribilo abstract syntax trees. ;;; -;;; Copyright 2003, 2004 Erick Gallesio - I3S-CNRS/ESSI +;;; Copyright 2003, 2004, 2009 Erick Gallesio - I3S-CNRS/ESSI ;;; Copyright 2003, 2004 Manuel Serrano ;;; Copyright 2005, 2006, 2007 Ludovic Courtès ;;; @@ -92,7 +92,7 @@ ;;; ;;; Code: -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) diff --git a/src/guile/skribilo/biblio.scm b/src/guile/skribilo/biblio.scm index c5cdc83..24b7118 100644 --- a/src/guile/skribilo/biblio.scm +++ b/src/guile/skribilo/biblio.scm @@ -73,7 +73,7 @@ ;;; ;;; Code: -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) diff --git a/src/guile/skribilo/biblio/template.scm b/src/guile/skribilo/biblio/template.scm index cf17a92..9429ec6 100644 --- a/src/guile/skribilo/biblio/template.scm +++ b/src/guile/skribilo/biblio/template.scm @@ -37,7 +37,7 @@ make-bib-entry-template/default make-bib-entry-template/skribe)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; Author: Manuel Serrano, Ludovic Courtès ;;; diff --git a/src/guile/skribilo/color.scm b/src/guile/skribilo/color.scm index 2f93cff..16592f5 100644 --- a/src/guile/skribilo/color.scm +++ b/src/guile/skribilo/color.scm @@ -27,7 +27,7 @@ :autoload (srfi srfi-60) (bitwise-and arithmetic-shift) :export (color->rgb document-used-colors)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) diff --git a/src/guile/skribilo/debug.scm b/src/guile/skribilo/debug.scm index 3b62b6f..46189f2 100644 --- a/src/guile/skribilo/debug.scm +++ b/src/guile/skribilo/debug.scm @@ -24,7 +24,7 @@ :use-module (srfi srfi-39) :export-syntax (debug-item debug-bold with-debug)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; diff --git a/src/guile/skribilo/engine.scm b/src/guile/skribilo/engine.scm index 1cec513..c52f48b 100644 --- a/src/guile/skribilo/engine.scm +++ b/src/guile/skribilo/engine.scm @@ -49,7 +49,7 @@ unknown-engine-error:engine-name)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; diff --git a/src/guile/skribilo/engine/base.scm b/src/guile/skribilo/engine/base.scm index b4e5fd9..fb9cb33 100644 --- a/src/guile/skribilo/engine/base.scm +++ b/src/guile/skribilo/engine/base.scm @@ -35,7 +35,7 @@ :export (base-engine)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;*---------------------------------------------------------------------*/ diff --git a/src/guile/skribilo/engine/context.scm b/src/guile/skribilo/engine/context.scm index 110431f..10d5e1e 100644 --- a/src/guile/skribilo/engine/context.scm +++ b/src/guile/skribilo/engine/context.scm @@ -39,7 +39,7 @@ :export (context-engine ConTeXt TeX)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) diff --git a/src/guile/skribilo/engine/html.scm b/src/guile/skribilo/engine/html.scm index 9f969c5..4a9f99f 100644 --- a/src/guile/skribilo/engine/html.scm +++ b/src/guile/skribilo/engine/html.scm @@ -48,7 +48,7 @@ html-width html-class html-markup-class html-title-authors)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) diff --git a/src/guile/skribilo/engine/html4.scm b/src/guile/skribilo/engine/html4.scm index 9141469..61c5d8f 100644 --- a/src/guile/skribilo/engine/html4.scm +++ b/src/guile/skribilo/engine/html4.scm @@ -33,7 +33,7 @@ :use-module (srfi srfi-1) :use-module ((srfi srfi-19) :renamer (symbol-prefix-proc 's19:))) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) (define (find-children node) diff --git a/src/guile/skribilo/engine/info.scm b/src/guile/skribilo/engine/info.scm index a6ac5bd..0a60b17 100644 --- a/src/guile/skribilo/engine/info.scm +++ b/src/guile/skribilo/engine/info.scm @@ -37,7 +37,7 @@ :export (info-engine)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) (define info-engine diff --git a/src/guile/skribilo/engine/latex.scm b/src/guile/skribilo/engine/latex.scm index bb7e15e..89bf2af 100644 --- a/src/guile/skribilo/engine/latex.scm +++ b/src/guile/skribilo/engine/latex.scm @@ -41,7 +41,7 @@ LaTeX TeX !latex skribe-color->latex-rgb)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) diff --git a/src/guile/skribilo/engine/lout.scm b/src/guile/skribilo/engine/lout.scm index 7a9e871..e2796ff 100644 --- a/src/guile/skribilo/engine/lout.scm +++ b/src/guile/skribilo/engine/lout.scm @@ -58,7 +58,7 @@ ;;; ;;; For more information on Lout, see http://lout.sf.net/ . -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) diff --git a/src/guile/skribilo/engine/xml.scm b/src/guile/skribilo/engine/xml.scm index b99a814..0990d24 100644 --- a/src/guile/skribilo/engine/xml.scm +++ b/src/guile/skribilo/engine/xml.scm @@ -29,7 +29,7 @@ :use-module (srfi srfi-1) :export (xml-engine)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) diff --git a/src/guile/skribilo/evaluator.scm b/src/guile/skribilo/evaluator.scm index c816658..329ba61 100644 --- a/src/guile/skribilo/evaluator.scm +++ b/src/guile/skribilo/evaluator.scm @@ -49,7 +49,7 @@ (srfi srfi-39)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; diff --git a/src/guile/skribilo/index.scm b/src/guile/skribilo/index.scm index b537fb4..1a536d9 100644 --- a/src/guile/skribilo/index.scm +++ b/src/guile/skribilo/index.scm @@ -39,7 +39,7 @@ default-index resolve-the-index)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; Author: Manuel Serrano ;;; Commentary: diff --git a/src/guile/skribilo/lib.scm b/src/guile/skribilo/lib.scm index 9c0158d..06d12ea 100644 --- a/src/guile/skribilo/lib.scm +++ b/src/guile/skribilo/lib.scm @@ -46,7 +46,7 @@ :use-module (oop goops)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; diff --git a/src/guile/skribilo/location.scm b/src/guile/skribilo/location.scm index 5b50d63..b580e79 100644 --- a/src/guile/skribilo/location.scm +++ b/src/guile/skribilo/location.scm @@ -21,7 +21,7 @@ (define-module (skribilo location) :use-module (oop goops) - :use-module ((skribilo utils syntax) :select (%skribilo-module-reader)) + :use-module ((skribilo utils syntax) :select (skribilo-module-syntax)) :autoload (srfi srfi-13) (string-prefix?) :export ( location? ast-location location-file location-line location-column @@ -35,7 +35,7 @@ ;;; ;;; Code: -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; diff --git a/src/guile/skribilo/module.scm b/src/guile/skribilo/module.scm index dedfdd0..a7f67fc 100644 --- a/src/guile/skribilo/module.scm +++ b/src/guile/skribilo/module.scm @@ -25,7 +25,7 @@ :export (make-user-module user-module-flavor *skribilo-user-module*)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; Author: Ludovic Courtès ;;; diff --git a/src/guile/skribilo/output.scm b/src/guile/skribilo/output.scm index 23fc16a..1adac70 100644 --- a/src/guile/skribilo/output.scm +++ b/src/guile/skribilo/output.scm @@ -40,7 +40,7 @@ output-error? output-unresolved-error? output-writer-error?)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; diff --git a/src/guile/skribilo/package/acmproc.scm b/src/guile/skribilo/package/acmproc.scm index 4a3c4a2..1799d05 100644 --- a/src/guile/skribilo/package/acmproc.scm +++ b/src/guile/skribilo/package/acmproc.scm @@ -37,7 +37,7 @@ :export (abstract references acm-copyright)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) diff --git a/src/guile/skribilo/package/base.scm b/src/guile/skribilo/package/base.scm index 862d146..373be1d 100644 --- a/src/guile/skribilo/package/base.scm +++ b/src/guile/skribilo/package/base.scm @@ -42,7 +42,7 @@ :replace (symbol)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; Author: Manuel Serrano ;;; Commentary: diff --git a/src/guile/skribilo/package/diff.scm b/src/guile/skribilo/package/diff.scm index 95842aa..519364b 100644 --- a/src/guile/skribilo/package/diff.scm +++ b/src/guile/skribilo/package/diff.scm @@ -41,7 +41,7 @@ :export (make-diff-document make-diff-document-from-files)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; Author: Ludovic Courtès ;;; diff --git a/src/guile/skribilo/package/eq.scm b/src/guile/skribilo/package/eq.scm index 38d54c6..789583e 100644 --- a/src/guile/skribilo/package/eq.scm +++ b/src/guile/skribilo/package/eq.scm @@ -50,7 +50,7 @@ ;;; ;;; Code: -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) diff --git a/src/guile/skribilo/package/eq/lout.scm b/src/guile/skribilo/package/eq/lout.scm index e5d8d85..d7571c4 100644 --- a/src/guile/skribilo/package/eq/lout.scm +++ b/src/guile/skribilo/package/eq/lout.scm @@ -28,7 +28,7 @@ :use-module (skribilo utils syntax) :use-module (srfi srfi-1)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) diff --git a/src/guile/skribilo/package/html-navtabs.scm b/src/guile/skribilo/package/html-navtabs.scm index d50f456..5cf355b 100644 --- a/src/guile/skribilo/package/html-navtabs.scm +++ b/src/guile/skribilo/package/html-navtabs.scm @@ -31,7 +31,7 @@ :use-module (skribilo utils strings) :use-module (skribilo utils syntax)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) (define (unspecified? obj) diff --git a/src/guile/skribilo/package/jfp.scm b/src/guile/skribilo/package/jfp.scm index 7360140..012165e 100644 --- a/src/guile/skribilo/package/jfp.scm +++ b/src/guile/skribilo/package/jfp.scm @@ -45,7 +45,7 @@ ;;; ;;; Code: -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) (define every? every) diff --git a/src/guile/skribilo/package/letter.scm b/src/guile/skribilo/package/letter.scm index 6f5c248..5baf5dc 100644 --- a/src/guile/skribilo/package/letter.scm +++ b/src/guile/skribilo/package/letter.scm @@ -32,7 +32,7 @@ :use-module (skribilo utils syntax) :use-module (ice-9 optargs)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;*---------------------------------------------------------------------*/ diff --git a/src/guile/skribilo/package/lncs.scm b/src/guile/skribilo/package/lncs.scm index 8546b14..28e565c 100644 --- a/src/guile/skribilo/package/lncs.scm +++ b/src/guile/skribilo/package/lncs.scm @@ -41,7 +41,7 @@ :export (abstract references)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; Author: Manuel Serrano, Ludovic Courtès ;;; diff --git a/src/guile/skribilo/package/pie.scm b/src/guile/skribilo/package/pie.scm index ee3c187..0b0d622 100644 --- a/src/guile/skribilo/package/pie.scm +++ b/src/guile/skribilo/package/pie.scm @@ -35,7 +35,7 @@ :export (%ploticus-program %ploticus-debug? pie-sliceweight-value pie-remove-markup)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) diff --git a/src/guile/skribilo/package/pie/lout.scm b/src/guile/skribilo/package/pie/lout.scm index eb73729..fe3c674 100644 --- a/src/guile/skribilo/package/pie/lout.scm +++ b/src/guile/skribilo/package/pie/lout.scm @@ -28,7 +28,7 @@ :use-module (skribilo utils syntax) :autoload (skribilo engine lout) (lout-color-specification)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) diff --git a/src/guile/skribilo/package/scribe.scm b/src/guile/skribilo/package/scribe.scm index 40a8d29..8f16a2a 100644 --- a/src/guile/skribilo/package/scribe.scm +++ b/src/guile/skribilo/package/scribe.scm @@ -42,7 +42,7 @@ *scribe-tforeground* *scribe-title-font* *scribe-author-font* *scribe-chapter-numbering* *scribe-footer* *scribe-prgm-color*)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; Author: Manuel Serrano, Ludovic Courtès ;;; diff --git a/src/guile/skribilo/package/sigplan.scm b/src/guile/skribilo/package/sigplan.scm index 5be8ac5..e00ec80 100644 --- a/src/guile/skribilo/package/sigplan.scm +++ b/src/guile/skribilo/package/sigplan.scm @@ -35,7 +35,7 @@ :export (abstract references acm-copyright)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;*---------------------------------------------------------------------*/ diff --git a/src/guile/skribilo/package/slide.scm b/src/guile/skribilo/package/slide.scm index 050ed6a..7ee2207 100644 --- a/src/guile/skribilo/package/slide.scm +++ b/src/guile/skribilo/package/slide.scm @@ -34,7 +34,7 @@ :use-module (ice-9 optargs) :use-module (ice-9 match)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) diff --git a/src/guile/skribilo/package/slide/base.scm b/src/guile/skribilo/package/slide/base.scm index cb50ca1..33154f2 100644 --- a/src/guile/skribilo/package/slide/base.scm +++ b/src/guile/skribilo/package/slide/base.scm @@ -33,7 +33,7 @@ :export (%slide-outline-itemize-symbols)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) diff --git a/src/guile/skribilo/package/slide/html.scm b/src/guile/skribilo/package/slide/html.scm index e8da8fb..baa75c2 100644 --- a/src/guile/skribilo/package/slide/html.scm +++ b/src/guile/skribilo/package/slide/html.scm @@ -33,7 +33,7 @@ :use-module (skribilo package base)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) diff --git a/src/guile/skribilo/package/slide/latex.scm b/src/guile/skribilo/package/slide/latex.scm index 825f281..75f17eb 100644 --- a/src/guile/skribilo/package/slide/latex.scm +++ b/src/guile/skribilo/package/slide/latex.scm @@ -40,7 +40,7 @@ :export (%slide-latex-mode %slide-latex-initialize! *slide-advi-scale*)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) (define %slide-latex-mode 'seminar) diff --git a/src/guile/skribilo/package/slide/lout.scm b/src/guile/skribilo/package/slide/lout.scm index ef5ded9..b262755 100644 --- a/src/guile/skribilo/package/slide/lout.scm +++ b/src/guile/skribilo/package/slide/lout.scm @@ -41,7 +41,7 @@ lout-verbatim-encoding)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; TODO: diff --git a/src/guile/skribilo/package/web-article.scm b/src/guile/skribilo/package/web-article.scm index d291c7c..f33c987 100644 --- a/src/guile/skribilo/package/web-article.scm +++ b/src/guile/skribilo/package/web-article.scm @@ -34,7 +34,7 @@ :use-module (srfi srfi-1)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;; FIXME: The purpose of this package is unclear, and it relies on "documents ;; made of sections" (according to the doc), which sucks (we want all diff --git a/src/guile/skribilo/package/web-book.scm b/src/guile/skribilo/package/web-book.scm index 624a8d2..6cdc84e 100644 --- a/src/guile/skribilo/package/web-book.scm +++ b/src/guile/skribilo/package/web-book.scm @@ -26,7 +26,7 @@ :use-module (skribilo engine) :use-module (skribilo package base)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) diff --git a/src/guile/skribilo/package/web-book2.scm b/src/guile/skribilo/package/web-book2.scm index 8b50e99..4dddac5 100644 --- a/src/guile/skribilo/package/web-book2.scm +++ b/src/guile/skribilo/package/web-book2.scm @@ -30,7 +30,7 @@ :replace (chapter section subsection subsubsection)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; Author: Ludovic Courtès ;;; diff --git a/src/guile/skribilo/prog.scm b/src/guile/skribilo/prog.scm index b29f14a..a67b005 100644 --- a/src/guile/skribilo/prog.scm +++ b/src/guile/skribilo/prog.scm @@ -30,7 +30,7 @@ :export (make-prog-body resolve-line)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; diff --git a/src/guile/skribilo/reader/outline.scm b/src/guile/skribilo/reader/outline.scm index ea4ac48..70e3961 100644 --- a/src/guile/skribilo/reader/outline.scm +++ b/src/guile/skribilo/reader/outline.scm @@ -34,7 +34,7 @@ :export (reader-specification make-outline-reader)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; Author: Ludovic Courtès ;;; diff --git a/src/guile/skribilo/reader/rss-2.scm b/src/guile/skribilo/reader/rss-2.scm index c3ae632..aa393b9 100755 --- a/src/guile/skribilo/reader/rss-2.scm +++ b/src/guile/skribilo/reader/rss-2.scm @@ -37,7 +37,7 @@ :export (reader-specification)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; Author: Ludovic Courtès ;;; diff --git a/src/guile/skribilo/resolve.scm b/src/guile/skribilo/resolve.scm index f902f69..062161f 100644 --- a/src/guile/skribilo/resolve.scm +++ b/src/guile/skribilo/resolve.scm @@ -35,7 +35,7 @@ resolve-counter resolve-parent resolve-ident *document-being-resolved*)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) diff --git a/src/guile/skribilo/source.scm b/src/guile/skribilo/source.scm index 94e6436..b3828e3 100644 --- a/src/guile/skribilo/source.scm +++ b/src/guile/skribilo/source.scm @@ -42,7 +42,7 @@ :use-module (ice-9 rdelim)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; diff --git a/src/guile/skribilo/source/c.scm b/src/guile/skribilo/source/c.scm index a0d04e0..49328b9 100644 --- a/src/guile/skribilo/source/c.scm +++ b/src/guile/skribilo/source/c.scm @@ -27,7 +27,7 @@ :use-module (srfi srfi-39) :export (c c-language java)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; diff --git a/src/guile/skribilo/sui.scm b/src/guile/skribilo/sui.scm index e60a324..8e5cb12 100644 --- a/src/guile/skribilo/sui.scm +++ b/src/guile/skribilo/sui.scm @@ -1,6 +1,6 @@ ;;; sui.scm -- Skribe URL Indices ;;; -;;; Copyright 2005, 2006, 2007, 2008 Ludovic Courtès +;;; Copyright 2005, 2006, 2007, 2008, 2009 Ludovic Courtès ;;; Copyright 2003, 2004 Manuel Serrano ;;; ;;; @@ -41,7 +41,7 @@ sui-find-ref sui-search-ref sui-filter document-sui sui-referenced-file sui-marks sui-blocks)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; Author: Manuel Serrano, Ludovic Courtès diff --git a/src/guile/skribilo/table.scm b/src/guile/skribilo/table.scm index 440264f..47b3894 100644 --- a/src/guile/skribilo/table.scm +++ b/src/guile/skribilo/table.scm @@ -34,7 +34,7 @@ ;;; ;;; Code: -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) (define (table-column-count t) diff --git a/src/guile/skribilo/utils/compat.scm b/src/guile/skribilo/utils/compat.scm index df84904..2777466 100644 --- a/src/guile/skribilo/utils/compat.scm +++ b/src/guile/skribilo/utils/compat.scm @@ -50,7 +50,7 @@ ;;; ;;; Code: -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;;; diff --git a/src/guile/skribilo/utils/syntax.scm b/src/guile/skribilo/utils/syntax.scm index b905871..4cb856f 100644 --- a/src/guile/skribilo/utils/syntax.scm +++ b/src/guile/skribilo/utils/syntax.scm @@ -22,7 +22,7 @@ :use-module (system reader library) :use-module (system reader compat) ;; make sure `current-reader' exists :use-module (system reader confinement) - :export (%skribilo-module-reader + :export (%skribilo-module-reader skribilo-module-syntax _ N_) :export-syntax (unwind-protect unless when)) @@ -58,6 +58,10 @@ (list 'reader/record-positions) '()))) +(define-macro (skribilo-module-syntax) + "Install the syntax reader for Skribilo modules." + (fluid-set! current-reader %skribilo-module-reader) + #t) (define-macro (unwind-protect expr1 expr2) diff --git a/src/guile/skribilo/utils/text-table.scm b/src/guile/skribilo/utils/text-table.scm index b90517a..bbf9e53 100644 --- a/src/guile/skribilo/utils/text-table.scm +++ b/src/guile/skribilo/utils/text-table.scm @@ -36,7 +36,7 @@ ;;; ;;; Code: -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) ;*---------------------------------------------------------------------*/ diff --git a/src/guile/skribilo/verify.scm b/src/guile/skribilo/verify.scm index 654e898..32f2770 100644 --- a/src/guile/skribilo/verify.scm +++ b/src/guile/skribilo/verify.scm @@ -37,7 +37,7 @@ :export (verify)) -(fluid-set! current-reader %skribilo-module-reader) +(skribilo-module-syntax) -- cgit v1.2.3