From 4901580f449aa13851543d83fe9d4996ed8f1b72 Mon Sep 17 00:00:00 2001 From: Ludovic Courtes Date: Sun, 3 Sep 2006 11:43:09 +0000 Subject: Removed sources of non-unique node identifiers. * src/guile/skribilo/prog.scm (make-prog-body): Use `gensym' to create an identifier instead of `(int->str lnum cs)'. (make-line-mark): Take that identifier. * src/guile/skribilo/package/base.scm (mark): Use `gensym' to create an identifier rather than BS. (ref)[bib-ref]: Likewise. [url-ref]: Likewise. git-archimport-id: lcourtes@laas.fr--2005-libre/skribilo--devo--1.2--patch-55 --- src/guile/skribilo/prog.scm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/guile/skribilo/prog.scm') diff --git a/src/guile/skribilo/prog.scm b/src/guile/skribilo/prog.scm index 6ef41ee..266d607 100644 --- a/src/guile/skribilo/prog.scm +++ b/src/guile/skribilo/prog.scm @@ -49,14 +49,14 @@ ;*---------------------------------------------------------------------*/ ;* *lines* ... */ ;*---------------------------------------------------------------------*/ +;; FIXME: Removed that global. Rework the thing. (define *lines* (make-hash-table)) ;*---------------------------------------------------------------------*/ ;* make-line-mark ... */ ;*---------------------------------------------------------------------*/ -(define (make-line-mark m lnum b) - (let* ((ls (number->string lnum)) - (n (list (mark ls) b))) +(define (make-line-mark m line-ident b) + (let* ((n (list (mark line-ident) b))) (hash-set! *lines* m n) n)) @@ -209,10 +209,11 @@ (reverse! res) (receive (m l) (extract-mark (car lines) mark regexp) - (let ((n (new markup - (markup '&prog-line) - (ident (and lnum-init (int->str lnum cs))) - (body (if m (make-line-mark m lnum l) l))))) + (let* ((line-ident (symbol->string (gensym "&prog-line"))) + (n (new markup + (markup '&prog-line) + (ident line-ident) + (body (if m (make-line-mark m line-ident l) l))))) (loop (cdr lines) (+ lnum 1) (cons n res)))))))) -- cgit v1.2.3