From 66e42310c0d6518abb39d52553286b5253bba6fd Mon Sep 17 00:00:00 2001 From: Ludovic Courtes Date: Wed, 25 Jan 2006 22:57:34 +0000 Subject: More progress towards a working user manual. * doc/skr/api.skr (define-markup?): Support `define*' and `define*-public'. * doc/user/bib.skb: Commented out problematic `skribebibtex'-related things. * doc/user/lib.skb (skribe-load): Replaced by `load-document'. (skribe-load-options): Replaced by `*load-options*'. (skribe-path): Replaced by `*document-path*'. * src/guile/skribilo/coloring/lisp.scm (definition-search): Removed debugging statement. * src/guile/skribilo/engine.scm (find-engine): For documentation purposes, explicitly list all keyword parameters. * src/guile/skribilo/source.scm (source-read-lines): Start line numbers from 0. * src/guile/skribilo/utils/compat.scm (skribe-path-set!): New. (skribe-image-path-set!): New. (skribe-source-path-set!): New. (skribe-bib-path-set!): New. git-archimport-id: lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-30 --- src/guile/skribilo/coloring/lisp.scm | 2 -- src/guile/skribilo/engine.scm | 10 +++++----- src/guile/skribilo/source.scm | 2 +- src/guile/skribilo/utils/compat.scm | 6 ++++++ 4 files changed, 12 insertions(+), 8 deletions(-) (limited to 'src/guile') diff --git a/src/guile/skribilo/coloring/lisp.scm b/src/guile/skribilo/coloring/lisp.scm index 33ecc48..1db9a3f 100644 --- a/src/guile/skribilo/coloring/lisp.scm +++ b/src/guile/skribilo/coloring/lisp.scm @@ -55,8 +55,6 @@ (if (def? exp) (let ((start (and (pair? exp) (source-property exp 'line))) (stop (port-line inp))) - (format (current-error-port) "READ-LINES: `~a' ~a->~a~%" - exp start stop) (source-read-lines (port-filename inp) start stop tab)) (Loop (read inp)))))) diff --git a/src/guile/skribilo/engine.scm b/src/guile/skribilo/engine.scm index 7c1348b..d747ea0 100644 --- a/src/guile/skribilo/engine.scm +++ b/src/guile/skribilo/engine.scm @@ -143,7 +143,7 @@ ;;; ;;; MAKE-ENGINE ;;; -(define* (make-engine ident #:key (version 'unspecified) +(define* (make-engine ident :key (version 'unspecified) (format "raw") (filter #f) (delegate #f) @@ -163,7 +163,7 @@ ;;; ;;; COPY-ENGINE ;;; -(define* (copy-engine ident e #:key (version 'unspecified) +(define* (copy-engine ident e :key (version 'unspecified) (filter #f) (delegate #f) (symbol-table #f) @@ -184,7 +184,7 @@ ;;; FIND-ENGINE ;;; -(define* (lookup-engine id #:key (version 'unspecified)) +(define* (lookup-engine id :key (version 'unspecified)) "Look for an engine named @var{name} (a symbol) in the @code{(skribilo engine)} module hierarchy. If no such engine was found, an error is raised, otherwise the requested engine is returned." @@ -197,8 +197,8 @@ otherwise the requested engine is returned." (module-ref m engine) (error "no such engine" id))))) -(define (find-engine . args) - (false-if-exception (apply lookup-engine args))) +(define* (find-engine id :key (version 'unspecified)) + (false-if-exception (apply lookup-engine (list id version)))) diff --git a/src/guile/skribilo/source.scm b/src/guile/skribilo/source.scm index a632f18..4027372 100644 --- a/src/guile/skribilo/source.scm +++ b/src/guile/skribilo/source.scm @@ -68,7 +68,7 @@ (format (current-error-port) " [source file: ~S]\n" p)) (let ((startl (if (string? start) (string-length start) -1)) (stopl (if (string? stop) (string-length stop) -1))) - (let loop ((l 1) + (let loop ((l 0) ;; In Guile, line nums are 0-origined. (armedp (not (or (integer? start) (string? start)))) (s (read-line)) (r '())) diff --git a/src/guile/skribilo/utils/compat.scm b/src/guile/skribilo/utils/compat.scm index c6e95bf..a7ce781 100644 --- a/src/guile/skribilo/utils/compat.scm +++ b/src/guile/skribilo/utils/compat.scm @@ -109,6 +109,12 @@ (define-public skribe-source-path *source-path*) (define-public skribe-bib-path *bib-path*) +(define-public (skribe-path-set! path) (*document-path* path)) +(define-public (skribe-image-path-set! path) (*image-path* path)) +(define-public (skribe-source-path-set! path) (*source-path* path)) +(define-public (skribe-bib-path-set! path) (*bib-path* path)) + + ;;; ;;; Evaluator. -- cgit v1.2.3