[racket] DrRacket indent of "let:"
On Wed, Dec 22, 2010 at 6:28 PM, Neil Van Dyke <neil at neilvandyke.org> wrote:
> DrRacket 5.0.2 isn't indenting Typed Racket "let:" forms idiomatically. It
> indents them in the default way rather than a special way like it does for
> Racket "let" forms.
>
> In case anyone wants to fix this, here's how Quack currently indents "let:"
> (leading space characters replaced here with "." so email clients don't eat
> them):
>
> (let: ((x : Any)
> .......(y : Any))
> ..x
> ..y)
>
> (let: loop : Any ((x : Any)
> ..................(y : Any))
> ..x
> ..y)
>
> (let: loop : Any
> ......((x : Any)
> .......(y : Any))
> ..x
> ..y)
>
> (let: loop
> ....: Any
> ....((x : Any)
> .....(y : Any))
> ..x
> ..y)
>
> The difference in indentation of the second line in the 3rd and 4th examples
> is an accident of how some existing Emacs code works, not a decision on my
> part. In that regard, I would probably change Quack to do whatever Racket
> ultimately does.
>
Adding `let:' to the list of "Lambda-like Keywords" in DrRacket's
"Editing" preferences makes your first two examples indent as in
Quack. The second two examples indent as follows.
(let: loop : Any
..((x : Any)
...(y : Any))
..x
..y)
(let: loop
..: Any
..((x : Any)
...(y : Any))
..x
..y)
Maybe all we need is to update the preference's default?
I can think of a few other forms that should probably be there too
(e.g., `match*' and `syntax-parameterize'). Anyone else have requests?