Mercurial > hg > xemacs-beta
changeset 3173:a2331a8fccb5
[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.
author | aidan |
---|---|
date | Sat, 24 Dec 2005 21:59:21 +0000 |
parents | c112a340ac91 |
children | 588878f5a654 |
files | lisp/ChangeLog lisp/mule/mule-cmds.el |
diffstat | 2 files changed, 20 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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 <kehoea@parhasard.net> + + * 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 <kehoea@parhasard.net> * mule/chinese.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)