diff options
author | Andy Wingo <wingo@pobox.com> | 2010-03-30 10:28:51 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-03-30 10:28:51 +0200 |
commit | 655aadf4b09c40f4c7854e4325e8809fcb7cb36b (patch) | |
tree | 017df62a086bf96344e2cb15f68fd814b3fd2349 /libguile/script.c | |
parent | 0eedfa5cab71cef05e2b9f06d6286d3b8f04ca59 (diff) | |
download | guile-655aadf4b09c40f4c7854e4325e8809fcb7cb36b.tar.gz |
going through scm_shell not necessary to get autocompilation
* libguile/load.c (scm_init_load): Initialize %load-should-autocompile
from the environment variable here, so that apps that don't go through
scm_shell get autocompilation.
* libguile/script.c (scm_compile_shell_switches): Explicitly enable or
disable autocompilation here, if told to do so.
Diffstat (limited to 'libguile/script.c')
-rw-r--r-- | libguile/script.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libguile/script.c b/libguile/script.c index 2f2495774..3ba656fcf 100644 --- a/libguile/script.c +++ b/libguile/script.c @@ -720,13 +720,11 @@ scm_compile_shell_switches (int argc, char **argv) tail = scm_cons (scm_cons (sym_load_user_init, SCM_EOL), tail); } - /* If GUILE_AUTO_COMPILE is not set and no args are given, default to - autocompilation. */ - if (turn_on_autocompile || (scm_getenv_int ("GUILE_AUTO_COMPILE", 1) - && !dont_turn_on_autocompile)) + /* If we are given an autocompilation arg, set %load-should-autocompile. */ + if (turn_on_autocompile || dont_turn_on_autocompile) { tail = scm_cons (scm_list_3 (sym_set_x, sym_sys_load_should_autocompile, - SCM_BOOL_T), + scm_from_bool (turn_on_autocompile)), tail); } |