From e9aaa1db6929d42722050378cf6a941888bd5f4d Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 1 Sep 2008 07:15:03 +0000 Subject: [PATCH] (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. --- lisp/international/mule-cmds.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index be3f53d2484..a5312599b31 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -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 -- 2.39.5