NOTE: This patch has been committed.
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.
lisp/ChangeLog addition:
2005-12-24 Aidan Kehoe <kehoea(a)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.
XEmacs Trunk source patch:
Diff command: cvs -q diff -u
Files affected: lisp/mule/mule-cmds.el
Index: lisp/mule/mule-cmds.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/mule/mule-cmds.el,v
retrieving revision 1.26
diff -u -u -r1.26 mule-cmds.el
--- lisp/mule/mule-cmds.el 2005/12/17 19:47:00 1.26
+++ lisp/mule/mule-cmds.el 2005/12/24 21:55:09
@@ -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)
--
I AM IN JAIL AND ALLOWED SEND ONLY ONE CABLE SINCE WAS ARRESTED WHILE
MEASURING FIFTEEN FOOT WALL OUTSIDE PALACE AND HAVE JUST FINISHED COUNTING
THIRTY EIGHT THOUSAND FIVE HUNDERED TWENTY TWO NAMES WHOS WHO IN MIDEAST.