From 66b863c26c55eb460dcc7da2d674bf00ec9e69cb Mon Sep 17 00:00:00 2001 From: Ludovic Courtes Date: Mon, 19 Feb 2007 23:31:50 +0000 Subject: `base' engine: Use the native Skribilo APIs. * src/guile/skribilo/engine/base.scm: No longer use `define-skribe-module'. Use the native Skribilo APIs instead. git-archimport-id: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-59 --- ChangeLog | 17 +++++++++++++++ src/guile/skribilo/engine/base.scm | 44 ++++++++++++++++++++++---------------- 2 files changed, 42 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ad04c6..d31ffd4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,23 @@ # arch-tag: automatic-ChangeLog--skribilo@sv.gnu.org--2006/skribilo--devo--1.2 # +2007-02-19 23:31:50 GMT Ludovic Courtes patch-59 + + Summary: + `base' engine: Use the native Skribilo APIs. + Revision: + skribilo--devo--1.2--patch-59 + + * src/guile/skribilo/engine/base.scm: No longer use + `define-skribe-module'. Use the native Skribilo APIs instead. + + modified files: + ChangeLog src/guile/skribilo/engine/base.scm + + new patches: + lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-99 + + 2007-02-07 23:07:44 GMT Ludovic Courtes patch-58 Summary: diff --git a/src/guile/skribilo/engine/base.scm b/src/guile/skribilo/engine/base.scm index 711c179..f339a40 100644 --- a/src/guile/skribilo/engine/base.scm +++ b/src/guile/skribilo/engine/base.scm @@ -19,11 +19,23 @@ ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ;;; USA. -(define-skribe-module (skribilo engine base) - :autoload (skribilo biblio template) (make-bib-entry-template/default - output-bib-entry-template) - :use-module (srfi srfi-13)) +(define-module (skribilo engine base) + :use-module (skribilo ast) + :use-module (skribilo engine) + :use-module (skribilo writer) + :autoload (skribilo output) (output) + :use-module (skribilo evaluator) + :autoload (skribilo package base) (color) + :autoload (skribilo utils keywords) (list-split) + :autoload (skribilo biblio template) (make-bib-entry-template/default + output-bib-entry-template) + ;; syntactic sugar + :use-module (skribilo reader) + :use-module (skribilo utils syntax)) +(fluid-set! current-reader (make-reader 'skribe)) + + ;*---------------------------------------------------------------------*/ ;* base-engine ... */ ;*---------------------------------------------------------------------*/ @@ -170,7 +182,7 @@ (format #f "?~a " k)))) (msg (list f (markup-body n))) (n (list "[" (color :fg "red" (bold msg)) "]"))) - (skribe-eval n e)))) + (evaluate-document n e)))) ;*---------------------------------------------------------------------*/ ;* &the-bibliography ... */ @@ -234,7 +246,7 @@ (markup-writer '&bib-entry-url :action (lambda (n e) (let ((url (markup-body n))) - (skribe-eval + (evaluate-document (ref :text (it url) :url url) e)))) ;*---------------------------------------------------------------------*/ @@ -258,7 +270,7 @@ ;*---------------------------------------------------------------------*/ (markup-writer '&bib-entry-title :action (lambda (n e) - (skribe-eval (markup-body n)) e)) + (evaluate-document (markup-body n) e))) ;*---------------------------------------------------------------------*/ ;* &bib-entry-booktitle ... */ @@ -266,21 +278,21 @@ (markup-writer '&bib-entry-booktitle :action (lambda (n e) (let ((title (markup-body n))) - (skribe-eval (it title) e)))) + (evaluate-document (it title) e)))) ;*---------------------------------------------------------------------*/ ;* &bib-entry-journal ... */ ;*---------------------------------------------------------------------*/ (markup-writer '&bib-entry-journal :action (lambda (n e) - (skribe-eval (it (markup-body n)) e))) + (evaluate-document (it (markup-body n)) e))) ;*---------------------------------------------------------------------*/ ;* &bib-entry-publisher ... */ ;*---------------------------------------------------------------------*/ (markup-writer '&bib-entry-publisher :action (lambda (n e) - (skribe-eval (markup-body n) e))) + (evaluate-document (markup-body n) e))) ;*---------------------------------------------------------------------*/ ;* &the-index ... @label the-index@ */ @@ -400,7 +412,7 @@ ;;:&skribe-eval-location loc :class "index-table" (make-sub-tables ie nc pref)))))) - (output (skribe-eval t e) e)))) + (output (evaluate-document t e) e)))) ;*---------------------------------------------------------------------*/ ;* &the-index-header ... */ @@ -418,7 +430,7 @@ :before (lambda (n e) (let ((num (markup-option n :number))) (if (number? num) - (skribe-eval + (evaluate-document (it (string-append (string-pad (number->string num) 3) ": ")) e)))) @@ -432,11 +444,5 @@ :action (lambda (n e) (let ((o (markup-option n :offset)) (n (markup-ident (handle-body (markup-body n))))) - (skribe-eval (it (if (integer? o) (+ o n) n)) e)))) - - + (evaluate-document (it (if (integer? o) (+ o n) n)) e)))) -;;;; A VIRER (mais handle-body n'est pas défini) -(markup-writer 'line-ref - :options '(:offset) - :action #f) -- cgit v1.2.3