summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLudovic Courtes2006-01-25 22:57:34 +0000
committerLudovic Courtes2006-01-25 22:57:34 +0000
commit66e42310c0d6518abb39d52553286b5253bba6fd (patch)
treee9d3fbb7f52ab02973c0283601a52eb7685a345b /src
parentce4ff568eaf9bb2f56ab0cf341591a9025f35ee7 (diff)
downloadskribilo-66e42310c0d6518abb39d52553286b5253bba6fd.tar.gz
skribilo-66e42310c0d6518abb39d52553286b5253bba6fd.tar.lz
skribilo-66e42310c0d6518abb39d52553286b5253bba6fd.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/guile/skribilo/coloring/lisp.scm2
-rw-r--r--src/guile/skribilo/engine.scm10
-rw-r--r--src/guile/skribilo/source.scm2
-rw-r--r--src/guile/skribilo/utils/compat.scm6
4 files changed, 12 insertions, 8 deletions
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.