diff options
author | Ludovic Court`es | 2006-09-27 15:44:11 +0000 |
---|---|---|
committer | Ludovic Court`es | 2006-09-27 15:44:11 +0000 |
commit | 76074a64af9da255cdfb4b6ff59c786b444fbc18 (patch) | |
tree | 294b0ae92f10616f2a304e84a83daf1a8df85b1a /src | |
parent | 72fcb722a8ea8959edf160a676ca05df1665b64c (diff) | |
download | skribilo-76074a64af9da255cdfb4b6ff59c786b444fbc18.tar.gz skribilo-76074a64af9da255cdfb4b6ff59c786b444fbc18.tar.lz skribilo-76074a64af9da255cdfb4b6ff59c786b444fbc18.zip |
`base' engine: tolerate engine classes and instances in `processor'.
* src/guile/skribilo/package/base.scm: Autoload `(skribilo engine)' upon
`engine-class?' as well.
(processor): Tolerate both engine classes and instances as the
`:engine' argument.
git-archimport-id: lcourtes@laas.fr--2005-libre/skribilo--engine-classes--1.2--patch-4
Diffstat (limited to 'src')
-rw-r--r-- | src/guile/skribilo/package/base.scm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/guile/skribilo/package/base.scm b/src/guile/skribilo/package/base.scm index bbb2a62..53f9e5c 100644 --- a/src/guile/skribilo/package/base.scm +++ b/src/guile/skribilo/package/base.scm @@ -30,7 +30,7 @@ :use-module (skribilo utils keywords) :autoload (srfi srfi-1) (every any filter) :autoload (skribilo evaluator) (include-document) - :autoload (skribilo engine) (engine?) + :autoload (skribilo engine) (engine? engine-class?) ;; optional ``sub-packages'' :autoload (skribilo biblio) (default-bib-table resolve-bib @@ -896,7 +896,7 @@ (cond ((and combinator (not (procedure? combinator))) (skribe-error 'processor "Combinator not a procedure" combinator)) - ((and engine (not (engine? engine))) + ((and engine (not (or (engine? engine) (engine-class? engine)))) (skribe-error 'processor "Illegal engine" engine)) ((and procedure (or (not (procedure? procedure)) @@ -911,7 +911,9 @@ (else (new processor (combinator combinator) - (engine engine) + (engine (if (engine-class? engine) + (make-engine engine) + engine)) (procedure (or procedure (lambda (n e) n))) (body (the-body opts)))))) |