7.2General-purpose Modes

Plugins can register modes via
drracket:modes:add-mode. Each mode is visible in
the Modes submenu of the Edit menu.
Initially, DrRacket only supports two modes: Racket mode and
text mode. (The Racket mode consults the language in the
#lang line; see
Definitions Text Surrogate for more details.)

DrRacket automatically selects a mode for each open
file based on the file’s extension (and the language chosen
as described above). If the file ends with
.txt, DrRacket uses text mode. Otherwise, DrRacket
uses Racket mode.