--- rxvt-unicode/src/main.C 2006/01/12 00:35:39 1.175 +++ rxvt-unicode/src/main.C 2006/01/16 08:48:09 1.179 @@ -379,7 +379,7 @@ void rxvt_term::destroy_cb (time_watcher &w) { - SET_R (this); + make_current (); delete this; } @@ -480,9 +480,8 @@ rxvt_term::init (int argc, const char *const *argv) { SET_R (this); - TEMP_ENV; // few things in X do not call setlocale :( - set_locale (""); + set_environ (envv); // few things in X do not call setlocale :( if (!init_vars ()) return false; @@ -524,8 +523,7 @@ } } #endif - rxvt_perl.init (); - setlocale (LC_CTYPE, curlocale); // perl init destroys this info + rxvt_perl.init (this); HOOK_INVOKE ((this, HOOK_INIT, DT_END)); } #endif @@ -1453,7 +1451,7 @@ char **s; XIMStyles *xim_styles; - TEMP_ENV; + set_environ (envv); if (! ((p = XSetLocaleModifiers (modifiers)) && *p)) return false; @@ -1629,7 +1627,7 @@ char **s; char buf[IMBUFSIZ]; - SET_R (this); + make_current (); im_destroy ();