From ee715b9f6d9fccf4415a21a756058a60c924bc27 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 15 Jun 2015 20:10:19 +0300 Subject: [PATCH] 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. --- lisp/international/mule-cmds.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 -- 2.11.4.GIT