diff options
| author | Paul Eggert | 1999-10-23 08:26:16 +0000 |
|---|---|---|
| committer | Paul Eggert | 1999-10-23 08:26:16 +0000 |
| commit | fbc164decfbfdd52449a2116e44b50f917908d26 (patch) | |
| tree | 183f58958304dcce15aaf14ca7767265c4f42ed8 | |
| parent | 6ececc4d6e09c44b6de22862081ba06d8432b871 (diff) | |
| download | emacs-fbc164decfbfdd52449a2116e44b50f917908d26.tar.gz emacs-fbc164decfbfdd52449a2116e44b50f917908d26.zip | |
Describe new functions and variables for locales.
| -rw-r--r-- | etc/NEWS | 22 | ||||
| -rw-r--r-- | man/cmdargs.texi | 19 | ||||
| -rw-r--r-- | man/mule.texi | 67 |
3 files changed, 88 insertions, 20 deletions
| @@ -377,6 +377,10 @@ Shell script mode (sh-script) can now indent scripts for shells | |||
| 377 | derived from sh and rc. The indentation style is customizeable, and | 377 | derived from sh and rc. The indentation style is customizeable, and |
| 378 | sh-script can attempt to "learn" the current buffer's style. | 378 | sh-script can attempt to "learn" the current buffer's style. |
| 379 | 379 | ||
| 380 | ** Emacs now attempts to determine the initial language environment | ||
| 381 | and preferred and locale coding systems systematically from the | ||
| 382 | LC_ALL, LC_CTYPE, and LANG environment variables during startup. | ||
| 383 | |||
| 380 | ** New language environments `Latin-8' and `Latin-9'. | 384 | ** New language environments `Latin-8' and `Latin-9'. |
| 381 | These correspond respectively to the ISO character sets 8859-14 | 385 | These correspond respectively to the ISO character sets 8859-14 |
| 382 | (Celtic) and 8859-15 (updated Latin-1, with the Euro sign). There is | 386 | (Celtic) and 8859-15 (updated Latin-1, with the Euro sign). There is |
| @@ -483,6 +487,24 @@ Note that +++ before an item means the Lisp manual has been updated. | |||
| 483 | When you add a new item, please add it without either +++ or --- | 487 | When you add a new item, please add it without either +++ or --- |
| 484 | so I will know I still need to look at it -- rms. | 488 | so I will know I still need to look at it -- rms. |
| 485 | 489 | ||
| 490 | ** New functions and variables for locales. | ||
| 491 | |||
| 492 | The new variable `locale-coding-system' specifies how to encode and | ||
| 493 | decode strings passed to low-level message functions like strerror and | ||
| 494 | time functions like strftime. The new variables `messages-locale' and | ||
| 495 | `time-locale' give the system locales to be used during the next | ||
| 496 | invocations of these two types of functions; the new variables | ||
| 497 | `previous-messages-locale' and `previous-time-locale' give the locales | ||
| 498 | most recently used. | ||
| 499 | |||
| 500 | The new function `set-locale-environment' sets the language | ||
| 501 | environment, preferred coding system, and locale coding system from | ||
| 502 | the system locale as specified by the LC_ALL, LC_CTYPE, and LANG | ||
| 503 | environment variables. It is normally invoked during startup. It | ||
| 504 | uses the new variables `locale-language-names', | ||
| 505 | `locale-charset-language-names', and `locale-preferred-coding-systems' | ||
| 506 | to make its decisions. | ||
| 507 | |||
| 486 | ** syntax tables now understand nested comments. | 508 | ** syntax tables now understand nested comments. |
| 487 | To declare a comment syntax as allowing nesting, just add an `n' | 509 | To declare a comment syntax as allowing nesting, just add an `n' |
| 488 | modifier to either of the characters of the comment end and the comment | 510 | modifier to either of the characters of the comment end and the comment |
diff --git a/man/cmdargs.texi b/man/cmdargs.texi index 97df157ddcb..692ea00a68a 100644 --- a/man/cmdargs.texi +++ b/man/cmdargs.texi | |||
| @@ -338,14 +338,19 @@ to search for files. | |||
| 338 | @item INFOPATH | 338 | @item INFOPATH |
| 339 | A colon-separated list of directories holding info files. Setting this | 339 | A colon-separated list of directories holding info files. Setting this |
| 340 | variable overrides the setting in @file{paths.el} when Emacs was built. | 340 | variable overrides the setting in @file{paths.el} when Emacs was built. |
| 341 | @item LANG | 341 | @item LC_ALL |
| 342 | @itemx LC_ALL | ||
| 343 | @itemx LC_CTYPE | 342 | @itemx LC_CTYPE |
| 344 | The user's preferred locale. A locale name which contains | 343 | @itemx LANG |
| 345 | @samp{8859-@var{n}}, @samp{8859_@var{n}} or @samp{8859@var{n}}, where | 344 | @findex set-locale-environment |
| 346 | @var{n} is between 1 and 4, automatically specifies the | 345 | @vindex locale-language-names |
| 347 | @samp{Latin-@var{n}} language environment when Emacs starts up. If | 346 | @vindex locale-charset-language-names |
| 348 | @var{n} is 9, that specifies @samp{Latin-5}. | 347 | @vindex locale-preferred-coding-systems |
| 348 | The user's locale, matched by @code{set-locale-environment} against | ||
| 349 | entries in @code{locale-language-names}, | ||
| 350 | @code{locale-charset-language-names}, and | ||
| 351 | @code{locale-preferred-coding-systems} to select a default language | ||
| 352 | environment and coding system. The first of these environment variables | ||
| 353 | with a nonempty value specifies the locale. | ||
| 349 | @item LOGNAME | 354 | @item LOGNAME |
| 350 | The user's login name. See also @code{USER}. | 355 | The user's login name. See also @code{USER}. |
| 351 | @item MAIL | 356 | @item MAIL |
diff --git a/man/mule.texi b/man/mule.texi index c6377e7c77e..09962e3d111 100644 --- a/man/mule.texi +++ b/man/mule.texi | |||
| @@ -9,23 +9,24 @@ | |||
| 9 | @cindex encoding of characters | 9 | @cindex encoding of characters |
| 10 | 10 | ||
| 11 | @cindex Chinese | 11 | @cindex Chinese |
| 12 | @cindex Cyrillic | ||
| 12 | @cindex Devanagari | 13 | @cindex Devanagari |
| 13 | @cindex Hindi | 14 | @cindex Hindi |
| 14 | @cindex Marathi | 15 | @cindex Marathi |
| 15 | @cindex Ethiopian | 16 | @cindex Ethiopic |
| 16 | @cindex Greek | 17 | @cindex Greek |
| 18 | @cindex Hebrew | ||
| 17 | @cindex IPA | 19 | @cindex IPA |
| 18 | @cindex Japanese | 20 | @cindex Japanese |
| 19 | @cindex Korean | 21 | @cindex Korean |
| 20 | @cindex Lao | 22 | @cindex Lao |
| 21 | @cindex Russian | ||
| 22 | @cindex Thai | 23 | @cindex Thai |
| 23 | @cindex Tibetan | 24 | @cindex Tibetan |
| 24 | @cindex Vietnamese | 25 | @cindex Vietnamese |
| 25 | Emacs supports a wide variety of international character sets, | 26 | Emacs supports a wide variety of international character sets, |
| 26 | including European variants of the Latin alphabet, as well as Chinese, | 27 | including European variants of the Latin alphabet, as well as Chinese, |
| 27 | Devanagari (Hindi and Marathi), Ethiopian, Greek, IPA, Japanese, Korean, | 28 | Cyrillic, Devanagari (Hindi and Marathi), Ethiopic, Greek, Hebrew, IPA, |
| 28 | Lao, Russian, Thai, Tibetan, and Vietnamese scripts. These features | 29 | Japanese, Korean, Lao, Thai, Tibetan, and Vietnamese scripts. These features |
| 29 | have been merged from the modified version of Emacs known as MULE (for | 30 | have been merged from the modified version of Emacs known as MULE (for |
| 30 | ``MULti-lingual Enhancement to GNU Emacs'') | 31 | ``MULti-lingual Enhancement to GNU Emacs'') |
| 31 | 32 | ||
| @@ -147,23 +148,54 @@ also specify the default coding system to use when you create a file. | |||
| 147 | Each language environment also specifies a default input method. | 148 | Each language environment also specifies a default input method. |
| 148 | 149 | ||
| 149 | @findex set-language-environment | 150 | @findex set-language-environment |
| 150 | The way to select a language environment is with the command @kbd{M-x | 151 | @vindex current-language-environment |
| 152 | To select a language environment, customize the option | ||
| 153 | @code{current-language-environment} or use the command @kbd{M-x | ||
| 151 | set-language-environment}. It makes no difference which buffer is | 154 | set-language-environment}. It makes no difference which buffer is |
| 152 | current when you use this command, because the effects apply globally to | 155 | current when you use this command, because the effects apply globally to |
| 153 | the Emacs session. The supported language environments include: | 156 | the Emacs session. The supported language environments include: |
| 154 | 157 | ||
| 155 | @quotation | 158 | @quotation |
| 156 | Chinese-BIG5, Chinese-CNS, Chinese-GB, Cyrillic-Alternativnyj, | 159 | Chinese-BIG5, Chinese-CNS, Chinese-GB, Cyrillic-ALT, Cyrillic-ISO, |
| 157 | Cyrillic-ISO, Cyrillic-KOI8, Devanagari, English, Ethiopic, Greek, | 160 | Cyrillic-KOI8, Czech, Devanagari, English, Ethiopic, German, Greek, |
| 158 | Hebrew, Japanese, Korean, Lao, Latin-1, Latin-2, Latin-3, Latin-4, | 161 | Hebrew, IPA, Japanese, Korean, Lao, Latin-1, Latin-2, Latin-3, |
| 159 | Latin-5, Thai, Tibetan, and Vietnamese. | 162 | Latin-4, Latin-5, Latin-8, Latin-9, Romanian, Slovak, Slovenian, Thai, |
| 163 | Tibetan, Turkish, and Vietnamese. | ||
| 160 | @end quotation | 164 | @end quotation |
| 161 | 165 | ||
| 166 | @findex set-locale-environment | ||
| 167 | @vindex locale-language-names | ||
| 168 | @vindex locale-charset-language-names | ||
| 162 | Some operating systems let you specify the language you are using by | 169 | Some operating systems let you specify the language you are using by |
| 163 | setting locale environment variables. Emacs handles one common special | 170 | setting the locale environment variables @env{LC_ALL}, @env{LC_CTYPE}, |
| 164 | case of this: if your locale name for character types contains the | 171 | and @env{LANG}; the first of these which is nonempty specifies your |
| 165 | string @samp{8859-@var{n}}, Emacs automatically selects the | 172 | locale. Emacs handles this during startup by invoking the |
| 166 | corresponding language environment. | 173 | @code{set-locale-environment} function, which matches your locale |
| 174 | against entries in the value of the variable | ||
| 175 | @code{locale-language-names} and selects the corresponding language | ||
| 176 | environment if a match is found. But if your locale also matches an | ||
| 177 | entry in the variable @code{locale-charset-language-names}, this entry | ||
| 178 | is preferred if its character set disagrees. For example, suppose the | ||
| 179 | locale @samp{en_GB.ISO8859-15} matches @code{"Latin-1"} in | ||
| 180 | @code{locale-language-names} and @code{"Latin-9"} in | ||
| 181 | @code{locale-charset-language-names}; since these two language | ||
| 182 | environments' character sets disagree, Emacs uses @code{"Latin-9"}. | ||
| 183 | |||
| 184 | @findex set-locale-environment | ||
| 185 | @vindex locale-preferred-coding-systems | ||
| 186 | The @code{set-locale-environment} function normally uses the preferred | ||
| 187 | coding system established by the language environment to decode system | ||
| 188 | messages. But if your locale matches an entry in the variable | ||
| 189 | @code{locale-preferred-coding-systems}, Emacs uses the corresponding | ||
| 190 | coding system instead. For example, if the locale @samp{ja_JP.PCK} | ||
| 191 | matches @code{japanese-shift-jis} in | ||
| 192 | @code{locale-preferred-coding-systems}, Emacs uses that encoding even | ||
| 193 | though it might normally use @code{japanese-iso-8bit}. | ||
| 194 | |||
| 195 | The environment chosen from the locale when Emacs starts is | ||
| 196 | overidden by any explicit use of the command | ||
| 197 | @code{set-language-environment} or customization of | ||
| 198 | @code{current-language-environment} in your init file. | ||
| 167 | 199 | ||
| 168 | @kindex C-h L | 200 | @kindex C-h L |
| 169 | @findex describe-language-environment | 201 | @findex describe-language-environment |
| @@ -750,6 +782,15 @@ these buffers under the visited file name, saving may use the wrong file | |||
| 750 | name, or it may get an error. If such a problem happens, use @kbd{C-x | 782 | name, or it may get an error. If such a problem happens, use @kbd{C-x |
| 751 | C-w} to specify a new file name for that buffer. | 783 | C-w} to specify a new file name for that buffer. |
| 752 | 784 | ||
| 785 | @vindex locale-coding-system | ||
| 786 | The variable @code{locale-coding-system} specifies a coding system to | ||
| 787 | use when encoding and decoding system strings such as system error | ||
| 788 | messages and @code{format-time-string} formats and time stamps. This | ||
| 789 | coding system should be compatible with the underlying system's coding | ||
| 790 | system, which is normally specified by the first environment variable in | ||
| 791 | the list @env{LC_ALL}, @env{LC_CTYPE}, @env{LANG} whose value is | ||
| 792 | nonempty. | ||
| 793 | |||
| 753 | @node Fontsets | 794 | @node Fontsets |
| 754 | @section Fontsets | 795 | @section Fontsets |
| 755 | @cindex fontsets | 796 | @cindex fontsets |