diff options
author | Ludovic Courtes | 2005-11-01 16:19:34 +0000 |
---|---|---|
committer | Ludovic Courtes | 2005-11-01 16:19:34 +0000 |
commit | f553cb65b157b6df9563cefa593902d59301461b (patch) | |
tree | 00fc81c51256991c04799d79a749bbdd5b9fad30 /src/guile/skribilo/source.scm | |
parent | 052c10245a523aa714489bda59e18a6c1a4f473e (diff) | |
download | skribilo-f553cb65b157b6df9563cefa593902d59301461b.tar.gz skribilo-f553cb65b157b6df9563cefa593902d59301461b.tar.lz skribilo-f553cb65b157b6df9563cefa593902d59301461b.zip |
Changes related to source-highlighting and to the manual.
* src/guile/skribilo/engine/lout.scm (lout-make-doc-cover-sheet): Fixed
the definition of MULTI-COLUMN? (fixes a bug when producing
multi-column documents).
(lout-definitions): `@SkribeLeaders' renamed to `@SkribiloLeaders'.
* doc/skr/api.skr (api-search-definition): Fixed calls to `format'.
* doc/skr/manual.skr (keyword): Use `write' instead of `keyword->string'.
* doc/user/start.skb: Cosmetic changes.
* src/guile/skribilo/coloring/lisp.scm: First stab at its adaptation.
* src/guile/skribilo/coloring/xml.scm: Rewritten "by hand".
* src/guile/skribilo/evaluator.scm (skribe-include): Removed debugging
statements.
* src/guile/skribilo/lib.scm (new): Added a trick such that users of this
macro don't have to use `(oop goops)' and `(skribilo types)'.
(date): New procedure.
* src/guile/skribilo/module.scm (*skribe-core-modules*): Renamed to
`%skribe-core-modules'.
(%skribe-core-modules): Removed `(oop goops)'. Added `(skribilo
source)', `(skribilo coloring lisp)' and `(skribilo coloring xml)'.
* src/guile/skribilo/skribe/api.scm (footnote): Fixed.
* src/guile/skribilo/source.scm: Cosmetic changes.
* src/guile/skribilo/types.scm: Export `language-extractor' and
`language-fontifier'.
git-archimport-id: lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-11
Diffstat (limited to 'src/guile/skribilo/source.scm')
-rw-r--r-- | src/guile/skribilo/source.scm | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/guile/skribilo/source.scm b/src/guile/skribilo/source.scm index c682687..e03deae 100644 --- a/src/guile/skribilo/source.scm +++ b/src/guile/skribilo/source.scm @@ -1,7 +1,8 @@ ;;;; -;;;; source.stk -- Skibe SOURCE implementation stuff +;;;; source.scm -- Highlighting source files. ;;;; ;;;; Copyright © 2003-2004 Erick Gallesio - I3S-CNRS/ESSI <eg@essi.fr> +;;;; Copyright © 2005 Ludovic Courtès <ludovic.courtes@laas.fr> ;;;; ;;;; ;;;; This program is free software; you can redistribute it and/or modify @@ -19,24 +20,16 @@ ;;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, ;;;; USA. ;;;; -;;;; Author: Erick Gallesio [eg@essi.fr] -;;;; Creation date: 3-Sep-2003 12:22 (eg) -;;;; Last file update: 27-Oct-2004 20:09 (eg) -;;;; (define-module (skribilo source) :export (source-read-lines source-read-definition source-fontify) - :use-module (skribilo vars)) - - -;; Temporary solution -(define (language-extractor lang) - (slot-ref lang 'extractor)) + :use-module (skribilo types) + :use-module (skribilo vars) + :use-module (skribilo lib) + :use-module (ice-9 rdelim)) -(define (language-fontifier lang) - (slot-ref lang 'fontifier)) ;*---------------------------------------------------------------------*/ @@ -172,7 +165,7 @@ (if (= i j) (reverse! r) (reverse! (cons (substring str j i) r)))) - ((char=? (string-ref str i) #\Newline) + ((char=? (string-ref str i) #\newline) (loop (+ i 1) (+ i 1) (if (= i j) @@ -180,7 +173,7 @@ (cons* 'eol (substring str j i) r)))) ((and (char=? (string-ref str i) #\cr) (< (+ i 1) l) - (char=? (string-ref str (+ i 1)) #\Newline)) + (char=? (string-ref str (+ i 1)) #\newline)) (loop (+ i 2) (+ i 2) (if (= i j) |