emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: L10N & LC variables


From: Jean-Christophe Helary
Subject: Re: L10N & LC variables
Date: Sat, 27 May 2017 08:13:44 +0900

> On May 27, 2017, at 3:42, Paul Eggert <address@hidden> wrote:
> 
> On 05/26/2017 07:41 AM, Jean-Christophe Helary wrote:
>> 2005-04-14  YAMAMOTO Mitsuharu<address@hidden>
>> 
>>      * international/mule-cmds.el (set-locale-environment): On Mac OS,
>>      use preferences AppleLocale and AppleLanguages, and variable
>>      mac-system-locale for default locale.  On Mac OS Classic, use
>>      mac-system-coding-system for default coding systems.
>> But there is no further references to mac-system-locale in the other 
>> changelogs
> 
> That code was removed here:
> 
> http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=9e2a2647758db83b490e2993aa31cd4607305a82
> 
> in a commit dated 2008-07-27 that removed support for Carbon. From what you 
> say, that part of the 2008 change is making life for macOS users more 
> difficult, in that they sometimes need to manually set their language 
> environment instead of having it be deduced automatically from system 
> settings.

Sorry if I got my wording wrong. macOS does not seem to use the LC_ system to 
provide locale information to the applications. It uses 2 variables that are:

AppleLanguages: a string list of locale names the user has in her global 
preferences (usually just one item, usually a "standard" (language)_(region) 
pair. But she can add other locales and set priorities to provide for 
applications that offer a localization but not others.

AppleLocale: the string that is the first element of the list.

The two variables are set from the GUI based "System Preferences" application 
but they probably can be modified from the command line as well if necessary.

> Presumably there is a non-Carbon way to do the equivalent of the old code, 
> and if you or some other macOS expert would write it, that would remove this 
> minor glitch in the default Emacs configuration on macOS.

That would be great. I'll see if I can grasp the code.

> Here's a tip to help you research similar issues in the future: to find when 
> the string "AppleLocale" was removed from the file 
> lisp/international/mule-cmds.el, you can use this shell command:
> 
> git log -S AppleLocale lisp/international/mule-cmds.el

That's extremely helpful. Thank you *very* much.

Jean-Christophe 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]