gracket should use gui-interactive.rkt
Previously it used interactive.rkt, which is problematic when the user wants to have a different file for interactive.rkt and gui-interactive.rkt
This commit is contained in:
parent
22546a3f22
commit
99b35a5d08
|
@ -36,6 +36,7 @@ static void pre_filter_cmdline_arguments(int *argc, char ***argv);
|
|||
#define MACOS9_INIT_FILENAME "PREFERENCES:gracketrc.rktl"
|
||||
#define INIT_FILENAME_CONF_SYM "gui-interactive-file"
|
||||
#define DEFAULT_INIT_MODULE "racket/gui/interactive"
|
||||
#define USER_INIT_MODULE "gui-interactive.rkt"
|
||||
#if WIN32
|
||||
# define NEED_CONSOLE_PRINTF
|
||||
# define DEFER_EXPLICIT_EXIT
|
||||
|
|
|
@ -670,7 +670,10 @@ static int finish_cmd_line_run(FinishArgs *fa, Repl_Proc repl)
|
|||
#ifndef DONT_LOAD_INIT_FILE
|
||||
if (fa->a->use_repl && !fa->a->no_init_file) {
|
||||
Scheme_Object *a[2];
|
||||
a[0] = get_init_filename(fa->global_env, INIT_FILENAME_CONF_SYM, DEFAULT_INIT_MODULE);
|
||||
a[0] = get_init_filename(fa->global_env,
|
||||
INIT_FILENAME_CONF_SYM,
|
||||
DEFAULT_INIT_MODULE,
|
||||
USER_INIT_MODULE);
|
||||
if (a[0]) {
|
||||
mz_jmp_buf * volatile save, newbuf;
|
||||
Scheme_Thread * volatile p;
|
||||
|
|
|
@ -104,7 +104,8 @@ extern BOOL WINAPI DllMain(HINSTANCE inst, ULONG reason, LPVOID reserved);
|
|||
*/
|
||||
static Scheme_Object *get_init_filename(Scheme_Env *env,
|
||||
char *init_filename_sym,
|
||||
char *default_init_module)
|
||||
char *default_init_module,
|
||||
char *user_init_module)
|
||||
{
|
||||
Scheme_Object *f, *a[2], *build_path;
|
||||
Scheme_Thread * volatile p;
|
||||
|
@ -121,7 +122,7 @@ static Scheme_Object *get_init_filename(Scheme_Env *env,
|
|||
f = scheme_builtin_value("find-system-path");
|
||||
a[0] = scheme_intern_symbol("addon-dir");
|
||||
a[0] = _scheme_apply(f, 1, a);
|
||||
a[1] = scheme_make_path("interactive.rkt");
|
||||
a[1] = scheme_make_path(user_init_module);
|
||||
f = _scheme_apply(build_path, 2, a);
|
||||
if (SCHEME_PATHP(f)) {
|
||||
char *filename;
|
||||
|
@ -178,6 +179,7 @@ extern Scheme_Object *scheme_initialize(Scheme_Env *env);
|
|||
# define MACOS9_INIT_FILENAME "PREFERENCES:racketrc.rktl"
|
||||
# define INIT_FILENAME_CONF_SYM "interactive-file"
|
||||
# define DEFAULT_INIT_MODULE "racket/interactive"
|
||||
# define USER_INIT_MODULE "interactive.rkt"
|
||||
# define PRINTF printf
|
||||
# define PROGRAM "Racket"
|
||||
# define PROGRAM_LC "racket"
|
||||
|
|
Loading…
Reference in New Issue
Block a user