@foo@bar' will now parse as a foo@bar' identifier. This used to be

the case in Scheme mode but not in text mode, and this commit makes
the text mode behave as the Scheme mode.  (Seems like a convenience
point that is not useful since people won't remember the difference.)

svn: r15622
This commit is contained in:
Eli Barzilay 2009-07-29 17:00:29 +00:00
parent 2e8de6467a
commit d0f8970add
3 changed files with 13 additions and 14 deletions

View File

@ -540,12 +540,11 @@
(define at-rt
(make-readtable readtable command-char 'non-terminating-macro dispatcher))
(define cmd-rt
;; 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)
;; similar to plain Scheme (scribble, actually), but with `@' as usual and
;; and `|' as a terminating macro characters (otherwise it behaves the
;; same; the only difference is that `a|b|c' is three symbols)
(make-readtable readtable
command-char 'terminating-macro dispatcher
command-char 'non-terminating-macro dispatcher
#\| 'terminating-macro
(lambda (char inp source-name line-num col-num position)
(let ([m (*regexp-match #rx#"^([^|]*)\\|" inp)])

View File

@ -283,7 +283,7 @@ separate text arguments in the S-expression part of an @"@"-form.
@example|-{#lang scribble/text
@(define (choose 1st 2nd)
@list{Either @1st, or @2nd@"."})
@list{Either @1st, or @|2nd|@"."})
@(define who "us")
@choose[@list{you're with @who}
@list{against @who}]
@ -297,7 +297,7 @@ sub-parts without dealing with quotes.
@example|-{#lang scribble/text
@(define (choose 1st 2nd)
@list{Either @1st, or @2nd@"."})
@list{Either @1st, or @|2nd|@"."})
@(define who "us")
@choose[@list{you're with @who}
@list{against @who}]
@ -324,9 +324,9 @@ convenient --- you can even specify the patterns with @"@"-forms.
@(require scheme/match)
@(define (features . text)
(match text
[@list{@1st@...
[@list{@|1st|@...
---
@2nd@...}
@|2nd|@...}
@list{>> Pros <<
@1st;
>> Cons <<
@ -369,7 +369,7 @@ number of body expressions must be fixed.
@example|-{#lang scribble/text
@(define ((choose . 1st) . 2nd)
@list{Either you're @1st, or @2nd@"."})
@list{Either you're @1st, or @|2nd|.})
@(define who "me")
@@choose{with @who}{against @who}
---***---

View File

@ -31,13 +31,13 @@ fo@o -@-> fo@o
---
|@foo| -@-> @foo
---
@foo@bar -@-> foo bar
@foo@bar -@-> foo@bar
---
@foo@bar. -@-> foo bar.
@foo@bar. -@-> foo@bar.
---
@foo@bar: -@-> foo bar:
@foo@bar: -@-> foo@bar:
---
@foo@bar; -@-> foo bar
@foo@bar; -@-> foo@bar
---
@foo[]@bar{} -@-> (foo) (bar)
---