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