aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtes2006-01-08 23:33:50 +0000
committerLudovic Courtes2006-01-08 23:33:50 +0000
commit1ae0ae57ffd21ac52a313f09ff838ff097863ed5 (patch)
tree4235ac0b0d6aeefa48ad463c62894d8af72caa66
parent2b8a108dbe20569d27cd27e9aae27044a9723e98 (diff)
parent20e5a989999ca11d68bf90417402c60c275dd0cc (diff)
downloadskribilo-1ae0ae57ffd21ac52a313f09ff838ff097863ed5.tar.gz
skribilo-1ae0ae57ffd21ac52a313f09ff838ff097863ed5.tar.lz
skribilo-1ae0ae57ffd21ac52a313f09ff838ff097863ed5.zip
Cleaning the compatibility module and other annoyances.
* src/skribilo.in: Catch exceptions and call `(exit 1)' when caught. * doc/user/Makefile.am (skribilo): Fixed. * src/guile/skribilo.scm: Updated copyright year. * src/guile/skribilo/compat.scm: Moved to `utils'. * src/guile/skribilo/Makefile.am (dist_guilemodule_DATA): Removed `compat.scm'. * src/guile/skribilo/Makefile.am (dist_guilemodule_DATA): Added `compat.scm'. * src/guile/skribilo/coloring/lisp.scm: Use `(skribilo utils syntax)'. * src/guile/skribilo/module.scm (%skribilo-user-imports): Import `(skribilo utils compat)' instead of `(skribilo compat)'. Added more triggering procedures for `(skribilo source)'. * src/guile/skribilo/skribe/api.scm: Moved the definition of a Skribe-compatible `gensym' to `compat.scm'. * src/guile/skribilo/source.scm: Use `*source-path*' instead of `skribe-source-path'. git-archimport-id: lcourtes@laas.fr--2004-libre/skribilo--devel--1.2--patch-22
-rw-r--r--ChangeLog50
-rw-r--r--doc/user/Makefile.am2
-rw-r--r--src/guile/skribilo.scm8
-rw-r--r--src/guile/skribilo/Makefile.am3
-rw-r--r--src/guile/skribilo/coloring/lisp.scm1
-rw-r--r--src/guile/skribilo/module.scm6
-rw-r--r--src/guile/skribilo/skribe/api.scm13
-rw-r--r--src/guile/skribilo/source.scm8
-rw-r--r--src/guile/skribilo/utils/Makefile.am2
-rw-r--r--src/guile/skribilo/utils/compat.scm (renamed from src/guile/skribilo/compat.scm)24
-rwxr-xr-x[-rw-r--r--]src/skribilo.in2
11 files changed, 86 insertions, 33 deletions
diff --git a/ChangeLog b/ChangeLog
index 74c46bc..435ae41 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,56 @@
# arch-tag: automatic-ChangeLog--lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2
#
+2006-01-08 17:13:42 GMT Ludovic Courtes <ludovic.courtes@laas.fr> patch-19
+
+ Summary:
+ Cleaning the compatibility module and other annoyances.
+ Revision:
+ skribilo--devel--1.2--patch-19
+
+ * src/skribilo.in: Catch exceptions and call `(exit 1)' when caught.
+
+ * doc/user/Makefile.am (skribilo): Fixed.
+
+ * src/guile/skribilo.scm: Updated copyright year.
+
+ * src/guile/skribilo/compat.scm: Moved to `utils'.
+
+ * src/guile/skribilo/Makefile.am (dist_guilemodule_DATA): Removed
+ `compat.scm'.
+
+ * src/guile/skribilo/Makefile.am (dist_guilemodule_DATA): Added
+ `compat.scm'.
+
+ * src/guile/skribilo/coloring/lisp.scm: Use `(skribilo utils syntax)'.
+
+ * src/guile/skribilo/module.scm (%skribilo-user-imports): Import
+ `(skribilo utils compat)' instead of `(skribilo compat)'.
+ Added more triggering procedures for `(skribilo source)'.
+
+ * src/guile/skribilo/skribe/api.scm: Moved the definition of a
+ Skribe-compatible `gensym' to `compat.scm'.
+
+ * src/guile/skribilo/source.scm: Use `*source-path*' instead of
+ `skribe-source-path'.
+
+ modified files:
+ ChangeLog doc/user/Makefile.am src/guile/skribilo.scm
+ src/guile/skribilo/Makefile.am
+ src/guile/skribilo/coloring/lisp.scm
+ src/guile/skribilo/module.scm
+ src/guile/skribilo/skribe/api.scm
+ src/guile/skribilo/source.scm
+ src/guile/skribilo/utils/Makefile.am
+ src/guile/skribilo/utils/compat.scm src/skribilo.in
+
+ renamed files:
+ src/guile/skribilo/.arch-ids/compat.scm.id
+ ==> src/guile/skribilo/utils/.arch-ids/compat.scm.id
+ src/guile/skribilo/compat.scm
+ ==> src/guile/skribilo/utils/compat.scm
+
+
2006-01-03 23:16:53 GMT Ludovic Courtes <ludovic.courtes@laas.fr> patch-18
Summary:
diff --git a/doc/user/Makefile.am b/doc/user/Makefile.am
index 49026d5..d6ab75f 100644
--- a/doc/user/Makefile.am
+++ b/doc/user/Makefile.am
@@ -1,6 +1,6 @@
BUILT_SOURCES = user.html
-skribilo = $(top_srcdir)/src/guile/skribilo.scm
+skribilo = $(top_srcdir)/src/skribilo
load_path = $(top_srcdir)/src/guile:$(top_srcdir)/src/guile/skribilo/package
%.html: %.skb
diff --git a/src/guile/skribilo.scm b/src/guile/skribilo.scm
index e131ff3..bf849ab 100644
--- a/src/guile/skribilo.scm
+++ b/src/guile/skribilo.scm
@@ -4,11 +4,10 @@ main='(module-ref (resolve-module '\''(skribilo)) '\'main')'
exec ${GUILE-guile} --debug -l $0 -c "(apply $main (cdr (command-line)))" "$@"
!#
-;;;;
;;;; skribilo.scm
;;;;
;;;; Copyright © 2003-2004 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
-;;;; Copyright 2005 Ludovic Courtès <ludovic.courtes@laas.fr>
+;;;; Copyright 2005, 2006 Ludovic Courtès <ludovic.courtes@laas.fr>
;;;;
;;;;
;;;; This program is free software; you can redistribute it and/or modify
@@ -25,11 +24,6 @@ exec ${GUILE-guile} --debug -l $0 -c "(apply $main (cdr (command-line)))" "$@"
;;;; along with this program; if not, write to the Free Software
;;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;;;; USA.
-;;;;
-;;;; Author: Erick Gallesio [eg@essi.fr]
-;;;; Creation date: 24-Jul-2003 20:33 (eg)
-;;;; Last file update: 6-Mar-2004 16:13 (eg)
-;;;;
;;;; Commentary:
;;;;
diff --git a/src/guile/skribilo/Makefile.am b/src/guile/skribilo/Makefile.am
index c6765f5..f136956 100644
--- a/src/guile/skribilo/Makefile.am
+++ b/src/guile/skribilo/Makefile.am
@@ -4,7 +4,6 @@ dist_guilemodule_DATA = biblio.scm color.scm config.scm \
lib.scm module.scm output.scm prog.scm \
reader.scm resolve.scm runtime.scm \
source.scm parameters.scm verify.scm \
- writer.scm ast.scm location.scm \
- compat.scm
+ writer.scm ast.scm location.scm
SUBDIRS = utils reader engine package skribe coloring
diff --git a/src/guile/skribilo/coloring/lisp.scm b/src/guile/skribilo/coloring/lisp.scm
index ad02431..55fb7d6 100644
--- a/src/guile/skribilo/coloring/lisp.scm
+++ b/src/guile/skribilo/coloring/lisp.scm
@@ -26,6 +26,7 @@
;;;;
(define-module (skribilo coloring lisp)
+ :use-module (skribilo utils syntax)
:use-module (skribilo source)
:use-module (skribilo lib)
:use-module (skribilo runtime)
diff --git a/src/guile/skribilo/module.scm b/src/guile/skribilo/module.scm
index b88c3b7..c9b7034 100644
--- a/src/guile/skribilo/module.scm
+++ b/src/guile/skribilo/module.scm
@@ -47,8 +47,8 @@
(ice-9 optargs) ;; `define*'
(skribilo utils syntax) ;; `unless', `when', etc.
+ (skribilo utils compat) ;; `skribe-load-path', etc.
(skribilo module)
- (skribilo compat) ;; `skribe-load-path', etc.
(skribilo ast) ;; `<document>', `document?', etc.
(skribilo config)
(skribilo runtime) ;; `the-options', `the-body', `make-string-replace'
@@ -68,7 +68,9 @@
;; FIXME: The following should eventually be
;; removed from here.
lout-structure-number-string))
- ((skribilo source) . (source-read-lines source-fontify))
+ ((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 color) .
diff --git a/src/guile/skribilo/skribe/api.scm b/src/guile/skribilo/skribe/api.scm
index 9a6369d..bf99868 100644
--- a/src/guile/skribilo/skribe/api.scm
+++ b/src/guile/skribilo/skribe/api.scm
@@ -19,8 +19,7 @@
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;;; USA.
-(define-skribe-module (skribilo skribe api)
- :replace (gensym))
+(define-skribe-module (skribilo skribe api))
;;; Author: Manuel Serrano
;;; Commentary:
@@ -33,16 +32,6 @@
;;; The contents of the file below are unchanged compared to Skribe 1.2d's
;;; `api.scm' file found in the `common' directory.
-(define %gensym-orig (module-ref the-root-module 'gensym))
-
-(define gensym
- ;; In Skribe, `gensym' accepts a symbol. Guile's `gensym' accepts only
- ;; strings (or no argument).
- (lambda obj
- (apply %gensym-orig
- (cond ((null? obj) '())
- ((symbol? (car obj)) (list (symbol->string (car obj))))
- (else (skribe-error 'gensym "invalid argument" obj))))))
;*---------------------------------------------------------------------*/
diff --git a/src/guile/skribilo/source.scm b/src/guile/skribilo/source.scm
index e4f9973..75e886e 100644
--- a/src/guile/skribilo/source.scm
+++ b/src/guile/skribilo/source.scm
@@ -53,11 +53,11 @@
;* source-read-lines ... */
;*---------------------------------------------------------------------*/
(define (source-read-lines file start stop tab)
- (let ((p (search-path (skribe-source-path) file)))
+ (let ((p (search-path (*source-path*) file)))
(if (or (not (string? p)) (not (file-exists? p)))
(skribe-error 'source
(format "Can't find `~a' source file in path" file)
- (skribe-source-path))
+ (*source-path*))
(with-input-from-file p
(lambda ()
(if (> (*verbose*) 0)
@@ -130,7 +130,7 @@
;* source-read-definition ... */
;*---------------------------------------------------------------------*/
(define (source-read-definition file definition tab lang)
- (let ((p (search-path (skribe-source-path) file)))
+ (let ((p (search-path (*source-path*) file)))
(cond
((not (language-extractor lang))
(skribe-error 'source
@@ -139,7 +139,7 @@
((or (not p) (not (file-exists? p)))
(skribe-error 'source
(format "Can't find `~a' program file in path" file)
- (skribe-source-path)))
+ (*source-path*)))
(else
(let ((ip (open-input-file p)))
(if (> (*verbose*) 0)
diff --git a/src/guile/skribilo/utils/Makefile.am b/src/guile/skribilo/utils/Makefile.am
index 810ee48..6a82ac7 100644
--- a/src/guile/skribilo/utils/Makefile.am
+++ b/src/guile/skribilo/utils/Makefile.am
@@ -1,4 +1,4 @@
guilemoduledir = $(GUILE_SITE)/skribilo/utils
-dist_guilemodule_DATA = syntax.scm
+dist_guilemodule_DATA = syntax.scm compat.scm
## arch-tag: 3a18b64b-1da2-417b-8338-2c534bca277f
diff --git a/src/guile/skribilo/compat.scm b/src/guile/skribilo/utils/compat.scm
index c90af1d..d9a63d6 100644
--- a/src/guile/skribilo/compat.scm
+++ b/src/guile/skribilo/utils/compat.scm
@@ -1,6 +1,6 @@
;;; compat.scm -- Skribe compatibility module.
;;;
-;;; Copyright 2005 Ludovic Courtès <ludovic.courtes@laas.fr>
+;;; Copyright 2005, 2006 Ludovic Courtès <ludovic.courtes@laas.fr>
;;;
;;;
;;; This program is free software; you can redistribute it and/or modify
@@ -19,9 +19,27 @@
;;; USA.
-(define-module (skribilo compat)
+(define-module (skribilo utils compat)
:use-module (skribilo parameters)
- :use-module (srfi srfi-1))
+ :use-module (srfi srfi-1)
+ :replace (gensym))
+
+
+;;;
+;;; gensym
+;;;
+
+(define %gensym-orig (module-ref the-root-module 'gensym))
+
+(define gensym
+ ;; In Skribe, `gensym' accepts a symbol. Guile's `gensym' accepts only
+ ;; strings (or no argument).
+ (lambda obj
+ (apply %gensym-orig
+ (cond ((null? obj) '())
+ ((symbol? (car obj)) (list (symbol->string (car obj))))
+ ((string? (car obj)) (list (car obj)))
+ (else (skribe-error 'gensym "invalid argument" obj))))))
;;;
diff --git a/src/skribilo.in b/src/skribilo.in
index 5508e10..4b77c5e 100644..100755
--- a/src/skribilo.in
+++ b/src/skribilo.in
@@ -3,5 +3,5 @@
main='(module-ref (resolve-module '\''(skribilo)) '\'main')'
exec ${GUILE-@GUILE@} --debug \
- -c "(apply $main (cdr (command-line)))" "$@"
+ -c "(catch #t (lambda () (apply $main (cdr (command-line)))) (lambda (key . args) (format (current-error-port) \"exception \`~a' raised~%\" key) (exit 1)))" "$@"