comparison man/mule.texi @ 37019:1deafff9fd1f

(Language Environments): Explain how to update the X server's font database after installing Intlfonts. (Language Environments): Add rationale for using the language environment hook. (Select Input Method): Add an example of setting default-input-method inside set-language-environment-hook. (Recognize Coding): Explain who would like to disable EOL conversions. (Specify Coding): Add an index entry for non-ASCII file names.
author Eli Zaretskii <eliz@gnu.org>
date Tue, 27 Mar 2001 09:39:53 +0000
parents 6a6141e694a5
children 71fe12822bf3
comparison
equal deleted inserted replaced
37018:6883b349cfd6 37019:1deafff9fd1f
218 sign), Polish, Romanian, Slovak, Slovenian, Thai, Tibetan, Turkish, 218 sign), Polish, Romanian, Slovak, Slovenian, Thai, Tibetan, Turkish,
219 Dutch, Spanish, and Vietnamese. 219 Dutch, Spanish, and Vietnamese.
220 @end quotation 220 @end quotation
221 221
222 @cindex fonts for various scripts 222 @cindex fonts for various scripts
223 @cindex Intlfonts package, installation
223 To display the script(s) used by your language environment on a 224 To display the script(s) used by your language environment on a
224 graphical display, you need to have a suitable font. If some of the 225 graphical display, you need to have a suitable font. If some of the
225 characters appear as empty boxes, you should install the GNU Intlfonts 226 characters appear as empty boxes, you should install the GNU Intlfonts
226 package, which includes fonts for all supported scripts. 227 package, which includes fonts for all supported scripts.@footnote{If
228 you run Emacs on X, you need to inform the X server about the location
229 of the newly installed fonts with the following commands:
230
231 @example
232 xset fp+ /usr/local/share/emacs/fonts
233 xset fp rehash
234 @end example
235 }
227 @xref{Fontsets}, for more details about setting up your fonts. 236 @xref{Fontsets}, for more details about setting up your fonts.
228 237
229 @findex set-locale-environment 238 @findex set-locale-environment
230 @vindex locale-language-names 239 @vindex locale-language-names
231 @vindex locale-charset-language-names 240 @vindex locale-charset-language-names
277 You can customize any language environment with the normal hook 286 You can customize any language environment with the normal hook
278 @code{set-language-environment-hook}. The command 287 @code{set-language-environment-hook}. The command
279 @code{set-language-environment} runs that hook after setting up the new 288 @code{set-language-environment} runs that hook after setting up the new
280 language environment. The hook functions can test for a specific 289 language environment. The hook functions can test for a specific
281 language environment by checking the variable 290 language environment by checking the variable
282 @code{current-language-environment}. 291 @code{current-language-environment}. This hook is where you should
292 put non-default settings for specific language environment, such as
293 coding systems for keyboard input and terminal output, the default
294 input method, etc.
283 295
284 @vindex exit-language-environment-hook 296 @vindex exit-language-environment-hook
285 Before it starts to set up the new language environment, 297 Before it starts to set up the new language environment,
286 @code{set-language-environment} first runs the hook 298 @code{set-language-environment} first runs the hook
287 @code{exit-language-environment-hook}. This hook is useful for undoing 299 @code{exit-language-environment-hook}. This hook is useful for undoing
299 specifically for interactive input. In Emacs, typically each language 311 specifically for interactive input. In Emacs, typically each language
300 has its own input method; sometimes several languages which use the same 312 has its own input method; sometimes several languages which use the same
301 characters can share one input method. A few languages support several 313 characters can share one input method. A few languages support several
302 input methods. 314 input methods.
303 315
304 The simplest kind of input method works by mapping ASCII letters into 316 The simplest kind of input method works by mapping ASCII letters
305 another alphabet. This is how the Greek and Russian input methods work. 317 into another alphabet; this allows you to type characters which your
318 keyboard doesn't support directly. This is how the Greek and Russian
319 input methods work.
306 320
307 A more powerful technique is composition: converting sequences of 321 A more powerful technique is composition: converting sequences of
308 characters into one letter. Many European input methods use composition 322 characters into one letter. Many European input methods use composition
309 to produce a single non-ASCII letter from a sequence that consists of a 323 to produce a single non-ASCII letter from a sequence that consists of a
310 letter followed by accent characters (or vice versa). For example, some 324 letter followed by accent characters (or vice versa). For example, some
354 is the command @kbd{C-\} (@code{toggle-input-method}) used twice. 368 is the command @kbd{C-\} (@code{toggle-input-method}) used twice.
355 @ifinfo 369 @ifinfo
356 @xref{Select Input Method}. 370 @xref{Select Input Method}.
357 @end ifinfo 371 @end ifinfo
358 372
373 @cindex incremental search, input method interference
359 @kbd{C-\ C-\} is especially useful inside an incremental search, 374 @kbd{C-\ C-\} is especially useful inside an incremental search,
360 because it stops waiting for more characters to combine, and starts 375 because it stops waiting for more characters to combine, and starts
361 searching for what you have already entered. 376 searching for what you have already entered.
362 377
363 @vindex input-method-verbose-flag 378 @vindex input-method-verbose-flag
430 use in various buffers. When you have a default input method, you can 445 use in various buffers. When you have a default input method, you can
431 select it in the current buffer by typing @kbd{C-\}. The variable 446 select it in the current buffer by typing @kbd{C-\}. The variable
432 @code{default-input-method} specifies the default input method 447 @code{default-input-method} specifies the default input method
433 (@code{nil} means there is none). 448 (@code{nil} means there is none).
434 449
450 In some language environments, which support several different input
451 methods, you might want to use an input method different from the
452 default chosen by @code{set-language-environment}. You can instruct
453 Emacs to select a different default input method for a certain
454 language environment if you by using
455 @code{set-language-environment-hook} (@pxref{Language Environments,
456 set-language-environment-hook}). For example:
457
458 @lisp
459 (defun my-chinese-setup ()
460 "Set up my private Chinese environment."
461 (if (equal current-language-environment "Chinese-GB")
462 (setq default-input-method "chinese-tonepy")))
463 (add-hook 'set-language-environment-hook 'my-chinese-setup)
464 @end lisp
465
466 @noindent
467 This sets the default input method to be @code{chinese-tonepy}
468 whenever you choose a Chinese-GB language environment.
469
435 @findex quail-set-keyboard-layout 470 @findex quail-set-keyboard-layout
436 Some input methods for alphabetic scripts work by (in effect) 471 Some input methods for alphabetic scripts work by (in effect)
437 remapping the keyboard to emulate various keyboard layouts commonly used 472 remapping the keyboard to emulate various keyboard layouts commonly used
438 for those scripts. How to do this remapping properly depends on your 473 for those scripts. How to do this remapping properly depends on your
439 actual keyboard layout. To specify which layout your keyboard has, use 474 actual keyboard layout. To specify which layout your keyboard has, use
651 Emacs recognizes which kind of end-of-line conversion to use based on 686 Emacs recognizes which kind of end-of-line conversion to use based on
652 the contents of the file: if it sees only carriage-returns, or only 687 the contents of the file: if it sees only carriage-returns, or only
653 carriage-return linefeed sequences, then it chooses the end-of-line 688 carriage-return linefeed sequences, then it chooses the end-of-line
654 conversion accordingly. You can inhibit the automatic use of 689 conversion accordingly. You can inhibit the automatic use of
655 end-of-line conversion by setting the variable @code{inhibit-eol-conversion} 690 end-of-line conversion by setting the variable @code{inhibit-eol-conversion}
656 to non-@code{nil}. 691 to non-@code{nil}. If you do that, DOS-style files will be displayed
692 with the @samp{^M} characters visible in the buffer; some people
693 prefer this to the more subtle @samp{(DOS)} end-of-line type
694 indication near the left edge of the mode line (@pxref{Mode Line,
695 eol-mnemonic}.
657 696
658 @vindex inhibit-iso-escape-detection 697 @vindex inhibit-iso-escape-detection
659 @cindex escape sequences in files 698 @cindex escape sequences in files
660 By default, the automatic detection of coding system is sensitive to 699 By default, the automatic detection of coding system is sensitive to
661 escape sequences. If Emacs sees a sequence of characters that begin 700 escape sequences. If Emacs sees a sequence of characters that begin
899 938
900 The default for translation of process input and output depends on the 939 The default for translation of process input and output depends on the
901 current language environment. 940 current language environment.
902 941
903 @vindex file-name-coding-system 942 @vindex file-name-coding-system
943 @cindex file names with non-ASCII characters
904 The variable @code{file-name-coding-system} specifies a coding system 944 The variable @code{file-name-coding-system} specifies a coding system
905 to use for encoding file names. If you set the variable to a coding 945 to use for encoding file names. If you set the variable to a coding
906 system name (as a Lisp symbol or a string), Emacs encodes file names 946 system name (as a Lisp symbol or a string), Emacs encodes file names
907 using that coding system for all file operations. This makes it 947 using that coding system for all file operations. This makes it
908 possible to use non-ASCII characters in file names---or, at least, those 948 possible to use non-ASCII characters in file names---or, at least, those