Make rackedit tolerant when there's no GUI available
This commit is contained in:
@@ -49,5 +49,16 @@ For example, the window title can be changed before the frame becomes visible:
|
||||
The standard File menu does not contain the Exit/Quit command, so closing one
|
||||
editor window does not imply exiting the application that opened it.
|
||||
|
||||
## Headless environments
|
||||
|
||||
Requiring `rackedit` does not initialize Racket's GUI subsystem. This means that
|
||||
`(require rackedit)` is safe in a headless Racket process, for example a server
|
||||
process without access to an X11 or Wayland display.
|
||||
|
||||
The GUI implementation is loaded only when `rkdt` is actually called. Calling
|
||||
`rkdt` still requires a usable graphical environment. Programs that also support
|
||||
a terminal editor can therefore choose that editor before calling `rkdt`, without
|
||||
merely requiring `rackedit` causing GTK initialization.
|
||||
|
||||
Full API documentation is included as Scribble documentation in
|
||||
`scrbl/rkdt.scrbl`.
|
||||
|
||||
Reference in New Issue
Block a user