[racket] How do you tell DrRacket to treat source with different indentation rules?

From: Danny Yoo (dyoo at cs.wpi.edu)
Date: Tue Jul 5 15:51:41 EDT 2011

I've been looking at:


which explains how to create languages that cooperate with the
DrRacket editor; in particular, it shows how to do colored tokens by
defining a 'color-lexer.

But I'd like to customize the indenter as well. Let's say that I'm
happily hacking in brainf*ck, and I want to be able to press tab and
have it indent by four spaces, regardless of the textual context.  At
the moment, DrRacket continues to use Racket indentation rules, which
are inappropriate for brainf*ck.  But I don't know how to teach
DrRacket this.

I haven't found examples of #lang languages that do this.  Am I
missing something?

Posted on the users mailing list.