From 559d3f64f4b051a39c91a3d53d3b41deee8ae42f Mon Sep 17 00:00:00 2001 From: Ludovic Court`es Date: Mon, 28 Nov 2005 14:23:48 +0000 Subject: Created a canonical module for Skribilo syntactic sugar. * src/guile/skribilo/utils/syntax.scm: New. Export `unless', `when', formerly defined in `lib.scm'. * src/guile/skribilo.scm: Use `(skribilo utils syntax)' and `%skribilo-module-reader'. Fixed parameterization of `*verbose*'. * src/guile/skribilo/ast.scm: Use `(skribilo utils syntax)' and `%skribilo-module-reader'. * src/guile/skribilo/biblio.scm: Likewise. * src/guile/skribilo/engine.scm: Likewise. * src/guile/skribilo/writer.scm: Likewise. * src/guile/skribilo/location.scm: Likewise. * src/guile/skribilo/lib.scm: Likewise. * src/guile/skribilo/source.scm: Likewise. * src/guile/skribilo/evaluator.scm: Likewise. Use `*document-path*' instead of `skribe-path'. * src/guile/skribilo/module.scm: Use `(system reader confinement)'. (%skribilo-user-imports): Moved some modules to... (%skribilo-user-autoloads): New. (define-skribe-module): Auto-load the modules specified in `%skribilo-user-autoloads'. Use `set-current-reader' instead of the `#:reader' option of `define-module'. * src/guile/skribilo/engine/lout.scm: Commented out a piece of text. git-archimport-id: lcourtes@laas.fr--2004-libre/skribilo--devel--1.2--patch-13 --- src/guile/skribilo.scm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/guile/skribilo.scm') diff --git a/src/guile/skribilo.scm b/src/guile/skribilo.scm index c4a5eac..92c5b35 100755 --- a/src/guile/skribilo.scm +++ b/src/guile/skribilo.scm @@ -39,9 +39,6 @@ exec ${GUILE-guile} --debug -l $0 -c "(apply $main (cdr (command-line)))" "$@" ;;;; ;;;; Code: -;; Allow for this `:style' of keywords. -(read-set! keywords 'prefix) - (let ((gensym-orig gensym)) ;; In Skribe, `gensym' expects a symbol as its (optional) argument, while ;; Guile's `gensym' expect a string. XXX @@ -62,7 +59,11 @@ exec ${GUILE-guile} --debug -l $0 -c "(apply $main (cdr (command-line)))" "$@" (define-module (skribilo) :autoload (skribilo module) (make-run-time-module) - :autoload (skribilo engine) (*current-engine*)) + :autoload (skribilo engine) (*current-engine*) + :use-module (skribilo utils syntax)) + +;; Install the Skribilo module syntax reader. +(set-current-reader %skribilo-module-reader) (use-modules (skribilo evaluator) (skribilo debug) @@ -405,7 +406,6 @@ Processes a Skribilo/Skribe source file and produces its output. (debug-enable 'debug) (debug-enable 'backtrace) (debug-enable 'procnames) - (read-enable 'positions) (cond (help-wanted (begin (skribilo-show-help) (exit 1))) (version-wanted (begin (skribilo-show-version) (exit 1)))) @@ -422,7 +422,10 @@ Processes a Skribilo/Skribe source file and produces its output. (parameterize ((*current-engine* engine) (*document-path* (cons load-path (*document-path*))) (*bib-path* (cons bib-path (*bib-path*))) - (*verbose* (option-ref options 'verbose #f))) + (*verbose* (let ((v (option-ref options + 'verbose 0))) + (if (number? v) v + (if v 1 0))))) ;; Load the user rc file ;;(load-rc) -- cgit v1.2.3