Skip to content

Instantly share code, notes, and snippets.

@n-miyo
Created October 9, 2011 02:52
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save n-miyo/1273211 to your computer and use it in GitHub Desktop.
patch for emacs-inline.patch(apply with p0)
--- src.orig/macim.m 2011-10-05 22:36:20.000000000 +0900
+++ src/macim.m 2011-10-05 22:36:40.000000000 +0900
@@ -100,7 +100,14 @@
}
else
{
- NSString *locale = [[NSLocale currentLocale] localeIdentifier];
+ NSString *locale;
+ NSArray *languages = [NSLocale preferredLanguages];
+ if (languages != nil) {
+ locale = [languages objectAtIndex:0];
+ } else {
+ locale = [[NSLocale currentLocale]
+ objectForKey:NSLocaleLanguageCode];
+ }
is = TISCopyInputSourceForLanguage(locale);
}
if (is) TISSelectInputSource(is);
@n-miyo
Copy link
Author

n-miyo commented Oct 9, 2011

same as https://gist.github.com/1250669 , but you can apply with it by 'patch -p0'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment