changeset 97913:358ab4e4f102

(set-language-environment): Don't overwrite current-iso639-language if the current language environment doesn't provide that data. (set-locale-environment): Set current-iso639-language from the locale name.
author Kenichi Handa <handa@m17n.org>
date Mon, 01 Sep 2008 07:15:03 +0000
parents 1741183c4f3c
children 3202a37b62f3
files lisp/international/mule-cmds.el
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule-cmds.el	Mon Sep 01 07:11:28 2008 +0000
+++ b/lisp/international/mule-cmds.el	Mon Sep 01 07:15:03 2008 +0000
@@ -1842,7 +1842,8 @@
 	(funcall func)))
 
   (setq current-iso639-language
-	(get-language-info language-name 'iso639-language))
+	(or (get-language-info language-name 'iso639-language)
+	    current-iso639-language))
 
   (run-hooks 'set-language-environment-hook)
   (force-mode-line-update t))
@@ -2510,7 +2511,10 @@
       ;; want to set them to the same value as LC_CTYPE.
       (when locale-name
 	(setq system-messages-locale locale)
-	(setq system-time-locale locale)))
+	(setq system-time-locale locale))
+
+      (if (string-match "^[a-z][a-z]" locale)
+	  (setq current-iso639-language (intern (match-string 0 locale)))))
 
     (setq woman-locale
           (or system-messages-locale