summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès2012-04-25 15:28:05 +0200
committerLudovic Courtès2012-04-25 15:28:05 +0200
commite9912b68341e37d8821c55e3089a785a415caac6 (patch)
tree035d7fb9ebbc482e961ba41f8205c2964a0b584e
parent30db71eba358e0df9b599af29bb77f7f733548af (diff)
downloadskribilo-e9912b68341e37d8821c55e3089a785a415caac6.tar.gz
skribilo-e9912b68341e37d8821c55e3089a785a415caac6.tar.lz
skribilo-e9912b68341e37d8821c55e3089a785a415caac6.zip
Have `%skribilo-module-reader' record positions by default on Guile 2.
* src/guile/skribilo/utils/syntax.scm (%skribilo-module-reader): On Guile 2.x, always pass '(reader/record-positions).
-rw-r--r--src/guile/skribilo/utils/syntax.scm13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/guile/skribilo/utils/syntax.scm b/src/guile/skribilo/utils/syntax.scm
index 5a747cb..e210d4e 100644
--- a/src/guile/skribilo/utils/syntax.scm
+++ b/src/guile/skribilo/utils/syntax.scm
@@ -55,11 +55,14 @@
(_ "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)
- '())))
+ (cond-expand
+ (guile-2 '(reader/record-positions))
+ (else
+ ;; On Guile 1.8, don't record positions by default: this yields a
+ ;; nice read performance improvement.
+ (if (memq 'positions (debug-options))
+ (list 'reader/record-positions)
+ '())))))
(define-macro (skribilo-module-syntax)
"Install the syntax reader for Skribilo modules."