This commit was generated by cvs2svn to compensate for changes in r5197,
[chise/xemacs-chise.git.1] / info / xemacs.info-8
1 This is Info file ../../info/xemacs.info, produced by Makeinfo version
2 1.68 from the input file xemacs.texi.
3
4 INFO-DIR-SECTION XEmacs Editor
5 START-INFO-DIR-ENTRY
6 * XEmacs: (xemacs).             XEmacs Editor.
7 END-INFO-DIR-ENTRY
8
9    This file documents the XEmacs editor.
10
11    Copyright (C) 1985, 1986, 1988 Richard M. Stallman.  Copyright (C)
12 1991, 1992, 1993, 1994 Lucid, Inc.  Copyright (C) 1993, 1994 Sun
13 Microsystems, Inc.  Copyright (C) 1995 Amdahl Corporation.
14
15    Permission is granted to make and distribute verbatim copies of this
16 manual provided the copyright notice and this permission notice are
17 preserved on all copies.
18
19    Permission is granted to copy and distribute modified versions of
20 this manual under the conditions for verbatim copying, provided also
21 that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
22 General Public License" are included exactly as in the original, and
23 provided that the entire resulting derived work is distributed under the
24 terms of a permission notice identical to this one.
25
26    Permission is granted to copy and distribute translations of this
27 manual into another language, under the above conditions for modified
28 versions, except that the sections entitled "The GNU Manifesto",
29 "Distribution" and "GNU General Public License" may be included in a
30 translation approved by the author instead of in the original English.
31
32 \1f
33 File: xemacs.info,  Node: Dired Immed,  Prev: Dired Deletion,  Up: Dired
34
35 Immediate File Operations in Dired
36 ----------------------------------
37
38    Some file operations in Dired take place immediately when they are
39 requested.
40
41 `C'
42      Copies the file described on the current line.  You must supply a
43      file name to copy to, using the minibuffer.
44
45 `f'
46      Visits the file described on the current line.  It is just like
47      typing `C-x C-f' and supplying that file name.  If the file on
48      this line is a subdirectory, `f' actually causes Dired to be
49      invoked on that subdirectory.  *Note Visiting::.
50
51 `o'
52      Like `f', but uses another window to display the file's buffer.
53      The Dired buffer remains visible in the first window.  This is
54      like using `C-x 4 C-f' to visit the file.  *Note Windows::.
55
56 `R'
57      Renames the file described on the current line.  You must supply a
58      file name to rename to, using the minibuffer.
59
60 `v'
61      Views the file described on this line using `M-x view-file'.
62      Viewing a file is like visiting it, but is slanted toward moving
63      around in the file conveniently and does not allow changing the
64      file.  *Note View File: Misc File Ops.  Viewing a file that is a
65      directory runs Dired on that directory.
66
67 \1f
68 File: xemacs.info,  Node: Misc File Ops,  Prev: Dired,  Up: Files
69
70 Miscellaneous File Operations
71 =============================
72
73    Emacs has commands for performing many other operations on files.
74 All operate on one file; they do not accept wildcard file names.
75
76    You can use the command `M-x add-name-to-file' to add a name to an
77 existing file without removing the old name.  The new name must belong
78 on the file system that the file is on.
79
80    `M-x append-to-file' adds the text of the region to the end of the
81 specified file.
82
83    `M-x copy-file' reads the file OLD and writes a new file named NEW
84 with the same contents.  Confirmation is required if a file named NEW
85 already exists, because copying overwrites the old contents of the file
86 NEW.
87
88    `M-x delete-file' deletes a specified file, like the `rm' command in
89 the shell.  If you are deleting many files in one directory, it may be
90 more convenient to use Dired (*note Dired::.).
91
92    `M-x insert-file' inserts a copy of the contents of a specified file
93 into the current buffer at point, leaving point unchanged before the
94 contents and the mark after them.  *Note Mark::.
95
96    `M-x make-symbolic-link' reads two file names OLD and LINKNAME, and
97 then creates a symbolic link named LINKNAME and pointing at OLD.
98 Future attempts to open file LINKNAME will then refer to the file named
99 OLD at the time the opening is done, or will result in an error if the
100 name OLD is not in use at that time.  Confirmation is required if you
101 create the link while LINKNAME is in use.  Note that not all systems
102 support symbolic links.
103
104    `M-x rename-file' reads two file names OLD and NEW using the
105 minibuffer, then renames file OLD as NEW.  If a file named NEW already
106 exists, you must confirm with `yes' or renaming is not done; this is
107 because renaming causes the previous meaning of the name NEW to be
108 lost.  If OLD and NEW are on different file systems, the file OLD is
109 copied and deleted.
110
111    `M-x view-file' allows you to scan or read a file by sequential
112 screenfuls.  It reads a file name argument using the minibuffer.  After
113 reading the file into an Emacs buffer, `view-file' reads and displays
114 one windowful.  You can then type <SPC> to scroll forward one window,
115 or <DEL> to scroll backward.  Various other commands are provided for
116 moving around in the file, but none for changing it; type `C-h' while
117 viewing a file for a list of them.  Most commands are the default Emacs
118 cursor motion commands.  To exit from viewing, type `C-c'.
119
120 \1f
121 File: xemacs.info,  Node: Buffers,  Next: Windows,  Prev: Files,  Up: Top
122
123 Using Multiple Buffers
124 **********************
125
126    Text you are editing in Emacs resides in an object called a
127 "buffer".  Each time you visit a file, Emacs creates a buffer to hold
128 the file's text.  Each time you invoke Dired, Emacs creates a buffer to
129 hold the directory listing.  If you send a message with `C-x m', a
130 buffer named `*mail*' is used to hold the text of the message.  When
131 you ask for a command's documentation, it appears in a buffer called
132 `*Help*'.
133
134    At any time, one and only one buffer is "selected".  It is also
135 called the "current buffer".  Saying a command operates on "the buffer"
136 really means that the command operates on the selected buffer, as most
137 commands do.
138
139    When Emacs creates multiple windows, each window has a chosen buffer
140 which is displayed there, but at any time only one of the windows is
141 selected and its chosen buffer is the selected buffer.  Each window's
142 mode line displays the name of the buffer the window is displaying
143 (*note Windows::.).
144
145    Each buffer has a name which can be of any length but is
146 case-sensitive.  You can select a buffer using its name.  Most buffers
147 are created when you visit files; their names are derived from the
148 files' names.  You can also create an empty buffer with any name you
149 want.  A newly started Emacs has a buffer named `*scratch*' which you
150 can use for evaluating Lisp expressions in Emacs.
151
152    Each buffer records what file it is visiting, whether it is
153 modified, and what major mode and minor modes are in effect in it
154 (*note Major Modes::.).  Any Emacs variable can be made "local to" a
155 particular buffer, meaning its value in that buffer can be different
156 from the value in other buffers.  *Note Locals::.
157
158 * Menu:
159
160 * Select Buffer::   Creating a new buffer or reselecting an old one.
161 * List Buffers::    Getting a list of buffers that exist.
162 * Misc Buffer::     Renaming; changing read-onliness; copying text.
163 * Kill Buffer::     Killing buffers you no longer need.
164 * Several Buffers:: How to go through the list of all buffers
165                      and operate variously on several of them.
166
167 \1f
168 File: xemacs.info,  Node: Select Buffer,  Next: List Buffers,  Prev: Buffers,  Up: Buffers
169
170 Creating and Selecting Buffers
171 ==============================
172
173 `C-x b BUFFER <RET>'
174      Select or create a buffer named BUFFER (`switch-to-buffer').
175
176 `C-x 4 b BUFFER <RET>'
177      Similar, but select a buffer named BUFFER in another window
178      (`switch-to-buffer-other-window').
179
180 `M-x switch-to-other-buffer N'
181      Switch to the previous buffer.
182
183    To select a buffer named BUFNAME, type `C-x b BUFNAME <RET>'.  This
184 is the command `switch-to-buffer' with argument BUFNAME.  You can use
185 completion on an abbreviation for the buffer name you want (*note
186 Completion::.).  An empty argument to `C-x b' specifies the most
187 recently selected buffer that is not displayed in any window.
188
189    Most buffers are created when you visit files, or use Emacs commands
190 that display text.  You can also create a buffer explicitly by typing
191 `C-x b BUFNAME <RET>', which creates a new, empty buffer that is not
192 visiting any file, and selects it for editing.  The new buffer's major
193 mode is determined by the value of `default-major-mode' (*note Major
194 Modes::.).  Buffers not visiting files are usually used for making
195 notes to yourself.  If you try to save one, you are asked for the file
196 name to use.
197
198    The function `switch-to-buffer-other-frame' is similar to
199 `switch-to-buffer' except that it creates a new frame in which to
200 display the selected buffer.
201
202    Use `M-x switch-to-other-buffer' to visit the previous buffer. If
203 you supply a positive integer N, the Nth most recent buffer is
204 displayed. If you supply an argument of 0, the current buffer is moved
205 to the bottom of the buffer stack.
206
207    Note that you can also use `C-x C-f' and any other command for
208 visiting a file to switch buffers.  *Note Visiting::.
209
210 \1f
211 File: xemacs.info,  Node: List Buffers,  Next: Misc Buffer,  Prev: Select Buffer,  Up: Buffers
212
213 Listing Existing Buffers
214 ========================
215
216 `C-x C-b'
217      List the existing buffers (`list-buffers').
218
219    To print a list of all existing buffers, type `C-x C-b'.  Each line
220 in the list shows one buffer's name, major mode, and visited file.  A
221 `*' at the beginning of a line indicates the buffer has been
222 "modified".  If several buffers are modified, it may be time to save
223 some with `C-x s' (*note Saving::.).  A `%' indicates a read-only
224 buffer.  A `.' marks the selected buffer.  Here is an example of a
225 buffer list:
226
227       MR Buffer         Size  Mode           File
228       -- ------         ----  ----           ----
229      .*  emacs.tex      383402 Texinfo       /u2/emacs/man/emacs.tex
230          *Help*         1287  Fundamental
231          files.el       23076 Emacs-Lisp     /u2/emacs/lisp/files.el
232        % RMAIL          64042 RMAIL          /u/rms/RMAIL
233       *% man            747   Dired             /u2/emacs/man/
234          net.emacs      343885 Fundamental   /u/rms/net.emacs
235          fileio.c       27691 C              /u2/emacs/src/fileio.c
236          NEWS           67340 Text           /u2/emacs/etc/NEWS
237          *scratch*         0     Lisp Interaction
238
239 Note that the buffer `*Help*' was made by a help request; it is not
240 visiting any file.  The buffer `man' was made by Dired on the directory
241 `/u2/emacs/man/'.
242
243    As you move the mouse over the `*Buffer List*' buffer, the lines are
244 highlighted.  This visual cue indicates that clicking the right mouse
245 button (`button3') will pop up a menu of commands on the buffer
246 represented by this line.  This menu duplicates most of those commands
247 which are bound to keys in the `*Buffer List*' buffer.
248
249 \1f
250 File: xemacs.info,  Node: Misc Buffer,  Next: Kill Buffer,  Prev: List Buffers,  Up: Buffers
251
252 Miscellaneous Buffer Operations
253 ===============================
254
255 `C-x C-q'
256      Toggle read-only status of buffer (`toggle-read-only').
257
258 `M-x rename-buffer'
259      Change the name of the current buffer.
260
261 `M-x view-buffer'
262      Scroll through a buffer.
263
264    A buffer can be "read-only", which means that commands to change its
265 text are not allowed.  Normally, read-only buffers are created by
266 subsystems such as Dired and Rmail that have special commands to operate
267 on the text.  Emacs also creates a read-only buffer if you visit a file
268 that is protected.  To make changes in a read-only buffer, use the
269 command `C-x C-q' (`toggle-read-only').  It makes a read-only buffer
270 writable, and makes a writable buffer read-only.  This works by setting
271 the variable `buffer-read-only', which has a local value in each buffer
272 and makes a buffer read-only if its value is non-`nil'.
273
274    `M-x rename-buffer' changes the name of the current buffer,
275 prompting for the new name in the minibuffer.  There is no default.  If
276 you specify a name that is used by a different buffer, an error is
277 signalled and renaming is not done.
278
279    `M-x view-buffer' is similar to `M-x view-file' (*note Misc File
280 Ops::.), but it examines an already existing Emacs buffer.  View mode
281 provides convenient commands for scrolling through the buffer but not
282 for changing it.  When you exit View mode, the resulting value of point
283 remains in effect.
284
285    To copy text from one buffer to another, use the commands `M-x
286 append-to-buffer' and `M-x insert-buffer'.  *Note Accumulating Text::.
287
288 \1f
289 File: xemacs.info,  Node: Kill Buffer,  Next: Several Buffers,  Prev: Misc Buffer,  Up: Buffers
290
291 Killing Buffers
292 ===============
293
294    After using Emacs for a while, you may accumulate a large number of
295 buffers and may want to eliminate the ones you no longer need.  There
296 are several commands for doing this.
297
298 `C-x k'
299      Kill a buffer, specified by name (`kill-buffer').
300
301 `M-x kill-some-buffers'
302      Offer to kill each buffer, one by one.
303
304    `C-x k' (`kill-buffer') kills one buffer, whose name you specify in
305 the minibuffer.  If you type just <RET> in the minibuffer, the default,
306 killing the current buffer, is used.  If the current buffer is killed,
307 the buffer that has been selected recently but does not appear in any
308 window now is selected.  If the buffer being killed contains unsaved
309 changes, you are asked to confirm with `yes' before the buffer is
310 killed.
311
312    The command `M-x kill-some-buffers' asks about each buffer, one by
313 one.  An answer of `y' means to kill the buffer.  Killing the current
314 buffer or a buffer containing unsaved changes selects a new buffer or
315 asks for confirmation just like `kill-buffer'.
316
317 \1f
318 File: xemacs.info,  Node: Several Buffers,  Prev: Kill Buffer,  Up: Buffers
319
320 Operating on Several Buffers
321 ============================
322
323    The "buffer-menu" facility is like a "Dired for buffers"; it allows
324 you to request operations on various Emacs buffers by editing a buffer
325 containing a list of them.  You can save buffers, kill them (here
326 called "deleting" them, for consistency with Dired), or display them.
327
328 `M-x buffer-menu'
329      Begin editing a buffer listing all Emacs buffers.
330
331    The command `buffer-menu' writes a list of all Emacs buffers into
332 the buffer `*Buffer List*', and selects that buffer in Buffer Menu
333 mode.  The buffer is read-only.  You can only change it using the
334 special commands described in this section.  Most of the commands are
335 graphic characters.  You can use  Emacs cursor motion commands in the
336 `*Buffer List*' buffer.  If the cursor is on a line describing a
337 buffer, the following  special commands apply to that buffer:
338
339 `d'
340      Request to delete (kill) the buffer, then move down.  A `D' before
341      the buffer name on a line indicates a deletion request.  Requested
342      deletions actually take place when you use the `x' command.
343
344 `k'
345      Synonym for `d'.
346
347 `C-d'
348      Like `d' but move up afterwards instead of down.
349
350 `s'
351      Request to save the buffer.  An `S' befor the buffer name on a line
352      indicates the request.  Requested saves actually take place when
353      you use the `x' command.  You can request both saving and deletion
354      for the same buffer.
355
356 `~'
357      Mark buffer "unmodified".  The command `~' does this immediately
358      when typed.
359
360 `x'
361      Perform previously requested deletions and saves.
362
363 `u'
364      Remove any request made for the current line, and move down.
365
366 `<DEL>'
367      Move to previous line and remove any request made for that line.
368
369    All commands that add or remove flags to request later operations
370 also move down a line.  They accept a numeric argument as a repeat
371 count, unless otherwise specified.
372
373    There are also special commands to use the buffer list to select
374 another buffer, and to specify one or more other buffers for display in
375 additional windows.
376
377 `1'
378      Select the buffer in a full-frame window.  This command takes
379      effect immediately.
380
381 `2'
382      Immediately set up two windows, with this buffer in one and the
383      buffer selected before `*Buffer List*' in the other.
384
385 `f'
386      Immediately select the buffer in place of the `*Buffer List*'
387      buffer.
388
389 `o'
390      Immediately select the buffer in another window as if by `C-x 4 b',
391      leaving `*Buffer List*' visible.
392
393 `q'
394      Immediately select this buffer, and display any buffers previously
395      flagged with the `m' command in other windows.  If there are no
396      buffers flagged with `m', this command is equivalent to `1'.
397
398 `m'
399      Flag this buffer to be displayed in another window if the `q'
400      command is used.  The request shows as a `>' at the beginning of
401      the line.  The same buffer may not have both a delete request and a
402      display request.
403
404    Going back between a `buffer-menu' buffer and other Emacs buffers is
405 easy.  You can, for example, switch from the `*Buffer List*' buffer to
406 another Emacs buffer, and edit there.  You can then reselect the
407 `buffer-menu' buffer and perform operations already requested, or you
408 can kill that buffer or pay no further attention to it.   All that
409 `buffer-menu' does directly is create and select a suitable buffer, and
410 turn on Buffer Menu mode.  All the other capabilities of the buffer
411 menu are implemented by special commands provided in Buffer Menu mode.
412
413    The only difference between `buffer-menu' and `list-buffers' is that
414 `buffer-menu' selects the `*Buffer List*' buffer and `list-buffers'
415 does not.  If you run `list-buffers' (that is, type `C-x C-b') and
416 select the buffer list manually, you can use all the commands described
417 here.
418
419 \1f
420 File: xemacs.info,  Node: Windows,  Next: Mule,  Prev: Buffers,  Up: Top
421
422 Multiple Windows
423 ****************
424
425    Emacs can split the frame into two or many windows, which can display
426 parts of different buffers or different parts of one buffer.  If you are
427 running XEmacs under X, that means you can have the X window that
428 contains the Emacs frame have multiple subwindows.
429
430 * Menu:
431
432 * Basic Window::     Introduction to Emacs windows.
433 * Split Window::     New windows are made by splitting existing windows.
434 * Other Window::     Moving to another window or doing something to it.
435 * Pop Up Window::    Finding a file or buffer in another window.
436 * Change Window::    Deleting windows and changing their sizes.
437
438 \1f
439 File: xemacs.info,  Node: Basic Window,  Next: Split Window,  Prev: Windows,  Up: Windows
440
441 Concepts of Emacs Windows
442 =========================
443
444    When Emacs displays multiple windows, each window has one Emacs
445 buffer designated for display.  The same buffer may appear in more than
446 one window; if it does, any changes in its text are displayed in all
447 the windows that display it.  Windows showing the same buffer can show
448 different parts of it, because each window has its own value of point.
449
450    At any time, one  window is the "selected window"; the buffer
451 displayed by that window is the current buffer.  The cursor shows the
452 location of point in that window.  Each other window has a location of
453 point as well, but since the terminal has only one cursor, it cannot
454 show the location of point in the other windows.
455
456    Commands to move point affect the value of point for the selected
457 Emacs window only.  They do not change the value of point in any other
458 Emacs window, including those showing the same buffer.  The same is
459 true for commands such as `C-x b' to change the selected buffer in the
460 selected window; they do not affect other windows at all.  However,
461 there are other commands such as `C-x 4 b' that select a different
462 window and switch buffers in it.  Also, all commands that display
463 information in a window, including (for example) `C-h f'
464 (`describe-function') and `C-x C-b' (`list-buffers'), work by switching
465 buffers in a non-selected window without affecting the selected window.
466
467    Each window has its own mode line, which displays the buffer name,
468 modification status, and major and minor modes of the buffer that is
469 displayed in the window.  *Note Mode Line::, for details on the mode
470 line.
471
472 \1f
473 File: xemacs.info,  Node: Split Window,  Next: Other Window,  Prev: Basic Window,  Up: Windows
474
475 Splitting Windows
476 =================
477
478 `C-x 2'
479      Split the selected window into two windows, one above the other
480      (`split-window-vertically').
481
482 `C-x 3'
483      Split the selected window into two windows positioned side by side
484      (`split-window-horizontally').
485
486 `C-x 6'
487      Save the current window configuration in register REG (a letter).
488
489 `C-x 7'
490      Restore (make current) the window configuration in register REG (a
491      letter).  Use with a register previously set with `C-x 6'.
492
493    The command `C-x 2' (`split-window-vertically') breaks the selected
494 window into two windows, one above the other.  Both windows start out
495 displaying the same buffer, with the same value of point.  By default
496 each of the two windows gets half the height of the window that was
497 split.  A numeric argument specifies how many lines to give to the top
498 window.
499
500    `C-x 3' (`split-window-horizontally') breaks the selected window
501 into two side-by-side windows.  A numeric argument specifies how many
502 columns to give the one on the left.  A line of vertical bars separates
503 the two windows.  Windows that are not the full width of the frame have
504 truncated mode lines which do not always appear in inverse video,
505 because Emacs display routines cannot display a region of inverse video
506 that is only part of a line on the screen.
507
508    When a window is less than the full width, many text lines are too
509 long to fit.  Continuing all those lines might be confusing.  Set the
510 variable `truncate-partial-width-windows' to non-`nil' to force
511 truncation in all windows less than the full width of the frame,
512 independent of the buffer and its value for `truncate-lines'.  *Note
513 Continuation Lines::.
514
515    Horizontal scrolling is often used in side-by-side windows.  *Note
516 Display::.
517
518    You can resize a window and store that configuration in a register by
519 supplying a REGISTER argument to `window-configuration-to-register'
520 (`C-x 6'). To return to the window configuration established with
521 `window-configuration-to-register', use `jump-to-register' (`C-x j').
522
523 \1f
524 File: xemacs.info,  Node: Other Window,  Next: Pop Up Window,  Prev: Split Window,  Up: Windows
525
526 Using Other Windows
527 ===================
528
529 `C-x o'
530      Select another window (`other-window').  That is the letter `o',
531      not zero.
532
533 `M-C-v'
534      Scroll the next window (`scroll-other-window').
535
536 `M-x compare-windows'
537      Find the next place where the text in the selected window does not
538      match the text in the next window.
539
540 `M-x other-window-any-frame N'
541      Select the Nth different window on any frame.
542
543    To select a different window, use `C-x o' (`other-window').  That is
544 an `o', for `other', not a zero.  When there are more than two windows,
545 the command moves through all the windows in a cyclic order, generally
546 top to bottom and left to right.  From the rightmost and bottommost
547 window, it goes back to the one at the upper left corner.  A numeric
548 argument, N, moves several steps in the cyclic order of windows. A
549 negative numeric argument moves around the cycle in the opposite order.
550 If the optional second argument ALL-FRAMES is non-`nil', the function
551 cycles through all frames.  When the minibuffer is active, the
552 minibuffer is the last window in the cycle; you can switch from the
553 minibuffer window to one of the other windows, and later switch back
554 and finish supplying the minibuffer argument that is requested.  *Note
555 Minibuffer Edit::.
556
557    The command `M-x other-window-any-frame' also selects the window N
558 steps away in the cyclic order.  However, unlike `other-window', this
559 command selects a window on the next or previous frame instead of
560 wrapping around to the top or bottom of the current frame, when there
561 are no more windows.
562
563    The usual scrolling commands (*note Display::.) apply to the selected
564 window only.  `M-C-v' (`scroll-other-window') scrolls the window that
565 `C-x o' would select.  Like `C-v', it takes positive and negative
566 arguments.
567
568    The command `M-x compare-windows' compares the text in the current
569 window with the text in the next window.  Comparison starts at point in
570 each window.  Point moves forward in each window, a character at a time,
571 until the next set of characters in the two windows are different.
572 Then the command is finished.
573
574    A prefix argument IGNORE-WHITESPACE means ignore changes in
575 whitespace.  The variable `compare-windows-whitespace' controls how
576 whitespace is skipped.
577
578    If `compare-ignore-case' is non-`nil', changes in case are also
579 ignored.
580
581 \1f
582 File: xemacs.info,  Node: Pop Up Window,  Next: Change Window,  Prev: Other Window,  Up: Windows
583
584 Displaying in Another Window
585 ============================
586
587    `C-x 4' is a prefix key for commands that select another window
588 (splitting the window if there is only one) and select a buffer in that
589 window.  Different `C-x 4' commands have different ways of finding the
590 buffer to select.
591
592 `C-x 4 b BUFNAME <RET>'
593      Select buffer BUFNAME in another window.  This runs
594      `switch-to-buffer-other-window'.
595
596 `C-x 4 f FILENAME <RET>'
597      Visit file FILENAME and select its buffer in another window.  This
598      runs `find-file-other-window'.  *Note Visiting::.
599
600 `C-x 4 d DIRECTORY <RET>'
601      Select a Dired buffer for directory DIRECTORY in another window.
602      This runs `dired-other-window'.  *Note Dired::.
603
604 `C-x 4 m'
605      Start composing a mail message in another window.  This runs
606      `mail-other-window', and its same-window version is `C-x m' (*note
607      Sending Mail::.).
608
609 `C-x 4 .'
610      Find a tag in the current tag table in another window.  This runs
611      `find-tag-other-window', the multiple-window variant of `M-.'
612      (*note Tags::.).
613
614    If the variable `display-buffer-function' is non-`nil', its value is
615 the function to call to handle `display-buffer'. It receives two
616 arguments, the buffer and a flag that if non-`nil' means that the
617 currently selected window is not acceptable. Commands such as
618 `switch-to-buffer-other-window' and `find-file-other-window' work using
619 this function.
620
621 \1f
622 File: xemacs.info,  Node: Change Window,  Prev: Pop Up Window,  Up: Windows
623
624 Deleting and Rearranging Windows
625 ================================
626
627 `C-x 0'
628      Get rid of the selected window (`delete-window').  That is a zero.
629      If there is more than one Emacs frame, deleting the sole remaining
630      window on that frame deletes the frame as well. If the current
631      frame is the only frame, it is not deleted.
632
633 `C-x 1'
634      Get rid of all windows except the selected one
635      (`delete-other-windows').
636
637 `C-x ^'
638      Make the selected window taller, at the expense of the other(s)
639      (`enlarge-window').
640
641 `C-x }'
642      Make the selected window wider (`enlarge-window-horizontally').
643
644    To delete a window, type `C-x 0' (`delete-window').  (That is a
645 zero.)  The space occupied by the deleted window is distributed among
646 the other active windows (but not the minibuffer window, even if that
647 is active at the time).  Once a window is deleted, its attributes are
648 forgotten; there is no automatic way to make another window of the same
649 shape or showing the same buffer.  The buffer continues to exist, and
650 you can select it in any window with `C-x b'.
651
652    `C-x 1' (`delete-other-windows') is more powerful than `C-x 0'; it
653 deletes all the windows except the selected one (and the minibuffer).
654 The selected window expands to use the whole frame except for the echo
655 area.
656
657    To readjust the division of space among existing windows, use `C-x
658 ^' (`enlarge-window').  It makes the currently selected window longer
659 by one line or as many lines as a numeric argument specifies.  With a
660 negative argument, it makes the selected window smaller.  `C-x }'
661 (`enlarge-window-horizontally') makes the selected window wider by the
662 specified number of columns.  The extra screen space given to a window
663 comes from one of its neighbors, if that is possible; otherwise, all
664 the competing windows are shrunk in the same proportion.  If this makes
665 some windows too small, those windows are deleted and their space is
666 divided up.   Minimum window size is specified by the variables
667 `window-min-height' and `window-min-width'.
668
669    You can also resize windows within a frame by clicking the left mouse
670 button on a modeline, and dragging.
671
672    Clicking the right button on a mode line pops up a menu of common
673 window manager operations.  This menu contains the following options:
674
675 Delete Window
676      Remove the window above this modeline from the frame.
677
678 Delete Other Windows
679      Delete all windows on the frame except for the one above this
680      modeline.
681
682 Split Window
683      Split the window above the mode line in half, creating another
684      window.
685
686 Split Window Horizontally
687      Split the window above the mode line in half horizontally, so that
688      there will be two windows side-by-side.
689
690 Balance Windows
691      Readjust the sizes of all windows on the frame until all windows
692      have roughly the same number of lines.
693
694 \1f
695 File: xemacs.info,  Node: Mule,  Next: Major Modes,  Prev: Windows,  Up: Top
696
697 World Scripts Support
698 *********************
699
700    If you compile XEmacs with mule option, it supports a wide variety of
701 world scripts, including Latin script, as well as Arabic script,
702 Simplified Chinese script (for mainland of China), Traditional Chinese
703 script (for Taiwan and Hong-Kong), Greek script, Hebrew script, IPA
704 symbols, Japanese scripts (Hiragana, Katakana and Kanji), Korean scripts
705 (Hangul and Hanja) and Cyrillic script (for Beylorussian, Bulgarian,
706 Russian, Serbian and Ukrainian).  These features have been merged from
707 the modified version of Emacs known as MULE (for "MULti-lingual
708 Enhancement to GNU Emacs").
709
710 * Menu:
711
712 * Mule Intro::              Basic concepts of Mule.
713 * Language Environments::   Setting things up for the language you use.
714 * Input Methods::           Entering text characters not on your keyboard.
715 * Select Input Method::     Specifying your choice of input methods.
716 * Coding Systems::          Character set conversion when you read and
717                               write files, and so on.
718 * Recognize Coding::        How XEmacs figures out which conversion to use.
719 * Specify Coding::          Various ways to choose which conversion to use.
720
721 \1f
722 File: xemacs.info,  Node: Mule Intro,  Next: Language Environments,  Prev: Mule,  Up: Mule
723
724 Introduction to world scripts
725 =============================
726
727    The users of these scripts have established many more-or-less
728 standard coding systems for storing files.  XEmacs translates between
729 the internal character encoding and various other coding systems when
730 reading and writing files, when exchanging data with subprocesses, and
731 (in some cases) in the `C-q' command (see below).
732
733    The command `C-h h' (`view-hello-file') displays the file
734 `etc/HELLO', which shows how to say "hello" in many languages.  This
735 illustrates various scripts.
736
737    Keyboards, even in the countries where these character sets are used,
738 generally don't have keys for all the characters in them.  So XEmacs
739 supports various "input methods", typically one for each script or
740 language, to make it convenient to type them.
741
742    The prefix key `C-x <RET>' is used for commands that pertain to
743 world scripts, coding systems, and input methods.
744
745 \1f
746 File: xemacs.info,  Node: Language Environments,  Next: Input Methods,  Prev: Mule Intro,  Up: Mule
747
748 Language Environments
749 =====================
750
751    All supported character sets are supported in XEmacs buffers if it is
752 compile with mule; there is no need to select a particular language in
753 order to display its characters in an XEmacs buffer.  However, it is
754 important to select a "language environment" in order to set various
755 defaults.  The language environment really represents a choice of
756 preferred script (more or less) rather that a choice of language.
757
758    The language environment controls which coding systems to recognize
759 when reading text (*note Recognize Coding::.).  This applies to files,
760 incoming mail, netnews, and any other text you read into XEmacs.  It may
761 also specify the default coding system to use when you create a file.
762 Each language environment also specifies a default input method.
763
764    The command to select a language environment is `M-x
765 set-language-environment'.  It makes no difference which buffer is
766 current when you use this command, because the effects apply globally to
767 the XEmacs session.  The supported language environments include:
768
769      Chinese-BIG5, Chinese-CNS, Chinese-GB, Cyrillic-ISO, English,
770      Ethiopic, Greek, Japanese, Korean, Latin-1, Latin-2, Latin-3,
771      Latin-4, Latin-5.
772
773    Some operating systems let you specify the language you are using by
774 setting locale environment variables.  XEmacs handles one common special
775 case of this: if your locale name for character types contains the
776 string `8859-N', XEmacs automatically selects the corresponding
777 language environment.
778
779    To display information about the effects of a certain language
780 environment LANG-ENV, use the command `C-h L LANG-ENV <RET>'
781 (`describe-language-environment').  This tells you which languages this
782 language environment is useful for, and lists the character sets,
783 coding systems, and input methods that go with it.  It also shows some
784 sample text to illustrate scripts used in this language environment.
785 By default, this command describes the chosen language environment.
786
787 \1f
788 File: xemacs.info,  Node: Input Methods,  Next: Select Input Method,  Prev: Language Environments,  Up: Mule
789
790 Input Methods
791 =============
792
793    An "input method" is a kind of character conversion designed
794 specifically for interactive input.  In XEmacs, typically each language
795 has its own input method; sometimes several languages which use the same
796 characters can share one input method.  A few languages support several
797 input methods.
798
799    The simplest kind of input method works by mapping ASCII letters into
800 another alphabet.  This is how the Greek and Russian input methods work.
801
802    A more powerful technique is composition: converting sequences of
803 characters into one letter.  Many European input methods use composition
804 to produce a single non-ASCII letter from a sequence that consists of a
805 letter followed by accent characters.  For example, some methods convert
806 the sequence `'a' into a single accented letter.
807
808    The input methods for syllabic scripts typically use mapping followed
809 by composition.  The input methods for Thai and Korean work this way.
810 First, letters are mapped into symbols for particular sounds or tone
811 marks; then, sequences of these which make up a whole syllable are
812 mapped into one syllable sign.
813
814    Chinese and Japanese require more complex methods.  In Chinese input
815 methods, first you enter the phonetic spelling of a Chinese word (in
816 input method `chinese-py', among others), or a sequence of portions of
817 the character (input methods `chinese-4corner' and `chinese-sw', and
818 others).  Since one phonetic spelling typically corresponds to many
819 different Chinese characters, you must select one of the alternatives
820 using special XEmacs commands.  Keys such as `C-f', `C-b', `C-n',
821 `C-p', and digits have special definitions in this situation, used for
822 selecting among the alternatives.  <TAB> displays a buffer showing all
823 the possibilities.
824
825    In Japanese input methods, first you input a whole word using
826 phonetic spelling; then, after the word is in the buffer, XEmacs
827 converts it into one or more characters using a large dictionary.  One
828 phonetic spelling corresponds to many differently written Japanese
829 words, so you must select one of them; use `C-n' and `C-p' to cycle
830 through the alternatives.
831
832    Sometimes it is useful to cut off input method processing so that the
833 characters you have just entered will not combine with subsequent
834 characters.  For example, in input method `latin-1-postfix', the
835 sequence `e '' combines to form an `e' with an accent.  What if you
836 want to enter them as separate characters?
837
838    One way is to type the accent twice; that is a special feature for
839 entering the separate letter and accent.  For example, `e ' '' gives
840 you the two characters `e''.  Another way is to type another letter
841 after the `e'--something that won't combine with that--and immediately
842 delete it.  For example, you could type `e e <DEL> '' to get separate
843 `e' and `''.
844
845    Another method, more general but not quite as easy to type, is to use
846 `C-\ C-\' between two characters to stop them from combining.  This is
847 the command `C-\' (`toggle-input-method') used twice.  *Note Select
848 Input Method::.
849
850    `C-\ C-\' is especially useful inside an incremental search, because
851 stops waiting for more characters to combine, and starts searching for
852 what you have already entered.
853
854    The variables `input-method-highlight-flag' and
855 `input-method-verbose-flag' control how input methods explain what is
856 happening.  If `input-method-highlight-flag' is non-`nil', the partial
857 sequence is highlighted in the buffer.  If `input-method-verbose-flag'
858 is non-`nil', the list of possible characters to type next is displayed
859 in the echo area (but not when you are in the minibuffer).
860
861 \1f
862 File: xemacs.info,  Node: Select Input Method,  Next: Coding Systems,  Prev: Input Methods,  Up: Mule
863
864 Selecting an Input Method
865 =========================
866
867 `C-\'
868      Enable or disable use of the selected input method.
869
870 `C-x <RET> C-\ METHOD <RET>'
871      Select a new input method for the current buffer.
872
873 `C-h I METHOD <RET>'
874 `C-h C-\ METHOD <RET>'
875      Describe the input method METHOD (`describe-input-method').  By
876      default, it describes the current input method (if any).
877
878 `M-x list-input-methods'
879      Display a list of all the supported input methods.
880
881    To choose an input method for the current buffer, use `C-x <RET>
882 C-\' (`select-input-method').  This command reads the input method name
883 with the minibuffer; the name normally starts with the language
884 environment that it is meant to be used with.  The variable
885 `current-input-method' records which input method is selected.
886
887    Input methods use various sequences of ASCII characters to stand for
888 non-ASCII characters.  Sometimes it is useful to turn off the input
889 method temporarily.  To do this, type `C-\' (`toggle-input-method').
890 To reenable the input method, type `C-\' again.
891
892    If you type `C-\' and you have not yet selected an input method, it
893 prompts for you to specify one.  This has the same effect as using `C-x
894 <RET> C-\' to specify an input method.
895
896    Selecting a language environment specifies a default input method for
897 use in various buffers.  When you have a default input method, you can
898 select it in the current buffer by typing `C-\'.  The variable
899 `default-input-method' specifies the default input method (`nil' means
900 there is none).
901
902    Some input methods for alphabetic scripts work by (in effect)
903 remapping the keyboard to emulate various keyboard layouts commonly used
904 for those scripts.  How to do this remapping properly depends on your
905 actual keyboard layout.  To specify which layout your keyboard has, use
906 the command `M-x quail-set-keyboard-layout'.
907
908    To display a list of all the supported input methods, type `M-x
909 list-input-methods'.  The list gives information about each input
910 method, including the string that stands for it in the mode line.
911
912 \1f
913 File: xemacs.info,  Node: Coding Systems,  Next: Recognize Coding,  Prev: Select Input Method,  Up: Mule
914
915 Coding Systems
916 ==============
917
918    Users of various languages have established many more-or-less
919 standard coding systems for representing them.  XEmacs does not use
920 these coding systems internally; instead, it converts from various
921 coding systems to its own system when reading data, and converts the
922 internal coding system to other coding systems when writing data.
923 Conversion is possible in reading or writing files, in sending or
924 receiving from the terminal, and in exchanging data with subprocesses.
925
926    XEmacs assigns a name to each coding system.  Most coding systems are
927 used for one language, and the name of the coding system starts with the
928 language name.  Some coding systems are used for several languages;
929 their names usually start with `iso'.  There are also special coding
930 systems `binary' and `no-conversion' which do not convert printing
931 characters at all.
932
933    In addition to converting various representations of non-ASCII
934 characters, a coding system can perform end-of-line conversion.  XEmacs
935 handles three different conventions for how to separate lines in a file:
936 newline, carriage-return linefeed, and just carriage-return.
937
938 `C-h C CODING <RET>'
939      Describe coding system CODING.
940
941 `C-h C <RET>'
942      Describe the coding systems currently in use.
943
944 `M-x list-coding-systems'
945      Display a list of all the supported coding systems.
946
947    The command `C-h C' (`describe-coding-system') displays information
948 about particular coding systems.  You can specify a coding system name
949 as argument; alternatively, with an empty argument, it describes the
950 coding systems currently selected for various purposes, both in the
951 current buffer and as the defaults, and the priority list for
952 recognizing coding systems (*note Recognize Coding::.).
953
954    To display a list of all the supported coding systems, type `M-x
955 list-coding-systems'.  The list gives information about each coding
956 system, including the letter that stands for it in the mode line (*note
957 Mode Line::.).
958
959    Each of the coding systems that appear in this list--except for
960 `binary', which means no conversion of any kind--specifies how and
961 whether to convert printing characters, but leaves the choice of
962 end-of-line conversion to be decided based on the contents of each file.
963 For example, if the file appears to use carriage-return linefeed between
964 lines, that end-of-line conversion will be used.
965
966    Each of the listed coding systems has three variants which specify
967 exactly what to do for end-of-line conversion:
968
969 `...-unix'
970      Don't do any end-of-line conversion; assume the file uses newline
971      to separate lines.  (This is the convention normally used on Unix
972      and GNU systems.)
973
974 `...-dos'
975      Assume the file uses carriage-return linefeed to separate lines,
976      and do the appropriate conversion.  (This is the convention
977      normally used on Microsoft systems.)
978
979 `...-mac'
980      Assume the file uses carriage-return to separate lines, and do the
981      appropriate conversion.  (This is the convention normally used on
982      the Macintosh system.)
983
984    These variant coding systems are omitted from the
985 `list-coding-systems' display for brevity, since they are entirely
986 predictable.  For example, the coding system `iso-8859-1' has variants
987 `iso-8859-1-unix', `iso-8859-1-dos' and `iso-8859-1-mac'.
988
989    In contrast, the coding system `binary' specifies no character code
990 conversion at all--none for non-Latin-1 byte values and none for end of
991 line.  This is useful for reading or writing binary files, tar files,
992 and other files that must be examined verbatim.
993
994    The easiest way to edit a file with no conversion of any kind is with
995 the `M-x find-file-literally' command.  This uses `binary', and also
996 suppresses other XEmacs features that might convert the file contents
997 before you see them.  *Note Visiting::.
998
999    The coding system `no-conversion' means that the file contains
1000 non-Latin-1 characters stored with the internal XEmacs encoding.  It
1001 handles end-of-line conversion based on the data encountered, and has
1002 the usual three variants to specify the kind of end-of-line conversion.
1003
1004 \1f
1005 File: xemacs.info,  Node: Recognize Coding,  Next: Specify Coding,  Prev: Coding Systems,  Up: Mule
1006
1007 Recognizing Coding Systems
1008 ==========================
1009
1010    Most of the time, XEmacs can recognize which coding system to use for
1011 any given file-once you have specified your preferences.
1012
1013    Some coding systems can be recognized or distinguished by which byte
1014 sequences appear in the data.  However, there are coding systems that
1015 cannot be distinguished, not even potentially.  For example, there is no
1016 way to distinguish between Latin-1 and Latin-2; they use the same byte
1017 values with different meanings.
1018
1019    XEmacs handles this situation by means of a priority list of coding
1020 systems.  Whenever XEmacs reads a file, if you do not specify the coding
1021 system to use, XEmacs checks the data against each coding system,
1022 starting with the first in priority and working down the list, until it
1023 finds a coding system that fits the data.  Then it converts the file
1024 contents assuming that they are represented in this coding system.
1025
1026    The priority list of coding systems depends on the selected language
1027 environment (*note Language Environments::.).  For example, if you use
1028 French, you probably want XEmacs to prefer Latin-1 to Latin-2; if you
1029 use Czech, you probably want Latin-2 to be preferred.  This is one of
1030 the reasons to specify a language environment.
1031
1032    However, you can alter the priority list in detail with the command
1033 `M-x prefer-coding-system'.  This command reads the name of a coding
1034 system from the minibuffer, and adds it to the front of the priority
1035 list, so that it is preferred to all others.  If you use this command
1036 several times, each use adds one element to the front of the priority
1037 list.
1038
1039    Sometimes a file name indicates which coding system to use for the
1040 file.  The variable `file-coding-system-alist' specifies this
1041 correspondence.  There is a special function
1042 `modify-coding-system-alist' for adding elements to this list.  For
1043 example, to read and write all `.txt' using the coding system
1044 `china-iso-8bit', you can execute this Lisp expression:
1045
1046      (modify-coding-system-alist 'file "\\.txt\\'" 'china-iso-8bit)
1047
1048 The first argument should be `file', the second argument should be a
1049 regular expression that determines which files this applies to, and the
1050 third argument says which coding system to use for these files.
1051
1052    You can specify the coding system for a particular file using the
1053 `-*-...-*-' construct at the beginning of a file, or a local variables
1054 list at the end (*note File Variables::.).  You do this by defining a
1055 value for the "variable" named `coding'.  XEmacs does not really have a
1056 variable `coding'; instead of setting a variable, it uses the specified
1057 coding system for the file.  For example, `-*-mode: C; coding:
1058 iso-8859-1;-*-' specifies use of the iso-8859-1 coding system, as well
1059 as C mode.
1060
1061    Once XEmacs has chosen a coding system for a buffer, it stores that
1062 coding system in `buffer-file-coding-system' and uses that coding
1063 system, by default, for operations that write from this buffer into a
1064 file.  This includes the commands `save-buffer' and `write-region'.  If
1065 you want to write files from this buffer using a different coding
1066 system, you can specify a different coding system for the buffer using
1067 `set-buffer-file-coding-system' (*note Specify Coding::.).
1068