summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/guile/skribilo/biblio.scm13
-rw-r--r--src/guile/skribilo/evaluator.scm3
-rw-r--r--src/guile/skribilo/utils/compat.scm2
3 files changed, 12 insertions, 6 deletions
diff --git a/src/guile/skribilo/biblio.scm b/src/guile/skribilo/biblio.scm
index 082fb99..c9c0637 100644
--- a/src/guile/skribilo/biblio.scm
+++ b/src/guile/skribilo/biblio.scm
@@ -33,8 +33,10 @@
:autoload (skribilo reader) (%default-reader)
:autoload (skribilo parameters) (*bib-path*)
:autoload (ice-9 format) (format)
+ :use-module (ice-9 optargs)
+
:export (bib-table? make-bib-table default-bib-table
- bib-add! bib-duplicate
+ bib-add! bib-duplicate bib-for-each
skribe-open-bib-file parse-bib))
(fluid-set! current-reader %skribilo-module-reader)
@@ -66,15 +68,18 @@
(set! *bib-table* (make-bib-table "default-bib-table")))
*bib-table*)
-;;
-;; Utilities
-;;
(define (%bib-error who entry)
(let ((msg "bibliography syntax error on entry"))
(if (%epair? entry)
(skribe-line-error (%epair-file entry) (%epair-line entry) who msg entry)
(skribe-error who msg entry))))
+(define* (bib-for-each proc :optional (table (default-bib-table)))
+ (hash-for-each (lambda (ident entry)
+ (proc entry))
+ table))
+
+
;;; ======================================================================
;;;
;;; BIB-DUPLICATE
diff --git a/src/guile/skribilo/evaluator.scm b/src/guile/skribilo/evaluator.scm
index b47f821..281372a 100644
--- a/src/guile/skribilo/evaluator.scm
+++ b/src/guile/skribilo/evaluator.scm
@@ -26,7 +26,8 @@
:autoload (skribilo parameters) (*verbose* *document-path*)
:autoload (skribilo location) (<location>)
:autoload (skribilo ast) (ast? markup?)
- :autoload (skribilo engine) (engine? find-engine engine-ident)
+ :autoload (skribilo engine) (*current-engine*
+ engine? find-engine engine-ident)
:autoload (skribilo reader) (*document-reader*)
:autoload (skribilo verify) (verify)
diff --git a/src/guile/skribilo/utils/compat.scm b/src/guile/skribilo/utils/compat.scm
index 24ce784..cf97258 100644
--- a/src/guile/skribilo/utils/compat.scm
+++ b/src/guile/skribilo/utils/compat.scm
@@ -169,7 +169,7 @@
(define-public skribe-eval-port evaluate-document-from-port)
(set! %skribe-reader #f)
-(define* (skribe-read #:optional (port (current-input-port)))
+(define*-public (skribe-read #:optional (port (current-input-port)))
(if (not %skribe-reader)
(set! %skribe-reader (make-reader 'skribe)))
(%skribe-reader port))