diff options
author | Ludovic Courtes | 2006-09-03 11:43:09 +0000 |
---|---|---|
committer | Ludovic Courtes | 2006-09-03 11:43:09 +0000 |
commit | 4901580f449aa13851543d83fe9d4996ed8f1b72 (patch) | |
tree | 769a7fe510dbf192bfa161aec6a623e3ea9c7eda /src/guile | |
parent | 8e0448d1a0b2590453935e457d9f7de4a6d32502 (diff) | |
download | skribilo-4901580f449aa13851543d83fe9d4996ed8f1b72.tar.gz skribilo-4901580f449aa13851543d83fe9d4996ed8f1b72.tar.lz skribilo-4901580f449aa13851543d83fe9d4996ed8f1b72.zip |
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
Diffstat (limited to 'src/guile')
-rw-r--r-- | src/guile/skribilo/package/base.scm | 8 | ||||
-rw-r--r-- | src/guile/skribilo/prog.scm | 15 |
2 files changed, 12 insertions, 11 deletions
diff --git a/src/guile/skribilo/package/base.scm b/src/guile/skribilo/package/base.scm index ce40fc1..8ba9024 100644 --- a/src/guile/skribilo/package/base.scm +++ b/src/guile/skribilo/package/base.scm @@ -988,7 +988,7 @@ (let* ((bs (ast->string bd)) (n (new markup (markup 'mark) - (ident bs) + (ident (symbol->string (gensym bs))) (class class) (options (the-options opts :ident :class :text)) (body text)))) @@ -1095,7 +1095,7 @@ (if s (new markup (markup 'ref) - (ident (symbol->string 'indent-ref)) + (ident (symbol->string (gensym "ident-ref"))) (class class) (required-options '(:text)) (options `((kind ,kind) @@ -1127,7 +1127,7 @@ (if s (let* ((n (new markup (markup 'bib-ref) - (ident (symbol->string 'bib-ref)) + (ident (symbol->string (gensym "bib-ref"))) (class class) (required-options '(:text)) (options (the-options opts :ident :class)) @@ -1151,7 +1151,7 @@ (define (url-ref) (new markup (markup 'url-ref) - (ident (symbol->string 'url-ref)) + (ident (symbol->string (gensym "url-ref"))) (class class) (required-options '(:url :text)) (options (the-options opts :ident :class)))) 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)))))))) |