]> git.eshelyaron.com Git - emacs.git/commitdiff
(set-language-environment): Don't
authorKenichi Handa <handa@m17n.org>
Mon, 1 Sep 2008 07:15:03 +0000 (07:15 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 1 Sep 2008 07:15:03 +0000 (07:15 +0000)
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.

lisp/international/mule-cmds.el

index be3f53d2484d5730b8c2db838bcee013ae9eeca7..a5312599b31c7903bd16585ec3f8adb2f52f96ba 100644 (file)
@@ -1842,7 +1842,8 @@ specifies the character set for the major languages of Western Europe."
        (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 @@ See also `locale-charset-language-names', `locale-language-names',
       ;; 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