[plt-scheme] DrScheme now rewrites opening square brackets, too

From: Robby Findler (robby at cs.uchicago.edu)
Date: Wed Apr 12 14:14:23 EDT 2006

At Wed, 12 Apr 2006 07:28:27 -0400, Richard Cobbe wrote:
> Cool!  That'll be nice to use!

Thanks! And it was easy to implement, thanks to Scott Owen's online
lexer/syntax colorer.

> Is there a way to tell DrScheme that, in this one instance, I really
> want an open square bracket?  Something like C-q [ in Emacs, for
> instance.  (This may actually work already; I haven't tried this out.)

There isn't anything like that yet. I'm not sure what the right
keystroke should be. control-q doesn't work because that's quit, under
windows.

My best thought is control-[ but, as Eli pointed out offlist, it isn't
something you'd just try randomly if you were guessing.

Any other ideas? (also, it should be something that works for the
closing parens too.)

> In addition to the cases you mentioned, Robby, I tend to use square
> brackets to group things that are not themselves applications or special
> forms:
> 
>     (provide/contract [f (integer? . -> . integer?)]
>                       [g (integer? string? . -> . char?)])
> 
>     (hash-table ['key value] ['key-2 value-2] ...)

I've added provide/contract, but hash-table seemed a little too generic
at least for now, so I didn't add that one.

Robby



Posted on the users mailing list.