[plt-scheme] syntax coloring, #lang, Scribble

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Jul 28 14:46:34 EDT 2009

DrScheme's Scheme mode syntax colorer is now actually a `#lang'
colorer. It detects a `#lang' line and uses a syntax colorer that is
specified by the language, if any.

The Scribble languages `scribble/base', `scribble/manual', etc. specify
a syntax colorer that handles @ notation and that starts the body in
"text" mode. The `at-exp' language constructor similarly specifies a
colorer that adds support for `@' notation to the Scheme colorer.

A minor consequence of this change is that a `#lang' line turns red if
it refers to a language that does not exist (while the body is colored
as Scheme code).

For now, `#lang planet' does not load a colorer via Planet --- because
it seems like a bad idea to install a Planet package just because you
open a file that starts `#lang planet ...'. We'll have to add something
to let a DrScheme user designate packages to be trusted as plug-ins.

There's no R6RS colorer, yet, but this change makes it possible to drop
in an R6RS colorer that is triggered by `#!r6rs'.

Posted on the users mailing list.