diff options
author | Ludovic Court`es | 2006-10-12 16:08:13 +0000 |
---|---|---|
committer | Ludovic Court`es | 2006-10-12 16:08:13 +0000 |
commit | e70968b7c7c309ce262794880ddb3a74beb48c64 (patch) | |
tree | 0d167e21c625e043b4e0dc869728189451935b1a /src/guile/skribilo/engine | |
parent | bdfed985ba33fe739a058da5395f9519ccb364cf (diff) | |
download | skribilo-e70968b7c7c309ce262794880ddb3a74beb48c64.tar.gz skribilo-e70968b7c7c309ce262794880ddb3a74beb48c64.tar.lz skribilo-e70968b7c7c309ce262794880ddb3a74beb48c64.zip |
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: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-3
Diffstat (limited to 'src/guile/skribilo/engine')
-rw-r--r-- | src/guile/skribilo/engine/base.scm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/guile/skribilo/engine/base.scm b/src/guile/skribilo/engine/base.scm index 8418e8b..d49b732 100644 --- a/src/guile/skribilo/engine/base.scm +++ b/src/guile/skribilo/engine/base.scm @@ -1,6 +1,7 @@ ;;; base.scm -- BASE Skribe engine ;;; ;;; Copyright 2003, 2004 Manuel Serrano +;;; Copyright 2006 Ludovic Courtès <ludovic.courtes@laas.fr> ;;; ;;; ;;; This program is free software; you can redistribute it and/or modify @@ -18,7 +19,8 @@ ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ;;; USA. -(define-skribe-module (skribilo engine base)) +(define-skribe-module (skribilo engine base) + :use-module (srfi srfi-13)) ;*---------------------------------------------------------------------*/ ;* base-engine ... */ @@ -457,8 +459,12 @@ ;*---------------------------------------------------------------------*/ (markup-writer '&prog-line :before (lambda (n e) - (let ((n (markup-ident n))) - (if n (skribe-eval (it (list n) ": ") e)))) + (let ((num (markup-option n :number))) + (if (number? num) + (skribe-eval + (it (string-append (string-pad (number->string num) 3) + ": ")) + e)))) :after "\n") ;*---------------------------------------------------------------------*/ |