[racket] examples of hooking a #lang into DrRacket?

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Mon Jul 21 02:32:21 EDT 2014

On Mon, Jul 21, 2014 at 12:53 AM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> Currently, `read-language` does return #f when `get-info` is not
> available. I'm not sure anymore whether that was intended, but since it
> has worked that way for a while, and since the intent of
> `read-language` is to report the `get-info` function, then I think the
> way forward here is to fix the documentation.

Okay.

> It sounds like DrRacket is handling a `#f` result ok: it should only
> support syntax coloring if a language specifies a 'color-lexer
> configuration via `get-info`, and so if `get-info` is not provided,
> then no 'color-lexer configuration is available. Or is `get-info`
> provided and somehow not recognized?

Syntax coloring is one thing and that's what's turning things red,
yes. But I think that a language that defines a get-info that returns
the default value for color-lexer should get the same behavior as when
read-language returns #f. The former currently gets the racket-lexer.
Do you think that behavior should change?

(DrRacket also consults the read-language returned get-info procedure
for other things, including the lack of buttons that Matthew B.
reported. As it happens, the "returns #f" path is currently going thru
the "raises exn" path, which is probably not what we want.)

Robby

Posted on the users mailing list.