Email list hosting service & mailing list manager

making indentation marker &| implicit Per Bothner (28 May 2013 01:09 UTC)
Re: making indentation marker &| implicit Alex Shinn (28 May 2013 02:03 UTC)
Re: making indentation marker &| implicit Per Bothner (28 May 2013 07:19 UTC)
Re: making indentation marker &| implicit Alex Shinn (28 May 2013 08:41 UTC)
Re: making indentation marker &| implicit Per Bothner (01 Jun 2013 23:25 UTC)

making indentation marker &| implicit Per Bothner 28 May 2013 01:09 UTC

I hate to delay this even more, but ...

SRFI-10[789] uses &| as an indentation marker, which causes
any preceding whitespace to be skipped.  Scribble avoids this
in a way that seems nicer: Any indentation that is common to
each line (following a newline) is stripped.  Thus using SRFI-109
syntax:
(define str1 &{
   abc
     def
   ghi}
becomes: "abc\n  def\nhgi".

http://docs.racket-lang.org/scribbl/reader.html
(last section: 2.4.4 Spaces, Newlines, and Indentation.)

"Initial indentation" means indentation in the source port,
not the string returned by the reader.

Some tweaking of the Scribble rules might be appropriate.
For example, line-continuations markers @- seem worth keeping.
And the rules for initial and final lines needs some thought.

Tabs would have to be consistent: If a line starts with
T1 tabs followed by S1 spaces, and another line starts with
T2 tabs followed by S2 spaces, then it is an error if
(and (not (= T1 T2)) (> S1 0) (> S2 0)).
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/