about summary refs log tree commit diff
path: root/src/guile/skribilo/package/base.scm
diff options
context:
space:
mode:
authorLudovic Court`es2007-07-03 09:04:14 +0000
committerLudovic Court`es2007-07-03 09:04:14 +0000
commitf9392ad8b5d8af05d7f59757507c94044cc343af (patch)
tree728ea377a75932e600c734a9ed985c2c537cc3d6 /src/guile/skribilo/package/base.scm
parent3650657f3e41690a1051c2f3e14e67acaf60f6b2 (diff)
parent46122eb2392f848079320e09eda8b747dc9a4177 (diff)
downloadskribilo-f9392ad8b5d8af05d7f59757507c94044cc343af.tar.gz
skribilo-f9392ad8b5d8af05d7f59757507c94044cc343af.tar.lz
skribilo-f9392ad8b5d8af05d7f59757507c94044cc343af.zip
Merge from skribilo@sv.gnu.org--2006
Patches applied:

 * lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2  (patch 110-117)

   - Merge from skribilo@sv.gnu.org--2006/skribilo--devo--1.2
   - Fixed (or almost so) the C lexer.
   - Autoload `(skribilo coloring c)' in the default module.
   - `lout' engine: Fixed argument passing for `lout-illustration'.
   - `base' package: Honor `:line #f' in `prog'.
   - Tiny doc fix.
   - Removed global hash tables for marks and program lines.
   - Fixed and simplified `(ref :line ...)', aka. `line-ref'.

 * skribilo@sv.gnu.org--2006/skribilo--devo--1.2  (patch 122-133)

   - `diff' package: Small bug fix.
   - Updated `TODO'.
   - Factorized `bib-ref+', add a `:sort-bib-refs' options to `ref'.
   - Updated documentation of `ref'.
   - `lncs' package: Honor `:sort-bib-refs'.
   - Fixed (or almost so) the C lexer.
   - Autoload `(skribilo coloring c)' in the default module.
   - `lout' engine: Fixed argument passing for `lout-illustration'.
   - `base' package: Honor `:line #f' in `prog'.
   - Tiny doc fix.
   - Removed global hash tables for marks and program lines.
   - Fixed and simplified `(ref :line ...)', aka. `line-ref'.

git-archimport-id: lcourtes@laas.fr--2006-libre/skribilo--devo--1.2--patch-83
Diffstat (limited to 'src/guile/skribilo/package/base.scm')
-rw-r--r--src/guile/skribilo/package/base.scm36
1 files changed, 6 insertions, 30 deletions
diff --git a/src/guile/skribilo/package/base.scm b/src/guile/skribilo/package/base.scm
index 9f6de43..872c1e2 100644
--- a/src/guile/skribilo/package/base.scm
+++ b/src/guile/skribilo/package/base.scm
@@ -1001,11 +1001,6 @@
       (body (the-body opts))))
 
 ;*---------------------------------------------------------------------*/
-;*    *mark-table* ...                                                 */
-;*---------------------------------------------------------------------*/
-(define *mark-table* (make-hash-table))
-
-;*---------------------------------------------------------------------*/
 ;*    mark ...                                                         */
 ;*    -------------------------------------------------------------    */
 ;*    doc:                                                             */
@@ -1028,12 +1023,11 @@
 	  (let* ((bs (ast->string bd))
 		 (n (new markup
 		       (markup 'mark)
-		       (ident (symbol->string (gensym bs)))
+		       (ident bs)
 		       (class class)
                        (loc   &invocation-location)
 		       (options (the-options opts :ident :class :text))
 		       (body text))))
-	     (hash-set! *mark-table* bs n)
 	     n)))))
 
 ;*---------------------------------------------------------------------*/
@@ -1154,25 +1148,7 @@
 					 (ast s))))
 			     (unref n text (or kind 'ident)))))))))
    (define (mark-ref mark)
-      (if (not (string? mark))
-	  (skribe-type-error 'mark "Illegal mark, " mark "string")
-	  (new unresolved
-             (loc  &invocation-location)
-	     (proc (lambda (n e env)
-		      (let ((s (hash-ref *mark-table* mark)))
-			 (if s
-			     (new markup
-				(markup 'ref)
-				(ident (symbol->string (gensym "mark-ref")))
-				(class class)
-                                (loc   &invocation-location)
-				(required-options '(:text))
-				(options `((kind mark)
-					   (mark ,mark)
-					   ,@(the-options opts :ident :class)))
-				(body (new handle
-					 (ast s))))
-			     (unref n mark 'mark))))))))
+     (do-ident-ref mark 'mark))
    (define (make-bib-ref v)
       (let ((s (resolve-bib bib-table v)))
 	 (if s
@@ -1214,17 +1190,17 @@
       (new unresolved
          (loc   &invocation-location)
 	 (proc  (lambda (n e env)
-		   (let ((l (resolve-line line)))
-		      (if (pair? l)
+		   (let ((l (resolve-line (ast-document n) line)))
+		      (if l
 			  (new markup
 			     (markup 'line-ref)
 			     (ident (symbol->string (gensym "line-ref")))
 			     (class class)
                              (loc   &invocation-location)
-			     (options `((:text ,(markup-ident (car l)))
+			     (options `((:text ,(markup-ident l))
 					,@(the-options opts :ident :class)))
 			     (body (new handle
-				      (ast (car l)))))
+				      (ast l))))
 			  (unref n line 'line)))))))
    (let ((b (the-body opts)))
       (if (not (null? b))