aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtes2006-11-25 17:37:51 +0000
committerLudovic Courtes2006-11-25 17:37:51 +0000
commita5b8c2cfaf31b5d81a900b1020eb45252d775dd0 (patch)
treecd0eab640bb27160889f551c1129f0a162adbe26
parentb2aec83973f1b7c2bf9e952ed8e713611cbdc7fb (diff)
downloadskribilo-a5b8c2cfaf31b5d81a900b1020eb45252d775dd0.tar.gz
skribilo-a5b8c2cfaf31b5d81a900b1020eb45252d775dd0.tar.lz
skribilo-a5b8c2cfaf31b5d81a900b1020eb45252d775dd0.zip
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
-rw-r--r--src/guile/skribilo/engine/lout.scm10
1 files 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)))