From d70f8ef391dd4a71ad26bbf76c6f33b0f7b47390 Mon Sep 17 00:00:00 2001 From: Ludovic Court`es Date: Thu, 12 Oct 2006 16:01:47 +0000 Subject: prog: Fixed line number output (`&prog-line'). * src/guile/skribilo/engine/base.scm: Use `srfi-13'. (&prog-line): Use the `:number' markup option rather than the ident as the line number. * src/guile/skribilo/prog.scm: Use `%skribilo-module-reader'. (make-prog-body): Pass the line number as a `:number' markup option in the `&prog-line' markup. git-archimport-id: lcourtes@laas.fr--2005-libre/skribilo--devo--1.2--patch-62 --- src/guile/skribilo/prog.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/guile/skribilo/prog.scm') diff --git a/src/guile/skribilo/prog.scm b/src/guile/skribilo/prog.scm index 266d607..2f531cd 100644 --- a/src/guile/skribilo/prog.scm +++ b/src/guile/skribilo/prog.scm @@ -24,8 +24,13 @@ :autoload (ice-9 receive) (receive) :use-module (skribilo lib) ;; `new' :autoload (skribilo ast) (node? node-body) + :use-module (skribilo utils syntax) + :export (make-prog-body resolve-line)) +(fluid-set! current-reader %skribilo-module-reader) + + ;;; ====================================================================== ;;; ;;; COMPATIBILITY @@ -211,8 +216,9 @@ (extract-mark (car lines) mark regexp) (let* ((line-ident (symbol->string (gensym "&prog-line"))) (n (new markup - (markup '&prog-line) - (ident line-ident) + (markup '&prog-line) + (ident line-ident) + (options `((:number ,lnum))) (body (if m (make-line-mark m line-ident l) l))))) (loop (cdr lines) (+ lnum 1) -- cgit v1.2.3