diff --git a/libguile/eval.c b/libguile/eval.c index b1cc84f96..b8479e4bf 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -3820,9 +3820,9 @@ change_environment (void *data) { SCM pair = SCM_PACK (data); SCM new_module = SCM_CAR (pair); - SCM old_module = scm_selected_module (); + SCM old_module = scm_current_module (); SCM_SETCDR (pair, old_module); - scm_select_module (new_module); + scm_set_current_module (new_module); } @@ -3847,9 +3847,9 @@ restore_environment (void *data) { SCM pair = SCM_PACK (data); SCM old_module = SCM_CDR (pair); - SCM new_module = scm_selected_module (); + SCM new_module = scm_current_module (); SCM_SETCAR (pair, new_module); - scm_select_module (old_module); + scm_set_current_module (old_module); } @@ -3874,7 +3874,7 @@ SCM_DEFINE (scm_eval, "eval", 2, 0, 0, #if (SCM_DEBUG_DEPRECATED == 0) -/* Use scm_selected_module () or scm_interaction_environment () +/* Use scm_current_module () or scm_interaction_environment () * instead. The former is the module selected during loading of code. * The latter is the module in which the user of this thread currently * types expressions. diff --git a/libguile/eval.h b/libguile/eval.h index 33a2f6f96..69aaec83d 100644 --- a/libguile/eval.h +++ b/libguile/eval.h @@ -125,7 +125,7 @@ extern SCM scm_eval_options_interface (SCM setting); /*fixme* This should probably be removed throught the code. */ #define SCM_TOP_LEVEL_LOOKUP_CLOSURE \ - SCM_MODULE_EVAL_CLOSURE (scm_selected_module ()) + SCM_MODULE_EVAL_CLOSURE (scm_current_module ()) #if SCM_DEBUG_DEPRECATED == 0 diff --git a/libguile/goops.c b/libguile/goops.c index 9794aca6f..c43d0a196 100644 --- a/libguile/goops.c +++ b/libguile/goops.c @@ -2323,9 +2323,9 @@ make_class_from_template (char *template, char *type_name, SCM supers) * This kludge is needed until DEFVAR ceases to use `define-public' * or `define-public' ceases to use `current-module'. */ - SCM old_module = scm_select_module (scm_module_goops); + SCM old_module = scm_set_current_module (scm_module_goops); DEFVAR (name, class); - scm_select_module (old_module); + scm_set_current_module (old_module); } return class; } @@ -2632,7 +2632,7 @@ scm_init_goops (void) { SCM old_module; scm_module_goops = scm_make_module (scm_read_0str ("(oop goops)")); - old_module = scm_select_module (scm_module_goops); + old_module = scm_set_current_module (scm_module_goops); scm_goops_lookup_closure = scm_module_lookup_closure (scm_module_goops); @@ -2667,7 +2667,7 @@ scm_init_goops (void) DEFVAR (name, scm_no_applicable_method); } - scm_select_module (old_module); + scm_set_current_module (old_module); } void diff --git a/libguile/load.c b/libguile/load.c index af78ea6f9..9c7d00675 100644 --- a/libguile/load.c +++ b/libguile/load.c @@ -103,7 +103,7 @@ load (void *data) scm_i_eval_x (form, scm_module_system_booted_p ? (scm_top_level_env - (SCM_MODULE_EVAL_CLOSURE (scm_selected_module ()))) + (SCM_MODULE_EVAL_CLOSURE (scm_current_module ()))) : SCM_EOL); } return SCM_UNSPECIFIED; @@ -479,7 +479,7 @@ SCM_DEFINE (scm_read_and_eval_x, "read-and-eval!", 0, 1, 0, SCM form = scm_read (port); if (SCM_EOF_OBJECT_P (form)) scm_ithrow (scm_end_of_file_key, SCM_EOL, 1); - return scm_eval_x (form, scm_selected_module ()); + return scm_eval_x (form, scm_current_module ()); } #undef FUNC_NAME diff --git a/libguile/modules.c b/libguile/modules.c index 1551d2813..45c9c83bf 100644 --- a/libguile/modules.c +++ b/libguile/modules.c @@ -73,7 +73,7 @@ scm_the_root_module () static SCM the_module; SCM -scm_selected_module () +scm_current_module () { return scm_fluid_ref (SCM_CDR (the_module)); } @@ -86,9 +86,9 @@ static SCM set_current_module; */ SCM -scm_select_module (SCM module) +scm_set_current_module (SCM module) { - SCM old = scm_selected_module (); + SCM old = scm_current_module (); scm_apply (SCM_CDR (set_current_module), SCM_LIST1 (module), SCM_EOL); return old; } @@ -102,7 +102,7 @@ SCM_DEFINE (scm_interaction_environment, "interaction-environment", 0, 0, 0, "dynamically typed by the user.") #define FUNC_NAME s_scm_interaction_environment { - return scm_selected_module (); + return scm_current_module (); } #undef FUNC_NAME diff --git a/libguile/modules.h b/libguile/modules.h index bd14e5ffe..57db947ba 100644 --- a/libguile/modules.h +++ b/libguile/modules.h @@ -83,9 +83,9 @@ extern SCM scm_module_system_booted_p; extern SCM scm_module_tag; extern SCM scm_the_root_module (void); -extern SCM scm_selected_module (void); +extern SCM scm_current_module (void); extern SCM scm_interaction_environment (void); -extern SCM scm_select_module (SCM module); +extern SCM scm_set_current_module (SCM module); extern SCM scm_make_module (SCM name); extern SCM scm_ensure_user_module (SCM name); extern SCM scm_module_lookup_closure (SCM module); diff --git a/libguile/rdelim.c b/libguile/rdelim.c index f08df3c92..20fe8150c 100644 --- a/libguile/rdelim.c +++ b/libguile/rdelim.c @@ -284,13 +284,13 @@ void scm_init_rdelim (void) { SCM rdelim_module = scm_make_module (scm_read_0str ("(ice-9 rdelim)")); - SCM old_module = scm_select_module (rdelim_module); + SCM old_module = scm_set_current_module (rdelim_module); #ifndef SCM_MAGIC_SNARFER #include "libguile/rdelim.x" #endif - scm_select_module (old_module); + scm_set_current_module (old_module); #if DEBUG_DEPRECATED == 0 { @@ -300,7 +300,7 @@ scm_init_rdelim (void) scm_eval_string (scm_makfromstr (expr, (sizeof expr) - 1, 0)); } - scm_select_module (old_module); + scm_set_current_module (old_module); #endif }