From c3242a5179081b651ab56701a717f9589532464c Mon Sep 17 00:00:00 2001 From: Ludovic Court`es Date: Fri, 24 Nov 2006 09:36:49 +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: lcourtes@laas.fr--2005-libre/skribilo--devo--1.2--patch-75 --- src/guile/skribilo/engine/lout.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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