comparison lisp/international/mule-cmds.el @ 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 e76de9fd17e3
children 8df3a4ab1adc
comparison
equal deleted inserted replaced
97912:1741183c4f3c 97913:358ab4e4f102
1840 (let ((func (get-language-info language-name 'setup-function))) 1840 (let ((func (get-language-info language-name 'setup-function)))
1841 (if (functionp func) 1841 (if (functionp func)
1842 (funcall func))) 1842 (funcall func)))
1843 1843
1844 (setq current-iso639-language 1844 (setq current-iso639-language
1845 (get-language-info language-name 'iso639-language)) 1845 (or (get-language-info language-name 'iso639-language)
1846 current-iso639-language))
1846 1847
1847 (run-hooks 'set-language-environment-hook) 1848 (run-hooks 'set-language-environment-hook)
1848 (force-mode-line-update t)) 1849 (force-mode-line-update t))
1849 1850
1850 (define-widget 'charset 'symbol 1851 (define-widget 'charset 'symbol
2508 ;; an explicit locale name, as their defaults are set from 2509 ;; an explicit locale name, as their defaults are set from
2509 ;; LC_MESSAGES and LC_TIME, not LC_CTYPE, and the user might not 2510 ;; LC_MESSAGES and LC_TIME, not LC_CTYPE, and the user might not
2510 ;; want to set them to the same value as LC_CTYPE. 2511 ;; want to set them to the same value as LC_CTYPE.
2511 (when locale-name 2512 (when locale-name
2512 (setq system-messages-locale locale) 2513 (setq system-messages-locale locale)
2513 (setq system-time-locale locale))) 2514 (setq system-time-locale locale))
2515
2516 (if (string-match "^[a-z][a-z]" locale)
2517 (setq current-iso639-language (intern (match-string 0 locale)))))
2514 2518
2515 (setq woman-locale 2519 (setq woman-locale
2516 (or system-messages-locale 2520 (or system-messages-locale
2517 (let ((msglocale (getenv "LC_MESSAGES" frame))) 2521 (let ((msglocale (getenv "LC_MESSAGES" frame)))
2518 (if (zerop (length msglocale)) 2522 (if (zerop (length msglocale))