User: aidan
Date: 05/12/24 22:59:22
Modified: xemacs/lisp/mule mule-cmds.el
Log:
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.
Revision Changes Path
1.715 +7 -0 XEmacs/xemacs/lisp/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/ChangeLog,v
retrieving revision 1.714
retrieving revision 1.715
diff -u -p -r1.714 -r1.715
--- ChangeLog 2005/12/24 21:24:23 1.714
+++ ChangeLog 2005/12/24 21:59:18 1.715
@@ -1,5 +1,12 @@
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.
+
+2005-12-24 Aidan Kehoe <kehoea(a)parhasard.net>
+
* mule/chinese.el:
Make euc-cn available as a coding system alias for cn-gb-2312, for
the sake of consistency with euc-jp, euc-ko and the FSF.
1.27 +13 -6 XEmacs/xemacs/lisp/mule/mule-cmds.el
Index: mule-cmds.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/mule/mule-cmds.el,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -p -r1.26 -r1.27
--- mule-cmds.el 2005/12/17 19:47:00 1.26
+++ mule-cmds.el 2005/12/24 21:59:21 1.27
@@ -1341,12 +1341,19 @@ of buffer-file-coding-system set by this
;; 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)
Show replies by date