summaryrefslogtreecommitdiff
path: root/src/guile
diff options
context:
space:
mode:
authorLudovic Court`es2006-11-24 09:36:49 +0000
committerLudovic Court`es2006-11-24 09:36:49 +0000
commitc3242a5179081b651ab56701a717f9589532464c (patch)
treecd0eab640bb27160889f551c1129f0a162adbe26 /src/guile
parenta5f445c36f37fc866fbac1f095e8bbba11beddd7 (diff)
downloadskribilo-c3242a5179081b651ab56701a717f9589532464c.tar.gz
skribilo-c3242a5179081b651ab56701a717f9589532464c.tar.lz
skribilo-c3242a5179081b651ab56701a717f9589532464c.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: lcourtes@laas.fr--2005-libre/skribilo--devo--1.2--patch-75
Diffstat (limited to 'src/guile')
-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)))