drscheme:language:add-snip-value in DrScheme Tools Functions
(drscheme:language:add-snip-value-> void?test-valueconvert-valuesetup-thunk)
test-value: (any/c . -> . boolean?)
convert-value: (any/c . -> . (is-a?/csnip%))
setup-thunk=void: (-> any/c)Registers a handler to convert values into snips as they are printed in the REPL.
The
test-snipargument is called to determine if this handler can convert the value and theconvert-valueargument is called to build a snip. The (optional)setup-thunkis called just after the user's namespace and other setings are built, but before any of the user's code is evaluated.All three functions are called on the user's thread and with the user's settings.