From 840b68963b7d5810557c43dcb83e82fdb186462c Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 30 Jun 2007 06:38:51 +0000 Subject: [PATCH] make @ be non-terminating in Scheme code, only in Scribble context (like |) svn: r6780 --- collects/scribble/reader.ss | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/collects/scribble/reader.ss b/collects/scribble/reader.ss index be0ae560b9..45aac4b1c5 100644 --- a/collects/scribble/reader.ss +++ b/collects/scribble/reader.ss @@ -448,18 +448,21 @@ ;; readtables (define at-readtable - (make-readtable #f ch:command 'terminating-macro (dispatcher #f))) + (make-readtable #f ch:command 'non-terminating-macro (dispatcher #f))) (provide use-at-readtable) (define (use-at-readtable) (port-count-lines! (current-input-port)) (current-readtable at-readtable)) - ;; similar to plain Scheme (scribble, actually), but with `|' as a - ;; terminating macro (otherwise it behaves the same; the only difference is - ;; that `a|b|c' is three symbols) + ;; similar to plain Scheme (scribble, actually), but with `@' and `|' as + ;; terminating macro characters (otherwise it behaves the same; the only + ;; difference is that `a|b|c' is three symbols and `@foo@bar' are two + ;; @-forms) (define command-readtable - (make-readtable at-readtable #\| 'terminating-macro + (make-readtable at-readtable + ch:command 'terminating-macro (dispatcher #f) + #\| 'terminating-macro (lambda (char inp source-name line-num col-num position) (let ([m (*regexp-match #rx#"^([^|]*)\\|" inp)]) (unless m