7 Language-Specific Capabilities
7.1 Customizing DrRacket’s Behavior
When using the language declared in the source, DrRacket queries that
language via module-compiled-language-info
if an expression in the interactions window is ready to be submitted
to the evaluator (when the user types return).
The info procedure is passed 'drracket:submit-predicate
and should return a function with this contract:
This function’s first argument is a port that contains the interactions window’s
data, starting from the prompt position to the end of the editor.
The second argument is a boolean indicating if the insertion point is
followed only by whitespace. The results should be a
boolean indicating if the expression should be evaluated.
This function is called in sandbox, but with no filesystem or networking
7.2 Customizing DrRacket’s GUI
DrRacket’s capability interface provides a mechanism for
tools to allow languages to hide their GUI interface, if the
tool does not apply to the language. Tools register
capabilities keyed with symbols via.
registered, a tool can query a language, via the
method. The result from this method controls whether or not
the tool shows this part of the GUI for DrRacket.
for a list of the capabilities registered by default.