--- rxvt-unicode/src/main.C 2006/01/02 15:35:43 1.155 +++ rxvt-unicode/src/main.C 2006/01/03 18:11:34 1.157 @@ -50,7 +50,7 @@ vector rxvt_term::termlist; -static char curlocale[128]; +static char curlocale[128], savelocale[128]; bool rxvt_set_locale (const char *locale) @@ -63,6 +63,19 @@ return true; } +bool +rxvt_push_locale (const char *locale) +{ + strcpy (savelocale, curlocale); + rxvt_set_locale (locale); +} + +void +rxvt_pop_locale () +{ + rxvt_set_locale (savelocale); +} + #if ENABLE_COMBINING class rxvt_composite_vec rxvt_composite; @@ -476,11 +489,13 @@ #endif #if ENABLE_PERL - rxvt_perl.init (); + if (rs[Rs_perl_ext] && *rs[Rs_perl_ext]) + { + rxvt_perl.init (); + PERL_INVOKE ((this, HOOK_INIT, DT_END)); + } #endif - PERL_INVOKE ((this, HOOK_INIT, DT_END)); - create_windows (argc, argv); dDisp;