# HG changeset patch # User aidan # Date 1135461561 0 # Node ID a2331a8fccb5cdb6b7d35c5d16423ba5be2b09e4 # Parent c112a340ac9116cb9d47b2a7f0bcb14c15c8c4fa [xemacs-hg @ 2005-12-24 21:59:18 by aidan] Call set-current-locale on startup, to better allow the language environment init code to work out what it should do. Reverts a bug I introduced on 2005-12-17. diff -r c112a340ac91 -r a2331a8fccb5 lisp/ChangeLog --- a/lisp/ChangeLog Sat Dec 24 21:24:27 2005 +0000 +++ b/lisp/ChangeLog Sat Dec 24 21:59:21 2005 +0000 @@ -1,3 +1,10 @@ +2005-12-24 Aidan Kehoe + + * mule/mule-cmds.el (set-language-environment-coding-systems): + * mule/mule-cmds.el (init-locale-at-early-startup): + Call set-current-locale (the wrapper for setlocale(3)) before + checking the current locale, because the C code doesn't. + 2005-12-24 Aidan Kehoe * mule/chinese.el: diff -r c112a340ac91 -r a2331a8fccb5 lisp/mule/mule-cmds.el --- a/lisp/mule/mule-cmds.el Sat Dec 24 21:24:27 2005 +0000 +++ b/lisp/mule/mule-cmds.el Sat Dec 24 21:59:21 2005 +0000 @@ -1341,12 +1341,19 @@ ;; locale but we should still use the right code page, etc. (declare-fboundp (mswindows-set-current-locale userdef))) ;; Unix: - (let ((locstring (current-locale))) - ;; assume C lib locale and LANG env var are set correctly. use - ;; them to find the langenv. - (setq langenv - (and locstring (get-language-environment-from-locale - locstring))))) + (let (locstring) + ;; Init the POSIX locale from the environment--this calls the C + ;; library's setlocale(3). + (set-current-locale "") + ;; Can't let locstring be the result of (set-current-locale "") + ;; because that can return a more detailed string than we know how + ;; to handle. + (setq locstring (current-locale) + ;; assume C lib locale and LANG env var are set correctly. + ;; use them to find the langenv. + langenv + (and locstring (get-language-environment-from-locale + locstring))))) ;; All systems: (unless langenv (setq langenv "English")) (setq current-language-environment langenv)