]> code.delx.au - gnu-emacs/commitdiff
Fix current-iso639-language on MS-Windows
authorEli Zaretskii <eliz@gnu.org>
Mon, 15 Jun 2015 17:10:19 +0000 (20:10 +0300)
committerEli Zaretskii <eliz@gnu.org>
Mon, 15 Jun 2015 17:10:19 +0000 (20:10 +0300)
* 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

index 76436682225c990adb2d41e2c916f3ffed7a2228..e56fcebfc267046e27f4b9dc3d41fb43fc04ffa0 100644 (file)
@@ -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