[plt-scheme] Dr Scheme variable at startup problem

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Tue Jan 16 11:18:07 EST 2007

Jay Kint skrev:
 > I'm trying to add feature expressions to DrScheme for my own use.  So
 > far, I have the reader macros working, but I can't seem to get the
 > variable *features* to be visible at start up.
 >
 > What I did to get the reader macros working was to enable the loading
 > of MrEd's init file when loading DrScheme.  In mredrc.ss file I also 
define
 > *features* at a top level (not inside a module or unit or anything
 > else) doing a simple
 >
 > (define *features* '(plt scheme))
 >
 > But when I run DrScheme, and it gets to its initial prompt, typing
 > *features* says "reference to undefined identifier: *features*"  If I
 > put a (display *features*) in mredrc.ss right after defining it, I see
 > a "Standard Output" window display the features with the appropriate
 > value.  Somehow between then and the initial prompt, it's losing this
 > binding or switching namespaces or something that I haven't been able
 > to track down by going through the DrScheme collection.  Any help
 > would be appreciated.

If I recall correctly DrScheme by design doesn't load any user
init files in the graphical REPL. What you can do, is to add
a new language to the DrScheme language menu. In order to do
that see section "2.1.1  Adding module-based Languages to DrScheme"
in the "PLT Tools: DrScheme Extension Manual".

-- 
Jens Axel Søgaard




Posted on the users mailing list.