Make rackedit tolerant when there's no GUI available

This commit is contained in:
2026-08-22 14:05:07 +02:00
parent 0d3b55f252
commit b41e312a80
5 changed files with 212 additions and 155 deletions
+13
View File
@@ -64,6 +64,19 @@ The standard File menu does not contain the @onscreen{Exit} or
@onscreen{Quit} command. Closing an editor window closes only that window.
}
@section{Headless environments}
Loading @racketmodname[rackedit] does not initialize Racket's GUI subsystem.
The GUI implementation is loaded dynamically only when @racket[rkdt] is
actually called. This allows another package to depend on @tt{rackedit} and to
be loaded in a headless process without immediately attempting to initialize
GTK or connect to a graphical display.
Calling @racket[rkdt] itself still requires a usable graphical environment. A
program that supports both graphical and terminal editors can therefore select
a terminal editor before calling @racket[rkdt], while safely keeping
@tt{rackedit} as a dependency.
@section{Frame callback lifecycle}
The procedure supplied with @racket[#:frame-cb] is called as