comparison lisp/mule/mule-cmds.el @ 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 77f5a5135b3a
children f6f6fc9eb269
comparison
equal deleted inserted replaced
3172:c112a340ac91 3173:a2331a8fccb5
1339 ;; user-default locale even if the langenv doesn't correspond; 1339 ;; user-default locale even if the langenv doesn't correspond;
1340 ;; we might not be able to find a langenv for the user-default 1340 ;; we might not be able to find a langenv for the user-default
1341 ;; locale but we should still use the right code page, etc. 1341 ;; locale but we should still use the right code page, etc.
1342 (declare-fboundp (mswindows-set-current-locale userdef))) 1342 (declare-fboundp (mswindows-set-current-locale userdef)))
1343 ;; Unix: 1343 ;; Unix:
1344 (let ((locstring (current-locale))) 1344 (let (locstring)
1345 ;; assume C lib locale and LANG env var are set correctly. use 1345 ;; Init the POSIX locale from the environment--this calls the C
1346 ;; them to find the langenv. 1346 ;; library's setlocale(3).
1347 (setq langenv 1347 (set-current-locale "")
1348 (and locstring (get-language-environment-from-locale 1348 ;; Can't let locstring be the result of (set-current-locale "")
1349 locstring))))) 1349 ;; because that can return a more detailed string than we know how
1350 ;; to handle.
1351 (setq locstring (current-locale)
1352 ;; assume C lib locale and LANG env var are set correctly.
1353 ;; use them to find the langenv.
1354 langenv
1355 (and locstring (get-language-environment-from-locale
1356 locstring)))))
1350 ;; All systems: 1357 ;; All systems:
1351 (unless langenv (setq langenv "English")) 1358 (unless langenv (setq langenv "English"))
1352 (setq current-language-environment langenv) 1359 (setq current-language-environment langenv)
1353 ;; Setup various coding systems and categories. 1360 ;; Setup various coding systems and categories.
1354 (let ((default-eol-type (coding-system-eol-type 1361 (let ((default-eol-type (coding-system-eol-type