summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/guile/skribilo/utils/syntax.scm27
-rwxr-xr-xsrc/skribilo.in7
2 files changed, 21 insertions, 13 deletions
diff --git a/src/guile/skribilo/utils/syntax.scm b/src/guile/skribilo/utils/syntax.scm
index f7a5990..975b879 100644
--- a/src/guile/skribilo/utils/syntax.scm
+++ b/src/guile/skribilo/utils/syntax.scm
@@ -1,6 +1,6 @@
;;; syntax.scm -- Syntactic candy for Skribilo modules.
;;;
-;;; 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
@@ -30,21 +30,26 @@
;;;
;;; Commentary:
;;;
-;;; A reader for the Skribe syntax, i.e. roughly R5RS Scheme plus DSSSL-style
-;;; keywords and sk-exps (expressions introduced using a square bracket).
+;;; This module provides syntactic candy for Skribilo modules, i.e., a syntax
+;;; similar to Guile's default syntax with a few extensions, plus various
+;;; convenience macros.
;;;
;;; Code:
(define %skribilo-module-reader
;; The syntax used to read Skribilo modules.
- (make-alternate-guile-reader '(colon-keywords
- no-scsh-block-comments
- srfi30-block-comments
- srfi62-sexp-comments)
- (lambda (chr port read)
- (error "unexpected character in Skribilo module"
- chr))
- 'reader/record-positions))
+ (apply make-alternate-guile-reader
+ '(colon-keywords no-scsh-block-comments
+ srfi30-block-comments srfi62-sexp-comments)
+ (lambda (chr port read)
+ (error "unexpected character in Skribilo module"
+ chr))
+
+ ;; By default, don't record positions: this yields a nice read
+ ;; performance improvement.
+ (if (memq 'debug (debug-options))
+ (list 'reader/record-positions)
+ '())))
(define %skribe-reader
;; The Skribe syntax reader.
diff --git a/src/skribilo.in b/src/skribilo.in
index 7d3a78d..90bde51 100755
--- a/src/skribilo.in
+++ b/src/skribilo.in
@@ -26,10 +26,13 @@
# `--debug' had not been passed, not displaying a stack trace. See
# http://lists.gnu.org/archive/html/guile-devel/2006-01/msg00022.html
# for details.
+#
+# In any case, don't pass `--debug' by default (for performance
+# reason). When needed, the use should explicitly set the `GUILE'
+# environment variable to, e.g., "guile --debug".
main='(module-ref (resolve-module '\''(skribilo)) '\'main')'
-exec ${GUILE-@GUILE@} --debug \
- -c "
+exec ${GUILE-@GUILE@} -c "
(use-modules (skribilo condition))
(call-with-skribilo-error-catch