From: Eli Zaretskii Date: Mon, 15 Jun 2015 17:10:19 +0000 (+0300) Subject: Fix current-iso639-language on MS-Windows X-Git-Tag: emacs-25.0.90~1760 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ee715b9f6d9fccf4415a21a756058a60c924bc27;p=emacs.git 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. --- 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