aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog121
-rw-r--r--configure.ac2
-rw-r--r--doc/modules/skribilo/documentation/api.scm36
-rw-r--r--doc/modules/skribilo/documentation/extension.scm55
-rw-r--r--doc/modules/skribilo/documentation/manual.scm30
-rw-r--r--po/fr.po12
-rw-r--r--src/guile/skribilo/Makefile.am4
-rw-r--r--src/guile/skribilo/engine/html.scm63
-rw-r--r--src/guile/skribilo/module.scm6
-rw-r--r--src/guile/skribilo/source/Makefile.am (renamed from src/guile/skribilo/coloring/Makefile.am)6
-rw-r--r--src/guile/skribilo/source/c-lex.l (renamed from src/guile/skribilo/coloring/c-lex.l)0
-rw-r--r--src/guile/skribilo/source/c-lex.scm (renamed from src/guile/skribilo/coloring/c-lex.scm)4
-rw-r--r--src/guile/skribilo/source/c.scm (renamed from src/guile/skribilo/coloring/c.scm)6
-rw-r--r--src/guile/skribilo/source/lisp-lex.l (renamed from src/guile/skribilo/coloring/lisp-lex.l)0
-rw-r--r--src/guile/skribilo/source/lisp-lex.scm (renamed from src/guile/skribilo/coloring/lisp-lex.scm)5
-rw-r--r--src/guile/skribilo/source/lisp.scm (renamed from src/guile/skribilo/coloring/lisp.scm)6
-rw-r--r--src/guile/skribilo/source/parameters.scm (renamed from src/guile/skribilo/coloring/parameters.scm)2
-rw-r--r--src/guile/skribilo/source/xml-lex.l (renamed from src/guile/skribilo/coloring/xml-lex.l)0
-rw-r--r--src/guile/skribilo/source/xml-lex.scm (renamed from src/guile/skribilo/coloring/xml-lex.scm)5
-rw-r--r--src/guile/skribilo/source/xml.scm (renamed from src/guile/skribilo/coloring/xml.scm)4
-rw-r--r--src/guile/skribilo/sui.scm81
21 files changed, 297 insertions, 151 deletions
diff --git a/ChangeLog b/ChangeLog
index ea5d7de..34dd0c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,127 @@
# arch-tag: automatic-ChangeLog--skribilo@sv.gnu.org--2006/skribilo--devo--1.2
#
+2007-07-04 20:36:43 GMT Ludovic Courtes <ludovic.courtes@laas.fr> patch-137
+
+ Summary:
+ Linted documentation modules.
+ Revision:
+ skribilo--devo--1.2--patch-137
+
+ * doc/modules/skribilo/documentation/*.scm: Use the
+ `%skribilo-module-reader' and corresponding syntax, no longer use
+ `compat'.
+
+ modified files:
+ ChangeLog doc/modules/skribilo/documentation/api.scm
+ doc/modules/skribilo/documentation/extension.scm
+ doc/modules/skribilo/documentation/manual.scm
+
+ new patches:
+ lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-121
+
+
+2007-07-04 20:36:19 GMT Ludovic Courtes <ludovic.courtes@laas.fr> patch-136
+
+ Summary:
+ Moved SUI stuff from `html.scm' to `sui.scm'.
+ Revision:
+ skribilo--devo--1.2--patch-136
+
+ * src/guile/skribilo/engine/html.scm: Use `(skribilo sui)'.
+ Export `html-title-engine' and `html-file'.
+ (document-sui, sui-referenced-file, sui-marks, sui-blocks): Moved.
+
+ * src/guile/skribilo/sui.scm: Use required modules.
+ (document-sui, sui-referenced-file, sui-marks, sui-blocks): New.
+
+ modified files:
+ ChangeLog src/guile/skribilo/engine/html.scm
+ src/guile/skribilo/sui.scm
+
+ new patches:
+ lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-120
+
+
+2007-07-04 20:35:54 GMT Ludovic Courtes <ludovic.courtes@laas.fr> patch-135
+
+ Summary:
+ Fixed the `sui' module.
+ Revision:
+ skribilo--devo--1.2--patch-135
+
+ * src/guile/skribilo/Makefile.am (dist_guilemodule_DATA): Added
+ `sui.scm'.
+
+ * src/guile/skribilo/sui.scm (sui-filter): Removed single-operand `and'.
+
+ modified files:
+ ChangeLog src/guile/skribilo/Makefile.am
+ src/guile/skribilo/sui.scm
+
+ new patches:
+ lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-119
+
+
+2007-07-04 20:35:23 GMT Ludovic Courtes <ludovic.courtes@laas.fr> patch-134
+
+ Summary:
+ Renamed the `coloring' module tree to `source' for consistency.
+ Revision:
+ skribilo--devo--1.2--patch-134
+
+
+ modified files:
+ ChangeLog configure.ac
+ doc/modules/skribilo/documentation/manual.scm po/fr.po
+ src/guile/skribilo/Makefile.am src/guile/skribilo/module.scm
+ src/guile/skribilo/source/Makefile.am
+ src/guile/skribilo/source/c-lex.scm
+ src/guile/skribilo/source/c.scm
+ src/guile/skribilo/source/lisp-lex.scm
+ src/guile/skribilo/source/lisp.scm
+ src/guile/skribilo/source/parameters.scm
+ src/guile/skribilo/source/xml-lex.scm
+ src/guile/skribilo/source/xml.scm
+
+ renamed files:
+ src/guile/skribilo/coloring/.arch-ids/=id
+ ==> src/guile/skribilo/source/.arch-ids/=id
+ src/guile/skribilo/coloring/.arch-ids/Makefile.am.id
+ ==> src/guile/skribilo/source/.arch-ids/Makefile.am.id
+ src/guile/skribilo/coloring/.arch-ids/c-lex.l.id
+ ==> src/guile/skribilo/source/.arch-ids/c-lex.l.id
+ src/guile/skribilo/coloring/.arch-ids/c-lex.scm.id
+ ==> src/guile/skribilo/source/.arch-ids/c-lex.scm.id
+ src/guile/skribilo/coloring/.arch-ids/c.scm.id
+ ==> src/guile/skribilo/source/.arch-ids/c.scm.id
+ src/guile/skribilo/coloring/.arch-ids/lisp-lex.l.id
+ ==> src/guile/skribilo/source/.arch-ids/lisp-lex.l.id
+ src/guile/skribilo/coloring/.arch-ids/lisp-lex.scm.id
+ ==> src/guile/skribilo/source/.arch-ids/lisp-lex.scm.id
+ src/guile/skribilo/coloring/.arch-ids/lisp.scm.id
+ ==> src/guile/skribilo/source/.arch-ids/lisp.scm.id
+ src/guile/skribilo/coloring/.arch-ids/xml-lex.l.id
+ ==> src/guile/skribilo/source/.arch-ids/xml-lex.l.id
+ src/guile/skribilo/coloring/.arch-ids/xml-lex.scm.id
+ ==> src/guile/skribilo/source/.arch-ids/xml-lex.scm.id
+ src/guile/skribilo/coloring/.arch-ids/xml.scm.id
+ ==> src/guile/skribilo/source/.arch-ids/xml.scm.id
+
+ new directories:
+ src/guile/skribilo/source/.arch-ids
+
+ removed directories:
+ src/guile/skribilo/coloring/.arch-ids
+
+ renamed directories:
+ src/guile/skribilo/coloring
+ ==> src/guile/skribilo/source
+
+ new patches:
+ lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-118
+
+
2007-07-01 23:50:22 GMT Ludovic Courtes <ludovic.courtes@laas.fr> patch-133
Summary:
diff --git a/configure.ac b/configure.ac
index 21a73fc..41c4b58 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,7 +55,7 @@ AC_OUTPUT([Makefile
src/guile/skribilo/package/slide/Makefile
src/guile/skribilo/package/eq/Makefile
src/guile/skribilo/package/pie/Makefile
- src/guile/skribilo/coloring/Makefile
+ src/guile/skribilo/source/Makefile
src/guile/skribilo/biblio/Makefile
doc/Makefile
doc/user/Makefile
diff --git a/doc/modules/skribilo/documentation/api.scm b/doc/modules/skribilo/documentation/api.scm
index 052b5fa..429dcf6 100644
--- a/doc/modules/skribilo/documentation/api.scm
+++ b/doc/modules/skribilo/documentation/api.scm
@@ -1,7 +1,7 @@
;;; api.scm -- The style for documenting Scheme APIs.
;;;
;;; Copyright 2003, 2004 Manuel Serrano
-;;; Copyright 2005, 2006 Ludovic Courtès <ludovic.courtes@laas.fr>
+;;; Copyright 2005, 2006, 2007 Ludovic Courtès <ludovic.courtes@laas.fr>
;;;
;;;
;;; This program is free software; you can redistribute it and/or modify
@@ -26,7 +26,6 @@
:use-module (skribilo ast)
:use-module (skribilo output)
:use-module (skribilo lib) ;; `define-markup'
- :use-module (skribilo utils keywords)
:use-module (skribilo utils compat)
:use-module (skribilo utils syntax) ;; `%skribilo-module-reader'
@@ -38,7 +37,7 @@
:use-module (ice-9 match)
:use-module (ice-9 optargs))
-(fluid-set! current-reader (make-reader 'skribe))
+(fluid-set! current-reader %skribilo-module-reader)
;*---------------------------------------------------------------------*/
@@ -156,7 +155,7 @@
o
#f))
((exp ___)
- (let loop ((exp exp))
+ (let ((exp exp))
(cond ((null? exp)
#f)
((pair? exp)
@@ -180,9 +179,6 @@
(else
'()))))
-(define (sym/kw? x)
- (or (symbol? x) (keyword? x)))
-
;*---------------------------------------------------------------------*/
;* define-markup-formals ... */
;* ------------------------------------------------------------- */
@@ -222,7 +218,7 @@
((_ (args ___) _ ___)
(if (not (list? args))
'()
- (let ((keys (memq #!key args)))
+ (let ((keys (memq :key args)))
(if (pair? keys)
(cdr keys) ;; FIXME: do we need to filter ((key val)...)?
'()))))
@@ -248,7 +244,7 @@
(let ((l (last-pair args)))
(if (symbol? (cdr l))
(cdr l)
- (let ((rest (memq #!rest args)))
+ (let ((rest (memq :rest args)))
(if (pair? rest)
(if (or (not (pair? (cdr rest)))
(not (symbol? (cadr rest))))
@@ -321,7 +317,7 @@
(tr (td :align 'left exp))))
(else
(match exp
- ((quote (and ?sym (? symbol?)))
+ ((and sym (? symbol?))
(string-append "'" (symbol->string sym)))
(else
(with-output-to-string (lambda () (write exp))))))))
@@ -359,9 +355,9 @@
;* doc-markup ... */
;*---------------------------------------------------------------------*/
(define-markup (doc-markup id args
- #!rest
+ :rest
opts
- #!key
+ :key
(ident #f)
(writer-id #f)
(common-args '((:ident "The node identifier.")
@@ -443,10 +439,10 @@
(doptions (filter (lambda (x)
(and (keyword? (car x))
;; useful for STklos only
- (not (eq? (car x) #!rest))))
+ (not (eq? (car x) :rest))))
args))
(drest (filter (lambda (x)
- (eq? #!rest (car x)))
+ (eq? :rest (car x)))
args))
(dargs (and (pair? drest) (cadr (car drest))))
(p+ (cons (doc-markup-proto id options fformals dargs)
@@ -492,7 +488,8 @@
(ref :mark s :text (code s))
" ")))
see-also)))
- (table :border (if (engine-format? "latex") 1 0)
+ (table :&location &invocation-location
+ :border (if (engine-format? "latex") 1 0)
:width (if (engine-format? "latex") #f *prgm-width*)
`(,(tr :class 'api-table-prototype
(th :colspan 3 :align 'left :width *prgm-width*
@@ -546,7 +543,7 @@
(let ((s (symbol->string x)))
(list
(ref :mark s :page #t
- :text [,(code s), p.])
+ :text (list (code s) ", p."))
" ")))
see-also)))
(list (center
@@ -591,9 +588,9 @@
;* doc-engine ... */
;*---------------------------------------------------------------------*/
(define-markup (doc-engine id args
- #!rest
+ :rest
opts
- #!key
+ :key
(idx *custom-index*)
source
(skribe-source? #t)
@@ -613,7 +610,8 @@
#f)
(else
(center
- (apply table
+ (apply table
+ :&location &invocation-location
:width *prgm-width*
(tr :class 'api-table-header
(th :align 'left :width 20. "custom")
diff --git a/doc/modules/skribilo/documentation/extension.scm b/doc/modules/skribilo/documentation/extension.scm
index e012cb2..7efee6f 100644
--- a/doc/modules/skribilo/documentation/extension.scm
+++ b/doc/modules/skribilo/documentation/extension.scm
@@ -1,6 +1,7 @@
-;;; extension.scm -- The Skribe package for documenting extensions
+;;; extension.scm -- The Skribilo package for documenting extensions.
;;;
;;; Copyright 2003, 2004 Manuel Serrano
+;;; Copyright 2007 Ludovic Courtès <ludo@gnu.org>
;;;
;;;
;;; This program is free software; you can redistribute it and/or modify
@@ -19,17 +20,35 @@
;;; USA.
(define-module (skribilo documentation extension)
- :use-module (skribilo reader)
- :use-module (skribilo utils compat))
+ :use-module (skribilo sui)
+ :use-module (skribilo config)
+ :use-module (skribilo parameters)
-(fluid-set! current-reader (make-reader 'skribe))
+ :use-module (skribilo lib)
+ :use-module (skribilo ast)
+ :use-module (skribilo engine)
+ :use-module (skribilo writer)
+ :use-module (skribilo output)
+ :use-module (skribilo evaluator)
+
+ :use-module (skribilo package base)
+ :use-module (skribilo engine html)
+
+ :use-module (skribilo utils files)
+ :use-module (skribilo utils compat)
+ :use-module (skribilo utils syntax)
+ :use-module (skribilo utils keywords)
+
+ :use-module (ice-9 optargs))
+
+(fluid-set! current-reader %skribilo-module-reader)
;*---------------------------------------------------------------------*/
;* extension */
;*---------------------------------------------------------------------*/
-(define-markup (extension #!rest opt
- #!key (ident (symbol->string (gensym 'extension)))
+(define-markup (extension :rest opt
+ :key (ident (symbol->string (gensym 'extension)))
(class "extension")
title html-title ending author description
(env '()))
@@ -37,6 +56,7 @@
(markup 'extension)
(ident ident)
(class class)
+ (loc &invocation-location)
(options (the-options opt))
(body (the-body opt))
(env (append env
@@ -45,7 +65,7 @@
(list 'section-counter 0) (list 'section-env '())
(list 'footnote-counter 0) (list 'footnote-env '())
(list 'figure-counter 0) (list 'figure-env '()))))))
-
+
;*---------------------------------------------------------------------*/
;* html engine */
;*---------------------------------------------------------------------*/
@@ -56,24 +76,24 @@
(and (pair? m) (car m)))))
(if (not i)
(table :width 100. :border 0 :cellspacing 0 :cellpadding 0
- (tr (td :align 'left :valign 'top (bold "Skribe: "))
+ (tr (td :align 'left :valign 'top (bold "Skribilo: "))
(td :align 'right :valign 'top
- (ref :url *skribe-dir-doc-url*
+ (ref :url (skribilo-doc-directory)
:text "Directory")))
(tr (td)
(td :align 'right :valign 'top
- (ref :url *skribe-user-doc-url*
+ (ref :url (skribilo-doc-directory)
:text "User Manual"))))
(table :width 100. :border 0 :cellspacing 0 :cellpadding 0
(tr (td :align 'left :valign 'top (bold "index:"))
(td :align 'right (ref :handle (handle i))))
(tr (td :align 'left :valign 'top (bold "Skribe: "))
(td :align 'right :valign 'top
- (ref :url *skribe-dir-doc-url*
+ (ref :url (skribilo-doc-directory)
:text "Directory")))
(tr (td)
(td :align 'right :valign 'top
- (ref :url *skribe-user-doc-url*
+ (ref :url (skribilo-doc-directory)
:text "User Manual"))))))))
(default-engine-set! he))
@@ -83,14 +103,14 @@
(define (extension-sui n e)
(define (sui)
(display "(sui \"")
- (skribe-eval (markup-option n :title) html-title-engine)
+ (evaluate-document (markup-option n :title) html-title-engine)
(display "\"\n")
(printf " :file ~s\n" (sui-referenced-file n e))
(printf " :description ~s\n" (markup-option n :description))
(sui-marks n e)
(display " )\n"))
- (if (string? *skribe-dest*)
- (let ((f (format "~a.sui" (prefix *skribe-dest*))))
+ (if (string? (*destination-file*))
+ (let ((f (string-append (file-prefix (*destination-file*)) ".sui")))
(with-output-to-file f sui))
(sui)))
@@ -99,8 +119,9 @@
;*---------------------------------------------------------------------*/
(markup-writer 'extension
:options '(:title :html-title :ending :author :description)
- :action (lambda (n e)
- (output n e (markup-writer-get 'document he)))
+ :action (let ((he (find-engine 'html)))
+ (lambda (n e)
+ (output n e (markup-writer-get 'document he))))
:after (lambda (n e)
(if (engine-custom e 'emit-sui)
(extension-sui n e))))
diff --git a/doc/modules/skribilo/documentation/manual.scm b/doc/modules/skribilo/documentation/manual.scm
index ca4eafb..6978afd 100644
--- a/doc/modules/skribilo/documentation/manual.scm
+++ b/doc/modules/skribilo/documentation/manual.scm
@@ -1,6 +1,7 @@
-;;; manual.scm -- Skribe manuals and documentation pages style
+;;; manual.scm -- Skribilo manuals and documentation style.
;;;
;;; Copyright 2003, 2004 Manuel Serrano
+;;; Copyright 2007 Ludovic Courtès <ludo@gnu.org>
;;;
;;;
;;; This program is free software; you can redistribute it and/or modify
@@ -19,7 +20,6 @@
;;; USA.
(define-module (skribilo documentation manual)
- :use-module (skribilo reader)
:use-module (skribilo engine)
:use-module (skribilo writer)
:use-module (skribilo ast)
@@ -28,17 +28,16 @@
:use-module (skribilo output)
:use-module (skribilo utils keywords)
:use-module (skribilo utils compat)
- :use-module (skribilo utils syntax) ;; `when'
+ :use-module (skribilo utils syntax)
:use-module (skribilo documentation env)
:use-module (skribilo package base)
- :use-module (skribilo prog)
- :use-module (skribilo coloring lisp)
- :use-module (skribilo coloring xml)
+ :use-module (skribilo source lisp)
+ :use-module (skribilo source xml)
:use-module (ice-9 optargs))
-(fluid-set! current-reader (make-reader 'skribe))
+(fluid-set! current-reader %skribilo-module-reader)
;*---------------------------------------------------------------------*/
@@ -121,7 +120,7 @@
;*---------------------------------------------------------------------*/
;* prgm ... */
;*---------------------------------------------------------------------*/
-(define-markup (prgm #!rest opts #!key (language skribe) (line #f) (file #f) (definition #f))
+(define-markup (prgm :rest opts :key (language skribe) (line #f) (file #f) (definition #f))
(let* ((c (cond
((eq? language skribe) *prgm-skribe-color*)
((eq? language xml) *prgm-xml-color*)
@@ -145,7 +144,7 @@
;*---------------------------------------------------------------------*/
;* disp ... */
;*---------------------------------------------------------------------*/
-(define-markup (disp #!rest opts #!key (verb #f) (line #f) (bg *disp-color*))
+(define-markup (disp :rest opts :key (verb #f) (line #f) (bg *disp-color*))
(if (engine-format? "latex")
(if verb
(pre (the-body opts))
@@ -188,7 +187,7 @@
;*---------------------------------------------------------------------*/
;* example ... */
;*---------------------------------------------------------------------*/
-(define-markup (example #!rest opts #!key legend class)
+(define-markup (example :rest opts :key legend class)
(new container
(markup 'example)
(ident (symbol->string (gensym 'example)))
@@ -233,8 +232,7 @@
(list l)
(list (tr (td :colspan 2)) l))))
(define (make-primary-entry n p)
- (let* ((note (markup-option n :note))
- (b (markup-body n)))
+ (let ((b (markup-body n)))
(when p
(markup-option-add! b :text
(list (markup-option b :text)
@@ -290,18 +288,14 @@
(nc (markup-option n :column))
(pref (eq? (engine-custom e 'index-page-ref) #t))
(loc (ast-loc n))
- ;; FIXME: Since we don't support
- ;; `:&skribe-eval-location', we could set up a
- ;; `parameterize' thing around `skribe-eval' to provide
- ;; it with the right location information.
(t (cond
((null? ie)
"")
((or (not (integer? nc)) (= nc 1))
- (table :width 100. ;;:&skribe-eval-location loc
+ (table :width 100. :&location loc
(make-column ie pref)))
(else
- (table :width 100. ;;:&skribe-eval-location loc
+ (table :width 100. :&location loc
(make-sub-tables ie nc pref))))))
(output (skribe-eval t e) e))))
diff --git a/po/fr.po b/po/fr.po
index 15948bc..f199bd4 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: ludovic.courtes@laas.fr\n"
-"POT-Creation-Date: 2007-06-11 16:37+0200\n"
+"POT-Creation-Date: 2007-07-04 18:24+0200\n"
"PO-Revision-Date: 2007-02-05 16:02+0100\n"
"Last-Translator: Ludovic Courtès <ludovic.courtes@laas.fr>\n"
"Language-Team: fr <LL@li.org>\n"
@@ -55,27 +55,27 @@ msgstr "erreur de fichier : ~a~%"
msgid "undefined skribilo error: ~S~%"
msgstr "erreur skribilo indéfinie : ~S~%"
-#: src/guile/skribilo/biblio.scm:107
+#: src/guile/skribilo/biblio.scm:110
#, scheme-format
msgid "~a:~a:~a: invalid bibliography entry: ~a~%"
msgstr "~a:~a:~a: entrée de bibliographie incorrecte : ~a~%"
-#: src/guile/skribilo/biblio.scm:110
+#: src/guile/skribilo/biblio.scm:113
#, scheme-format
msgid "invalid bibliography entry: ~a~%"
msgstr "entrée de bibliographie incorrecte : ~a~%"
-#: src/guile/skribilo/biblio.scm:114
+#: src/guile/skribilo/biblio.scm:117
#, scheme-format
msgid "invalid bibliography entry template: `~a', in `~a'~%"
msgstr "patron de bibliographie incorrect : `~a', dans `~a'~%"
-#: src/guile/skribilo/biblio.scm:119
+#: src/guile/skribilo/biblio.scm:122
#, fuzzy, scheme-format
msgid "invalid bibliography entry s-exp: `~a'~%"
msgstr "entrée de bibliographie incorrecte : ~a~%"
-#: src/guile/skribilo/biblio.scm:123
+#: src/guile/skribilo/biblio.scm:126
#, scheme-format
msgid "undefined bibliography error: ~a~%"
msgstr "erreur de bibliographie indéfinie : ~a~%"
diff --git a/src/guile/skribilo/Makefile.am b/src/guile/skribilo/Makefile.am
index f25b08e..029d4f2 100644
--- a/src/guile/skribilo/Makefile.am
+++ b/src/guile/skribilo/Makefile.am
@@ -6,8 +6,8 @@ dist_guilemodule_DATA = biblio.scm color.scm config.scm \
reader.scm resolve.scm \
source.scm parameters.scm verify.scm \
writer.scm ast.scm location.scm \
- condition.scm
+ condition.scm sui.scm
-SUBDIRS = utils reader engine package coloring biblio
+SUBDIRS = utils reader engine package source biblio
include $(top_srcdir)/guile-lint.am
diff --git a/src/guile/skribilo/engine/html.scm b/src/guile/skribilo/engine/html.scm
index a16f01f..b6ab8a7 100644
--- a/src/guile/skribilo/engine/html.scm
+++ b/src/guile/skribilo/engine/html.scm
@@ -35,13 +35,14 @@
:autoload (skribilo evaluator) (evaluate-document)
:autoload (skribilo output) (output)
:autoload (skribilo debug) (*debug*)
+ :autoload (skribilo sui) (document-sui)
:autoload (ice-9 rdelim) (read-line)
:autoload (ice-9 regex) (regexp-substitute/global)
:use-module (srfi srfi-13)
:use-module (srfi srfi-14)
:use-module ((srfi srfi-19) :renamer (symbol-prefix-proc 's19:))
- :export (html-engine
+ :export (html-engine html-title-engine html-file
html-width html-class html-markup-class
html-title-authors))
@@ -995,66 +996,6 @@
(html-title-authors (list authors) e))))
;*---------------------------------------------------------------------*/
-;* document-sui ... */
-;*---------------------------------------------------------------------*/
-(define (document-sui n e)
- (define (sui)
- (display "(sui \"")
- (evaluate-document (markup-option n :title) html-title-engine)
- (display "\"\n")
- (format #t " :file ~s\n" (sui-referenced-file n e))
- (sui-marks n e)
- (sui-blocks 'chapter n e)
- (sui-blocks 'section n e)
- (sui-blocks 'subsection n e)
- (sui-blocks 'subsubsection n e)
- (display " )\n"))
- (if (string? (*destination-file*))
- (let ((f (format #f "~a.sui" (file-prefix (*destination-file*)))))
- (with-output-to-file f sui))
- (sui)))
-
-;*---------------------------------------------------------------------*/
-;* sui-referenced-file ... */
-;*---------------------------------------------------------------------*/
-(define (sui-referenced-file n e)
- (let ((file (html-file n e)))
- (if (member (file-suffix file) '("skb" "sui" "skr" "html"))
- (string-append (strip-ref-base (file-prefix file)) ".html")
- file)))
-
-;*---------------------------------------------------------------------*/
-;* sui-marks ... */
-;*---------------------------------------------------------------------*/
-(define (sui-marks n e)
- (display " (marks")
- (for-each (lambda (m)
- (format #t "\n (~s" (markup-ident m))
- (format #t " :file ~s" (sui-referenced-file m e))
- (format #t " :mark ~s" (markup-ident m))
- (when (markup-class m)
- (format #t " :class ~s" (markup-class m)))
- (display ")"))
- (search-down (lambda (n) (is-markup? n 'mark)) n))
- (display ")\n"))
-
-;*---------------------------------------------------------------------*/
-;* sui-blocks ... */
-;*---------------------------------------------------------------------*/
-(define (sui-blocks kind n e)
- (format #t " (~as" kind)
- (for-each (lambda (chap)
- (display "\n (\"")
- (evaluate-document (markup-option chap :title) html-title-engine)
- (format #t "\" :file ~s" (sui-referenced-file chap e))
- (format #t " :mark ~s" (markup-ident chap))
- (when (markup-class chap)
- (format #t " :class ~s" (markup-class chap)))
- (display ")"))
- (container-search-down (lambda (n) (is-markup? n kind)) n))
- (display ")\n"))
-
-;*---------------------------------------------------------------------*/
;* author ... */
;*---------------------------------------------------------------------*/
(markup-writer 'author
diff --git a/src/guile/skribilo/module.scm b/src/guile/skribilo/module.scm
index 81d2a16..4e47192 100644
--- a/src/guile/skribilo/module.scm
+++ b/src/guile/skribilo/module.scm
@@ -75,9 +75,9 @@
((skribilo source) . (source-read-lines source-fontify
language? language-extractor
language-fontifier source-fontify))
- ((skribilo coloring lisp) . (skribe scheme lisp))
- ((skribilo coloring xml) . (xml))
- ((skribilo coloring c) . (c java))
+ ((skribilo source lisp) . (skribe scheme stklos bigloo lisp))
+ ((skribilo source xml) . (xml))
+ ((skribilo source c) . (c java))
((skribilo prog) . (make-prog-body resolve-line))
((skribilo color) .
(skribe-color->rgb skribe-get-used-colors skribe-use-color!))
diff --git a/src/guile/skribilo/coloring/Makefile.am b/src/guile/skribilo/source/Makefile.am
index 5073575..4c961cf 100644
--- a/src/guile/skribilo/coloring/Makefile.am
+++ b/src/guile/skribilo/source/Makefile.am
@@ -1,4 +1,4 @@
-guilemoduledir = $(GUILE_SITE)/skribilo/coloring
+guilemoduledir = $(GUILE_SITE)/skribilo/source
dist_guilemodule_DATA = parameters.scm c.scm lisp.scm xml.scm \
lisp-lex.scm xml-lex.scm c-lex.scm
@@ -14,9 +14,9 @@ EXTRA_DIST = lisp-lex.l xml-lex.l c-lex.l
$(GUILE) -L $(top_srcdir)/src/guile/silex \
-c '(load-from-path "lex.scm") (lex "$^" "$@")' && \
mv "$@" "$@.tmp" && \
- echo '(define-module (skribilo coloring $(^:%.l=%))' > "$@" && \
+ echo '(define-module (skribilo source $(^:%.l=%))' > "$@" && \
echo ' :use-module (skribilo lib)' >> "$@" && \
- echo ' :use-module (skribilo coloring parameters)' \
+ echo ' :use-module (skribilo source parameters)' \
>> "$@" && \
echo ' :use-module (srfi srfi-1)' >> "$@" && \
echo ' :export (lexer-init lexer' >> "$@" && \
diff --git a/src/guile/skribilo/coloring/c-lex.l b/src/guile/skribilo/source/c-lex.l
index b28a91a..b28a91a 100644
--- a/src/guile/skribilo/coloring/c-lex.l
+++ b/src/guile/skribilo/source/c-lex.l
diff --git a/src/guile/skribilo/coloring/c-lex.scm b/src/guile/skribilo/source/c-lex.scm
index 162c0c2..72c4929 100644
--- a/src/guile/skribilo/coloring/c-lex.scm
+++ b/src/guile/skribilo/source/c-lex.scm
@@ -1,6 +1,6 @@
-(define-module (skribilo coloring c-lex)
+(define-module (skribilo source c-lex)
:use-module (skribilo lib)
- :use-module (skribilo coloring parameters)
+ :use-module (skribilo source parameters)
:use-module (srfi srfi-1)
:export (lexer-init lexer
lexer-get-func-column
diff --git a/src/guile/skribilo/coloring/c.scm b/src/guile/skribilo/source/c.scm
index 0d94307..a0d04e0 100644
--- a/src/guile/skribilo/coloring/c.scm
+++ b/src/guile/skribilo/source/c.scm
@@ -19,11 +19,11 @@
;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
;;; USA.
-(define-module (skribilo coloring c)
+(define-module (skribilo source c)
:use-module (skribilo lib)
:use-module (skribilo utils syntax)
- :use-module (skribilo coloring c-lex) ;; SILex generated
- :use-module (skribilo coloring parameters)
+ :use-module (skribilo source c-lex) ;; SILex generated
+ :use-module (skribilo source parameters)
:use-module (srfi srfi-39)
:export (c c-language java))
diff --git a/src/guile/skribilo/coloring/lisp-lex.l b/src/guile/skribilo/source/lisp-lex.l
index 30b6a44..30b6a44 100644
--- a/src/guile/skribilo/coloring/lisp-lex.l
+++ b/src/guile/skribilo/source/lisp-lex.l
diff --git a/src/guile/skribilo/coloring/lisp-lex.scm b/src/guile/skribilo/source/lisp-lex.scm
index f68f320..3b47d95 100644
--- a/src/guile/skribilo/coloring/lisp-lex.scm
+++ b/src/guile/skribilo/source/lisp-lex.scm
@@ -1,6 +1,7 @@
-(define-module (skribilo coloring lisp-lex)
+(define-module (skribilo source lisp-lex)
:use-module (skribilo lib)
- :use-module (skribilo coloring parameters)
+ :use-module (skribilo source parameters)
+ :use-module (srfi srfi-1)
:export (lexer-init lexer
lexer-get-func-column
lexer-get-func-offset
diff --git a/src/guile/skribilo/coloring/lisp.scm b/src/guile/skribilo/source/lisp.scm
index 46e8c59..77f1c9b 100644
--- a/src/guile/skribilo/coloring/lisp.scm
+++ b/src/guile/skribilo/source/lisp.scm
@@ -20,15 +20,15 @@
;;; USA.
-(define-module (skribilo coloring lisp)
+(define-module (skribilo source lisp)
:use-module (skribilo utils syntax)
:use-module (skribilo source)
- :use-module (skribilo coloring parameters)
+ :use-module (skribilo source parameters)
:use-module (skribilo lib)
:use-module (srfi srfi-39)
:use-module (ice-9 match)
:autoload (skribilo reader) (make-reader)
- :autoload (skribilo coloring lisp-lex) (lexer-init)
+ :autoload (skribilo source lisp-lex) (lexer-init)
:export (skribe scheme stklos bigloo lisp))
diff --git a/src/guile/skribilo/coloring/parameters.scm b/src/guile/skribilo/source/parameters.scm
index cb4e9bb..9bcb8e6 100644
--- a/src/guile/skribilo/coloring/parameters.scm
+++ b/src/guile/skribilo/source/parameters.scm
@@ -18,7 +18,7 @@
;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
;;; USA.
-(define-module (skribilo coloring parameters)
+(define-module (skribilo source parameters)
:use-module (srfi srfi-39)
:export (*bracket-highlight* *class-highlight* *the-keys*))
diff --git a/src/guile/skribilo/coloring/xml-lex.l b/src/guile/skribilo/source/xml-lex.l
index aa7d312..aa7d312 100644
--- a/src/guile/skribilo/coloring/xml-lex.l
+++ b/src/guile/skribilo/source/xml-lex.l
diff --git a/src/guile/skribilo/coloring/xml-lex.scm b/src/guile/skribilo/source/xml-lex.scm
index d14aa5d..3ec6668 100644
--- a/src/guile/skribilo/coloring/xml-lex.scm
+++ b/src/guile/skribilo/source/xml-lex.scm
@@ -1,6 +1,7 @@
-(define-module (skribilo coloring xml-lex)
+(define-module (skribilo source xml-lex)
:use-module (skribilo lib)
- :use-module (skribilo coloring parameters)
+ :use-module (skribilo source parameters)
+ :use-module (srfi srfi-1)
:export (lexer-init lexer
lexer-get-func-column
lexer-get-func-offset
diff --git a/src/guile/skribilo/coloring/xml.scm b/src/guile/skribilo/source/xml.scm
index f6d69fd..05eac17 100644
--- a/src/guile/skribilo/coloring/xml.scm
+++ b/src/guile/skribilo/source/xml.scm
@@ -1,6 +1,6 @@
;;; xml.scm -- XML syntax highlighting.
;;;
-;;; Copyright 2005 Ludovic Courtès <ludovic.courtes@laas.fr>
+;;; Copyright 2005, 2007 Ludovic Courtès <ludovic.courtes@laas.fr>
;;;
;;;
;;; This program is free software; you can redistribute it and/or modify
@@ -18,7 +18,7 @@
;;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-(define-module (skribilo coloring xml)
+(define-module (skribilo source xml)
:export (xml)
:use-module (skribilo lib)
:use-module (ice-9 regex))
diff --git a/src/guile/skribilo/sui.scm b/src/guile/skribilo/sui.scm
index e0a9b19..6535c66 100644
--- a/src/guile/skribilo/sui.scm
+++ b/src/guile/skribilo/sui.scm
@@ -1,7 +1,7 @@
;;; sui.scm
;;;
;;; Copyright 2003, 2004 Manuel Serrano
-;;; Copyright 2005, 2006 Ludovic Courtès <ludovic.courtes@laas.fr>
+;;; Copyright 2005, 2006, 2007 Ludovic Courtès <ludovic.courtes@laas.fr>
;;;
;;;
;;; This program is free software; you can redistribute it and/or modify
@@ -20,15 +20,23 @@
;;; USA.
(define-module (skribilo sui)
- :use-module (skribilo utils syntax)
:use-module (skribilo lib)
- :use-module (ice-9 match)
- :use-module (srfi srfi-1)
+ :use-module (skribilo ast)
:autoload (skribilo parameters) (*verbose*)
:autoload (skribilo reader) (make-reader)
+ :autoload (skribilo engine) (find-engine)
+ :autoload (skribilo evaluator) (evaluate-document)
+ :autoload (skribilo engine html)(html-file)
+ :use-module (skribilo utils strings)
+ :use-module (skribilo utils syntax)
+ :use-module (skribilo utils files)
+
+ :use-module (ice-9 match)
+ :use-module (srfi srfi-1)
:export (load-sui sui-ref->url sui-title sui-file sui-key
- sui-find-ref sui-search-ref sui-filter))
+ sui-find-ref sui-search-ref sui-filter
+ document-sui sui-referenced-file sui-marks sui-blocks))
(fluid-set! current-reader %skribilo-module-reader)
@@ -190,10 +198,71 @@
(let loop ((refs refs)
(res '()))
(if (pair? refs)
- (if (and (pred1 (car refs)))
+ (if (pred1 (car refs))
(loop (cdr refs)
(cons (filter pred2 (cdar refs)) res))
(loop (cdr refs) res))
(reverse! res))))
(else
(skribe-error 'sui-filter "Illegal `sui' format" sui))))
+
+;*---------------------------------------------------------------------*/
+;* document-sui ... */
+;*---------------------------------------------------------------------*/
+(define (document-sui n e)
+ (define (sui)
+ (display "(sui \"")
+ (evaluate-document (markup-option n :title) (find-engine 'html))
+ (display "\"\n")
+ (format #t " :file ~s\n" (sui-referenced-file n e))
+ (sui-marks n e)
+ (sui-blocks 'chapter n e)
+ (sui-blocks 'section n e)
+ (sui-blocks 'subsection n e)
+ (sui-blocks 'subsubsection n e)
+ (display " )\n"))
+ (if (string? (*destination-file*))
+ (let ((f (format #f "~a.sui" (file-prefix (*destination-file*)))))
+ (with-output-to-file f sui))
+ (sui)))
+
+;*---------------------------------------------------------------------*/
+;* sui-referenced-file ... */
+;*---------------------------------------------------------------------*/
+(define (sui-referenced-file n e)
+ (let ((file (html-file n e)))
+ (if (member (file-suffix file) '("skb" "sui" "skr" "html"))
+ (string-append (strip-ref-base (file-prefix file)) ".html")
+ file)))
+
+;*---------------------------------------------------------------------*/
+;* sui-marks ... */
+;*---------------------------------------------------------------------*/
+(define (sui-marks n e)
+ (display " (marks")
+ (for-each (lambda (m)
+ (format #t "\n (~s" (markup-ident m))
+ (format #t " :file ~s" (sui-referenced-file m e))
+ (format #t " :mark ~s" (markup-ident m))
+ (when (markup-class m)
+ (format #t " :class ~s" (markup-class m)))
+ (display ")"))
+ (search-down (lambda (n) (is-markup? n 'mark)) n))
+ (display ")\n"))
+
+;*---------------------------------------------------------------------*/
+;* sui-blocks ... */
+;*---------------------------------------------------------------------*/
+(define (sui-blocks kind n e)
+ (format #t " (~as" kind)
+ (for-each (lambda (chap)
+ (display "\n (\"")
+ (evaluate-document (markup-option chap :title)
+ (find-engine 'html))
+ (format #t "\" :file ~s" (sui-referenced-file chap e))
+ (format #t " :mark ~s" (markup-ident chap))
+ (when (markup-class chap)
+ (format #t " :class ~s" (markup-class chap)))
+ (display ")"))
+ (container-search-down (lambda (n) (is-markup? n kind)) n))
+ (display ")\n"))