aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert1999-10-23 08:26:16 +0000
committerPaul Eggert1999-10-23 08:26:16 +0000
commitfbc164decfbfdd52449a2116e44b50f917908d26 (patch)
tree183f58958304dcce15aaf14ca7767265c4f42ed8
parent6ececc4d6e09c44b6de22862081ba06d8432b871 (diff)
downloademacs-fbc164decfbfdd52449a2116e44b50f917908d26.tar.gz
emacs-fbc164decfbfdd52449a2116e44b50f917908d26.zip
Describe new functions and variables for locales.
-rw-r--r--etc/NEWS22
-rw-r--r--man/cmdargs.texi19
-rw-r--r--man/mule.texi67
3 files changed, 88 insertions, 20 deletions
diff --git a/etc/NEWS b/etc/NEWS
index dcddc4d025e..6a2b2370f50 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -377,6 +377,10 @@ Shell script mode (sh-script) can now indent scripts for shells
377derived from sh and rc. The indentation style is customizeable, and 377derived from sh and rc. The indentation style is customizeable, and
378sh-script can attempt to "learn" the current buffer's style. 378sh-script can attempt to "learn" the current buffer's style.
379 379
380** Emacs now attempts to determine the initial language environment
381and preferred and locale coding systems systematically from the
382LC_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'.
381These correspond respectively to the ISO character sets 8859-14 385These 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.
483When you add a new item, please add it without either +++ or --- 487When you add a new item, please add it without either +++ or ---
484so I will know I still need to look at it -- rms. 488so I will know I still need to look at it -- rms.
485 489
490** New functions and variables for locales.
491
492The new variable `locale-coding-system' specifies how to encode and
493decode strings passed to low-level message functions like strerror and
494time functions like strftime. The new variables `messages-locale' and
495`time-locale' give the system locales to be used during the next
496invocations of these two types of functions; the new variables
497`previous-messages-locale' and `previous-time-locale' give the locales
498most recently used.
499
500The new function `set-locale-environment' sets the language
501environment, preferred coding system, and locale coding system from
502the system locale as specified by the LC_ALL, LC_CTYPE, and LANG
503environment variables. It is normally invoked during startup. It
504uses the new variables `locale-language-names',
505`locale-charset-language-names', and `locale-preferred-coding-systems'
506to make its decisions.
507
486** syntax tables now understand nested comments. 508** syntax tables now understand nested comments.
487To declare a comment syntax as allowing nesting, just add an `n' 509To declare a comment syntax as allowing nesting, just add an `n'
488modifier to either of the characters of the comment end and the comment 510modifier 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
339A colon-separated list of directories holding info files. Setting this 339A colon-separated list of directories holding info files. Setting this
340variable overrides the setting in @file{paths.el} when Emacs was built. 340variable 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
344The 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
348The user's locale, matched by @code{set-locale-environment} against
349entries in @code{locale-language-names},
350@code{locale-charset-language-names}, and
351@code{locale-preferred-coding-systems} to select a default language
352environment and coding system. The first of these environment variables
353with a nonempty value specifies the locale.
349@item LOGNAME 354@item LOGNAME
350The user's login name. See also @code{USER}. 355The 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,
26including European variants of the Latin alphabet, as well as Chinese, 27including European variants of the Latin alphabet, as well as Chinese,
27Devanagari (Hindi and Marathi), Ethiopian, Greek, IPA, Japanese, Korean, 28Cyrillic, Devanagari (Hindi and Marathi), Ethiopic, Greek, Hebrew, IPA,
28Lao, Russian, Thai, Tibetan, and Vietnamese scripts. These features 29Japanese, Korean, Lao, Thai, Tibetan, and Vietnamese scripts. These features
29have been merged from the modified version of Emacs known as MULE (for 30have 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.
147Each language environment also specifies a default input method. 148Each 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
151set-language-environment}. It makes no difference which buffer is 154set-language-environment}. It makes no difference which buffer is
152current when you use this command, because the effects apply globally to 155current when you use this command, because the effects apply globally to
153the Emacs session. The supported language environments include: 156the Emacs session. The supported language environments include:
154 157
155@quotation 158@quotation
156Chinese-BIG5, Chinese-CNS, Chinese-GB, Cyrillic-Alternativnyj, 159Chinese-BIG5, Chinese-CNS, Chinese-GB, Cyrillic-ALT, Cyrillic-ISO,
157Cyrillic-ISO, Cyrillic-KOI8, Devanagari, English, Ethiopic, Greek, 160Cyrillic-KOI8, Czech, Devanagari, English, Ethiopic, German, Greek,
158Hebrew, Japanese, Korean, Lao, Latin-1, Latin-2, Latin-3, Latin-4, 161Hebrew, IPA, Japanese, Korean, Lao, Latin-1, Latin-2, Latin-3,
159Latin-5, Thai, Tibetan, and Vietnamese. 162Latin-4, Latin-5, Latin-8, Latin-9, Romanian, Slovak, Slovenian, Thai,
163Tibetan, 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
163setting locale environment variables. Emacs handles one common special 170setting the locale environment variables @env{LC_ALL}, @env{LC_CTYPE},
164case of this: if your locale name for character types contains the 171and @env{LANG}; the first of these which is nonempty specifies your
165string @samp{8859-@var{n}}, Emacs automatically selects the 172locale. Emacs handles this during startup by invoking the
166corresponding language environment. 173@code{set-locale-environment} function, which matches your locale
174against entries in the value of the variable
175@code{locale-language-names} and selects the corresponding language
176environment if a match is found. But if your locale also matches an
177entry in the variable @code{locale-charset-language-names}, this entry
178is preferred if its character set disagrees. For example, suppose the
179locale @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
182environments' 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
187coding system established by the language environment to decode system
188messages. But if your locale matches an entry in the variable
189@code{locale-preferred-coding-systems}, Emacs uses the corresponding
190coding system instead. For example, if the locale @samp{ja_JP.PCK}
191matches @code{japanese-shift-jis} in
192@code{locale-preferred-coding-systems}, Emacs uses that encoding even
193though it might normally use @code{japanese-iso-8bit}.
194
195 The environment chosen from the locale when Emacs starts is
196overidden 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
750name, or it may get an error. If such a problem happens, use @kbd{C-x 782name, or it may get an error. If such a problem happens, use @kbd{C-x
751C-w} to specify a new file name for that buffer. 783C-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
787use when encoding and decoding system strings such as system error
788messages and @code{format-time-string} formats and time stamps. This
789coding system should be compatible with the underlying system's coding
790system, which is normally specified by the first environment variable in
791the list @env{LC_ALL}, @env{LC_CTYPE}, @env{LANG} whose value is
792nonempty.
793
753@node Fontsets 794@node Fontsets
754@section Fontsets 795@section Fontsets
755@cindex fontsets 796@cindex fontsets