From a5b8c2cfaf31b5d81a900b1020eb45252d775dd0 Mon Sep 17 00:00:00 2001 From: Ludovic Courtes Date: Sat, 25 Nov 2006 17:37:51 +0000 Subject: lout: bib-ref+: Gracefully handle `unref' objects. * src/guile/skribilo/engine/lout.scm (bib-ref+)[canonicalize-entry]: Handle `unref' objects. [help-proc]: Don't pass `unref' objects to PROC. git-archimport-id: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-17 --- src/guile/skribilo/engine/lout.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/guile') diff --git a/src/guile/skribilo/engine/lout.scm b/src/guile/skribilo/engine/lout.scm index db93257..272b131 100644 --- a/src/guile/skribilo/engine/lout.scm +++ b/src/guile/skribilo/engine/lout.scm @@ -2495,6 +2495,7 @@ ((is-markup? x 'bib-entry) x) ((is-markup? x 'bib-ref) (handle-ast (markup-body x))) + ((is-markup? x 'unref) #f) (else (skribe-error 'lout @@ -2502,9 +2503,14 @@ x))))) (help-proc (lambda (proc) (lambda (e1 e2) - (proc (canonicalize-entry e1) - (canonicalize-entry e2))))) + (let ((e1 (canonicalize-entry e1)) + (e2 (canonicalize-entry e2))) + ;; don't pass `unref's to PROC + (if (and e1 e2) + (proc e1 e2) + #f))))) (sort-proc (engine-custom e 'bib-refs-sort-proc))) + (let loop ((rs (if sort-proc (sort entries (help-proc sort-proc)) entries))) -- cgit v1.2.3