-
-
Save ganta/2924676 to your computer and use it in GitHub Desktop.
patch for emacs-inline.patch: Use preferredLanguages instead of currentLocale. (Deal with Emacs 24.1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** a/src/macim.m 2012-06-12 13:09:43.000000000 +0900 | |
--- b/src/macim.m 2012-06-12 13:11:47.000000000 +0900 | |
*************** | |
*** 99,105 **** | |
} | |
else | |
{ | |
! NSString *locale = [[NSLocale currentLocale] localeIdentifier]; | |
is = TISCopyInputSourceForLanguage((CFStringRef)locale); | |
} | |
if (is) TISSelectInputSource(is); | |
--- 99,111 ---- | |
} | |
else | |
{ | |
! NSString *locale; | |
! NSArray *languages = [NSLocale preferredLanguages]; | |
! if (languages != nil) { | |
! locale = [languages objectAtIndex:0]; | |
! } else { | |
! locale = [[NSLocale currentLocale] objectForKey:NSLocaleLanguageCode]; | |
! } | |
is = TISCopyInputSourceForLanguage((CFStringRef)locale); | |
} | |
if (is) TISSelectInputSource(is); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment