comparison man/mule.texi @ 38786:4d3fd773cd30

Minor cleanups.
author Richard M. Stallman <rms@gnu.org>
date Sun, 12 Aug 2001 21:15:14 +0000
parents 3d0bec9036ac
children f62c80f79bd5
comparison
equal deleted inserted replaced
38785:4545461cb478 38786:4d3fd773cd30
300 table and terminal coding system, the locale coding system, and the 300 table and terminal coding system, the locale coding system, and the
301 preferred coding system as needed for the locale. 301 preferred coding system as needed for the locale.
302 302
303 If you modify the @env{LC_ALL}, @env{LC_CTYPE}, or @env{LANG} 303 If you modify the @env{LC_ALL}, @env{LC_CTYPE}, or @env{LANG}
304 environment variables while running Emacs, you may want to invoke the 304 environment variables while running Emacs, you may want to invoke the
305 @code{set-locale-environment} function afterwards to re-adjust the 305 @code{set-locale-environment} function afterwards to readjust the
306 language environment from the new locale. 306 language environment from the new locale.
307 307
308 @vindex locale-preferred-coding-systems 308 @vindex locale-preferred-coding-systems
309 The @code{set-locale-environment} function normally uses the preferred 309 The @code{set-locale-environment} function normally uses the preferred
310 coding system established by the language environment to decode system 310 coding system established by the language environment to decode system
361 has its own input method; sometimes several languages which use the same 361 has its own input method; sometimes several languages which use the same
362 characters can share one input method. A few languages support several 362 characters can share one input method. A few languages support several
363 input methods. 363 input methods.
364 364
365 The simplest kind of input method works by mapping ASCII letters 365 The simplest kind of input method works by mapping ASCII letters
366 into another alphabet; this allows you to type characters that your 366 into another alphabet; this allows you to use one other alphabet
367 keyboard doesn't support directly. This is how the Greek and Russian 367 instead of ASCII. The Greek and Russian input methods
368 input methods work. 368 work this way.
369 369
370 A more powerful technique is composition: converting sequences of 370 A more powerful technique is composition: converting sequences of
371 characters into one letter. Many European input methods use composition 371 characters into one letter. Many European input methods use composition
372 to produce a single non-ASCII letter from a sequence that consists of a 372 to produce a single non-ASCII letter from a sequence that consists of a
373 letter followed by accent characters (or vice versa). For example, some 373 letter followed by accent characters (or vice versa). For example, some
383 383
384 Chinese and Japanese require more complex methods. In Chinese input 384 Chinese and Japanese require more complex methods. In Chinese input
385 methods, first you enter the phonetic spelling of a Chinese word (in 385 methods, first you enter the phonetic spelling of a Chinese word (in
386 input method @code{chinese-py}, among others), or a sequence of 386 input method @code{chinese-py}, among others), or a sequence of
387 portions of the character (input methods @code{chinese-4corner} and 387 portions of the character (input methods @code{chinese-4corner} and
388 @code{chinese-sw}, and others). One phonetic spelling typically 388 @code{chinese-sw}, and others). One input sequence typically
389 corresponds to many different Chinese characters. You select the one 389 corresponds to many possible Chinese characters. You select the one
390 you mean using keys such as @kbd{C-f}, @kbd{C-b}, @kbd{C-n}, 390 you mean using keys such as @kbd{C-f}, @kbd{C-b}, @kbd{C-n},
391 @kbd{C-p}, and digits, which have special meanings in this situation. 391 @kbd{C-p}, and digits, which have special meanings in this situation.
392 392
393 The possible characters are conceptually arranged in several rows, 393 The possible characters are conceptually arranged in several rows,
394 with each row holding up to 10 alternatives. Normally, Emacs displays 394 with each row holding up to 10 alternatives. Normally, Emacs displays
406 alternative of the current row and uses it as input. 406 alternative of the current row and uses it as input.
407 407
408 @key{TAB} in these Chinese input methods displays a buffer showing 408 @key{TAB} in these Chinese input methods displays a buffer showing
409 all the possible characters at once; then clicking @kbd{Mouse-2} on 409 all the possible characters at once; then clicking @kbd{Mouse-2} on
410 one of them selects that alternative. The keys @kbd{C-f}, @kbd{C-b}, 410 one of them selects that alternative. The keys @kbd{C-f}, @kbd{C-b},
411 @kbd{C-n}, @kbd{C-p}, and digits continue to work also. When this 411 @kbd{C-n}, @kbd{C-p}, and digits continue to work as usual, but they
412 buffer is visible, @kbd{C-n} and @kbd{C-p} move the current 412 do the highlighting in the buffer showing the possible characters,
413 alternative to a different row. 413 rather than in the echo area.
414 414
415 In Japanese input methods, first you input a whole word using 415 In Japanese input methods, first you input a whole word using
416 phonetic spelling; then, after the word is in the buffer, Emacs 416 phonetic spelling; then, after the word is in the buffer, Emacs
417 converts it into one or more characters using a large dictionary. One 417 converts it into one or more characters using a large dictionary. One
418 phonetic spelling corresponds to a number of different Japanese words; 418 phonetic spelling corresponds to a number of different Japanese words;
738 list. 738 list.
739 739
740 If you use a coding system that specifies the end-of-line conversion 740 If you use a coding system that specifies the end-of-line conversion
741 type, such as @code{iso-8859-1-dos}, what this means is that Emacs 741 type, such as @code{iso-8859-1-dos}, what this means is that Emacs
742 should attempt to recognize @code{iso-8859-1} with priority, and should 742 should attempt to recognize @code{iso-8859-1} with priority, and should
743 use DOS end-of-line conversion if it recognizes @code{iso-8859-1}. 743 use DOS end-of-line conversion when it does recognize @code{iso-8859-1}.
744 744
745 @vindex file-coding-system-alist 745 @vindex file-coding-system-alist
746 Sometimes a file name indicates which coding system to use for the 746 Sometimes a file name indicates which coding system to use for the
747 file. The variable @code{file-coding-system-alist} specifies this 747 file. The variable @code{file-coding-system-alist} specifies this
748 correspondence. There is a special function 748 correspondence. There is a special function
799 You can specify the coding system for a particular file using the 799 You can specify the coding system for a particular file using the
800 @w{@samp{-*-@dots{}-*-}} construct at the beginning of a file, or a 800 @w{@samp{-*-@dots{}-*-}} construct at the beginning of a file, or a
801 local variables list at the end (@pxref{File Variables}). You do this 801 local variables list at the end (@pxref{File Variables}). You do this
802 by defining a value for the ``variable'' named @code{coding}. Emacs 802 by defining a value for the ``variable'' named @code{coding}. Emacs
803 does not really have a variable @code{coding}; instead of setting a 803 does not really have a variable @code{coding}; instead of setting a
804 variable, it uses the specified coding system for the file. For 804 variable, this uses the specified coding system for the file. For
805 example, @samp{-*-mode: C; coding: latin-1;-*-} specifies use of the 805 example, @samp{-*-mode: C; coding: latin-1;-*-} specifies use of the
806 Latin-1 coding system, as well as C mode. If you specify the coding 806 Latin-1 coding system, as well as C mode. When you specify the coding
807 explicitly in the file, that overrides 807 explicitly in the file, that overrides
808 @code{file-coding-system-alist}. 808 @code{file-coding-system-alist}.
809 809
810 @vindex auto-coding-alist 810 @vindex auto-coding-alist
811 @vindex auto-coding-regexp-alist 811 @vindex auto-coding-regexp-alist
842 most coding systems can only handle some of the possible characters. 842 most coding systems can only handle some of the possible characters.
843 This means that it is possible for you to insert characters that 843 This means that it is possible for you to insert characters that
844 cannot be encoded with the coding system that will be used to save the 844 cannot be encoded with the coding system that will be used to save the
845 buffer. For example, you could start with an ASCII file and insert a 845 buffer. For example, you could start with an ASCII file and insert a
846 few Latin-1 characters into it, or you could edit a text file in 846 few Latin-1 characters into it, or you could edit a text file in
847 Polish encoded in @code{iso-8859-2} and add to it translations of 847 Polish encoded in @code{iso-8859-2} and add some Russian words to it.
848 several Polish words into Russian. When you save the buffer, Emacs 848 When you save the buffer, Emacs cannot use the current value of
849 cannot use the current value of @code{buffer-file-coding-system}, 849 @code{buffer-file-coding-system}, because the characters you added
850 because the characters you added cannot be encoded by that coding 850 cannot be encoded by that coding system.
851 system.
852 851
853 When that happens, Emacs tries the most-preferred coding system (set 852 When that happens, Emacs tries the most-preferred coding system (set
854 by @kbd{M-x prefer-coding-system} or @kbd{M-x 853 by @kbd{M-x prefer-coding-system} or @kbd{M-x
855 set-language-environment}), and if that coding system can safely 854 set-language-environment}), and if that coding system can safely
856 encode all of the characters in the buffer, Emacs uses it, and stores 855 encode all of the characters in the buffer, Emacs uses it, and stores