summaryrefslogtreecommitdiff
path: root/lisp/international/mule-cmds.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2015-06-15 20:10:19 +0300
committerEli Zaretskii <eliz@gnu.org>2015-06-15 20:10:19 +0300
commitee715b9f6d9fccf4415a21a756058a60c924bc27 (patch)
tree82100bb9ee83c44232d8146167ebb69154126344 /lisp/international/mule-cmds.el
parent643e0527b12abe6cbd6ce4d2d42300a2825560db (diff)
downloademacs-ee715b9f6d9fccf4415a21a756058a60c924bc27.tar.gz
Fix current-iso639-language on MS-Windows
* lisp/international/mule-cmds.el (set-locale-environment): Downcase the locale name before interning it. This is so the 'current-iso639-language' on MS-Windows matches the ':lang' property of font-spec objects.
Diffstat (limited to 'lisp/international/mule-cmds.el')
-rw-r--r--lisp/international/mule-cmds.el13
1 files changed, 12 insertions, 1 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 76436682225..e56fcebfc26 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -2603,7 +2603,18 @@ See also `locale-charset-language-names', `locale-language-names',
(setq system-time-locale locale))
(if (string-match "^[a-z][a-z]" locale)
- (setq current-iso639-language (intern (match-string 0 locale)))))
+ ;; The value of 'current-iso639-language' is matched against
+ ;; the ':lang' property of font-spec objects when selecting
+ ;; and prioritizing available fonts for displaying
+ ;; characters; see fontset.c.
+ (setq current-iso639-language
+ ;; The call to 'downcase' is for w32, where the
+ ;; MS-Windows locale names are in caps, as in "ENU",
+ ;; the equivalent of the Posix "en_US". Since the
+ ;; match mentioned above uses memq, and ':lang'
+ ;; properties have lower-case values, the letter-case
+ ;; must match exactly.
+ (intern (downcase (match-string 0 locale))))))
(setq woman-locale
(or system-messages-locale