on-execute in drscheme:language:language<%>
The on-execute method is called on DrScheme's
eventspace's main thread before any evaluation happens
during execution. Use this method to initialize MzScheme's
parameters for the user. When
this function is called, the user's thread has already been
created, as has its custodian. These parameters have been
changed from the defaults in MzScheme:
current-custodian is set to a new custodian.
current-namespace has been set to a newly
created empty namespace.This namespace has the following modules
copied (with namespace-attach-module)
from DrScheme's original namespace:
'mzscheme
'(lib "mred.ss" "mred")
break-enabled
is #t
read-curly-brace-as-paren
is #t,
read-square-bracket-as-paren
is #t,
The
port-write-handler
and
port-display-handler
have been set to procedures
that call
pretty-print
and
pretty-display instead
of
write and
display. When
pretty-print and
pretty-display are
called by these parameters, the
pretty-print-columns parameter is set to
'infinity, so the output looks just like
write and
display. This is done so that
special scheme values can be displayed as snips.
The
current-print-covert-hook is to a
procedure so that snip%s are just returned
directly to be inserted into the interactions
text% object.
The output and input ports are set to point to the
interactions window with these parameters:
current-input-port,
current-output-port, and
current-error-port.
The
event-dispatch-handler is set so that DrScheme can perform some initial setup and
close down around the user's code.
The
current-directory and
current-load-relative-directory
are set to the directory where the definitions file is
saved, or if it isn't saved, to the initial directory where
DrScheme started up.
The snip-class-list, returned by
get-the-snip-class-list is initialized with all of the snipclasses in DrScheme's eventspace's snip-class-list.
The
error-print-source-location
parameter is set to #f and the
error-display-handler
is set to a handler that creates an error message from the
exception record, with font and color information and inserts
that error message into the definitions window.
( -> vod
send a-drscheme:language:language on-execute settings run-in-user-thread)
settings : settings
run-in-user-thread : ((-> void) -> void)