Remove unnecessary prev/next/up pointers in @node
[bpt/emacs.git] / man / emacs.texi
1 \input texinfo
2
3 @setchapternewpage odd
4 @settitle GNU Emacs Manual
5 @setfilename ../info/emacs
6 @defcodeindex op
7 @synindex pg cp
8
9 @c The edition number appears in several places in this file
10 @set EDITION Fourteenth
11 @set EMACSVER 21.3.50
12
13 @ifnottex
14 This is the @value{EDITION} edition of the @cite{GNU Emacs Manual},
15 updated for Emacs version @value{EMACSVER}.
16
17 @dircategory Emacs
18 @direntry
19 * Emacs: (emacs). The extensible self-documenting text editor.
20 @end direntry
21
22 Published by the Free Software Foundation
23 59 Temple Place, Suite 330
24 Boston, MA 02111-1307 USA
25
26 Copyright (C) 1985, 1986,1987,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002
27 Free Software Foundation, Inc.
28
29 Permission is granted to copy, distribute and/or modify this document
30 under the terms of the GNU Free Documentation License, Version 1.1 or
31 any later version published by the Free Software Foundation; with the
32 Invariant Sections being ``The GNU Manifesto'', ``Distribution'' and
33 ``GNU GENERAL PUBLIC LICENSE'', with the Front-Cover texts being ``A GNU
34 Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the
35 license is included in the section entitled ``GNU Free Documentation
36 License.''
37
38 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
39 this GNU Manual, like GNU software. Copies published by the Free
40 Software Foundation raise funds for GNU development.''
41 @end ifnottex
42
43 @c in general, keep the following line commented out, unless doing a
44 @c copy of this manual that will be published. the manual should go
45 @c onto the distribution in the full, 8.5 x 11" size.
46
47 @c @smallbook
48
49 @iftex
50 @kbdinputstyle code
51
52 @shorttitlepage GNU Emacs Manual
53 @end iftex
54 @titlepage
55 @sp 6
56 @center @titlefont{GNU Emacs Manual}
57 @sp 4
58 @center @value{EDITION} Edition, Updated for Emacs Version @value{EMACSVER}.
59 @sp 5
60 @center Richard Stallman
61 @page
62 @vskip 0pt plus 1filll
63 Copyright @copyright{} 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
64 Free Software Foundation, Inc.
65 @sp 2
66 @value{EDITION} Edition @*
67 Updated for Emacs Version @value{EMACSVER}, @*
68 August 2000
69
70 ISBN 1-882114-06-X
71 @sp 1
72 Published by the Free Software Foundation @*
73 59 Temple Place, Suite 330 @*
74 Boston, MA 02111-1307 USA
75 @sp 1
76 Permission is granted to copy, distribute and/or modify this document
77 under the terms of the GNU Free Documentation License, Version 1.1 or
78 any later version published by the Free Software Foundation; with the
79 Invariant Sections being ``The GNU Manifesto'', ``Distribution'' and
80 ``GNU GENERAL PUBLIC LICENSE'', with the Front-Cover texts being ``A GNU
81 Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the
82 license is included in the section entitled ``GNU Free Documentation
83 License.''
84
85 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
86 this GNU Manual, like GNU software. Copies published by the Free
87 Software Foundation raise funds for GNU development.''
88
89 @sp 2
90 Cover art by Etienne Suvasa.
91
92 @end titlepage
93 @page
94 @ifnottex
95 @node Top, Distrib, (dir), (dir)
96 @top The Emacs Editor
97
98 Emacs is the extensible, customizable, self-documenting real-time
99 display editor. This Info file describes how to edit with Emacs and
100 some of how to customize it; it corresponds to GNU Emacs version
101 @value{EMACSVER}.
102
103 @ifinfo
104 If you never before used the Info documentation system, type @kbd{h},
105 and Emacs will take you on a guided tour through the Info commands.
106 @end ifinfo
107
108 For information on extending Emacs, see @ref{Top, Emacs Lisp,, elisp, The
109 Emacs Lisp Reference Manual}.
110 @end ifnottex
111
112 @ignore
113 These subcategories have been deleted for simplicity
114 and to avoid conflicts.
115 Completion
116 Backup Files
117 Auto-Saving: Protection Against Disasters
118 Snapshots
119 Text Mode
120 Outline Mode
121 @TeX{} Mode
122 Formatted Text
123 Fortran Mode
124 Fortran Indentation
125 Shell Command History
126
127 The ones for Dired and Rmail have had the items turned into :: items
128 to avoid conflicts.
129 Also Running Shell Commands from Emacs
130 and Sending Mail and Registers and Minibuffer.
131 @end ignore
132
133 @menu
134 * Distrib:: How to get the latest Emacs distribution.
135 * Copying:: The GNU General Public License gives you permission
136 to redistribute GNU Emacs on certain terms;
137 it also explains that there is no warranty.
138 * GNU Free Documentation License:: The license for this documentation.
139 * Intro:: An introduction to Emacs concepts.
140 * Glossary:: The glossary.
141 * Antinews:: Information about Emacs version 20.
142 * Mac OS:: Using Emacs in the Mac.
143 * MS-DOS:: Using Emacs on MS-DOS (otherwise known as "MS-DOG").
144 * Manifesto:: What's GNU? Gnu's Not Unix!
145 * Acknowledgments:: Major contributors to GNU Emacs.
146
147 Indexes (nodes containing large menus)
148 * Key Index:: An item for each standard Emacs key sequence.
149 * Command Index:: An item for each command name.
150 * Variable Index:: An item for each documented variable.
151 * Concept Index:: An item for each concept.
152 @c This is last because @ifnottex leaves an empty line.
153 @ifnottex
154 * Option Index:: An item for every command-line option.
155 @end ifnottex
156
157 Important General Concepts
158 * Screen:: How to interpret what you see on the screen.
159 * User Input:: Kinds of input events (characters, buttons,
160 function keys).
161 * Keys:: Key sequences: what you type to request one
162 editing action.
163 * Commands:: Named functions run by key sequences to do editing.
164 * Text Characters:: Character set for text (the contents of buffers
165 and strings).
166 * Entering Emacs:: Starting Emacs from the shell.
167 * Exiting:: Stopping or killing Emacs.
168 * Command Arguments:: Hairy startup options.
169
170 Fundamental Editing Commands
171 * Basic:: The most basic editing commands.
172 * Minibuffer:: Entering arguments that are prompted for.
173 * M-x:: Invoking commands by their names.
174 * Help:: Commands for asking Emacs about its commands.
175
176 Important Text-Changing Commands
177 * Mark:: The mark: how to delimit a ``region'' of text.
178 * Killing:: Killing text.
179 * Yanking:: Recovering killed text. Moving text.
180 * Accumulating Text:: Other ways of copying text.
181 * Rectangles:: Operating on the text inside a rectangle on the screen.
182 * Registers:: Saving a text string or a location in the buffer.
183 * Display:: Controlling what text is displayed.
184 * Search:: Finding or replacing occurrences of a string.
185 * Fixit:: Commands especially useful for fixing typos.
186
187 Major Structures of Emacs
188 * Files:: All about handling files.
189 * Buffers:: Multiple buffers; editing several files at once.
190 * Windows:: Viewing two pieces of text at once.
191 * Frames:: Running the same Emacs session in multiple X windows.
192 * International:: Using non-ASCII character sets (the MULE features).
193
194 Advanced Features
195 * Major Modes:: Text mode vs. Lisp mode vs. C mode ...
196 * Indentation:: Editing the white space at the beginnings of lines.
197 * Text:: Commands and modes for editing English.
198 * Programs:: Commands and modes for editing programs.
199 * Building:: Compiling, running and debugging programs.
200 * Maintaining:: Features for maintaining large programs.
201 * Abbrevs:: How to define text abbreviations to reduce
202 the number of characters you must type.
203 * Picture:: Editing pictures made up of characters
204 using the quarter-plane screen model.
205 * Sending Mail:: Sending mail in Emacs.
206 * Rmail:: Reading mail in Emacs.
207 * Dired:: You can ``edit'' a directory to manage files in it.
208 * Calendar/Diary:: The calendar and diary facilities.
209 * Gnus:: How to read netnews with Emacs.
210 * Shell:: Executing shell commands from Emacs.
211 * Emacs Server:: Using Emacs as an editing server for @code{mail}, etc.
212 * Hardcopy:: Printing buffers or regions.
213 * PostScript:: Printing buffers or regions as PostScript.
214 * PostScript Variables::
215 Customizing the PostScript printing commands.
216 * Sorting:: Sorting lines, paragraphs or pages within Emacs.
217 * Narrowing:: Restricting display and editing to a portion
218 of the buffer.
219 * Two-Column:: Splitting apart columns to edit them
220 in side-by-side windows.
221 * Editing Binary Files::
222 Using Hexl mode to edit binary files.
223 * Saving Emacs Sessions::
224 Saving Emacs state from one session to the next.
225 * Recursive Edit:: A command can allow you to do editing
226 "within the command". This is called a
227 "recursive editing level".
228 * Emulation:: Emulating some other editors with Emacs.
229 * Hyperlinking:: Following links in buffers.
230 * Dissociated Press:: Dissociating text for fun.
231 * Amusements:: Various games and hacks.
232 * Customization:: Modifying the behavior of Emacs.
233 * X Resources:: X resources for customizing Emacs.
234
235 Recovery from Problems
236 * Quitting:: Quitting and aborting.
237 * Lossage:: What to do if Emacs is hung or malfunctioning.
238 * Bugs:: How and when to report a bug.
239 * Contributing:: How to contribute improvements to Emacs.
240 * Service:: How to get help for your own Emacs needs.
241
242 Here are some other nodes which are really inferiors of the ones
243 already listed, mentioned here so you can get to them in one step:
244
245 --- The Detailed Node Listing ---
246
247 The Organization of the Screen
248
249 * Point:: The place in the text where editing commands operate.
250 * Echo Area:: Short messages appear at the bottom of the screen.
251 * Mode Line:: Interpreting the mode line.
252 * Menu Bar:: How to use the menu bar.
253
254 Basic Editing Commands
255
256 * Inserting Text:: Inserting text by simply typing it.
257 * Moving Point:: How to move the cursor to the place where you want to
258 change something.
259 * Erasing:: Deleting and killing text.
260 * Undo:: Undoing recent changes in the text.
261 * Files: Basic Files. Visiting, creating, and saving files.
262 * Help: Basic Help. Asking what a character does.
263 * Blank Lines:: Commands to make or delete blank lines.
264 * Continuation Lines:: Lines too wide for the screen.
265 * Position Info:: What page, line, row, or column is point on?
266 * Arguments:: Numeric arguments for repeating a command.
267
268 The Minibuffer
269
270 * Minibuffer File:: Entering file names with the minibuffer.
271 * Minibuffer Edit:: How to edit in the minibuffer.
272 * Completion:: An abbreviation facility for minibuffer input.
273 * Minibuffer History:: Reusing recent minibuffer arguments.
274 * Repetition:: Re-executing commands that used the minibuffer.
275
276 Help
277
278 * Help Summary:: Brief list of all Help commands.
279 * Key Help:: Asking what a key does in Emacs.
280 * Name Help:: Asking about a command, variable or function name.
281 * Apropos:: Asking what pertains to a given topic.
282 * Library Keywords:: Finding Lisp libraries by keywords (topics).
283 * Language Help:: Help relating to international language support.
284 * Misc Help:: Other help commands.
285
286 The Mark and the Region
287
288 * Setting Mark:: Commands to set the mark.
289 * Transient Mark:: How to make Emacs highlight the region--
290 when there is one.
291 * Using Region:: Summary of ways to operate on contents of the region.
292 * Marking Objects:: Commands to put region around textual units.
293 * Mark Ring:: Previous mark positions saved so you can go back there.
294 * Global Mark Ring:: Previous mark positions in various buffers.
295
296 Deletion and Killing
297
298 * Deletion:: Commands for deleting small amounts of text and
299 blank areas.
300 * Killing by Lines:: How to kill entire lines of text at one time.
301 * Other Kill Commands:: Commands to kill large regions of text and
302 syntactic units such as words and sentences.
303
304 Yanking
305
306 * Kill Ring:: Where killed text is stored. Basic yanking.
307 * Appending Kills:: Several kills in a row all yank together.
308 * Earlier Kills:: Yanking something killed some time ago.
309
310 Registers
311
312 * RegPos:: Saving positions in registers.
313 * RegText:: Saving text in registers.
314 * RegRect:: Saving rectangles in registers.
315 * RegConfig:: Saving window configurations in registers.
316 * RegFiles:: File names in registers.
317 * Bookmarks:: Bookmarks are like registers, but persistent.
318
319 Controlling the Display
320
321 * Scrolling:: Moving text up and down in a window.
322 * Horizontal Scrolling:: Moving text left and right in a window.
323 * Follow Mode:: Follow mode lets two windows scroll as one.
324 * Selective Display:: Hiding lines with lots of indentation.
325 * Optional Mode Line:: Optional mode line display features.
326 * Text Display:: How text is normally displayed.
327 * Display Custom:: Information on variables for customizing display.
328
329 Searching and Replacement
330
331 * Incremental Search:: Search happens as you type the string.
332 * Nonincremental Search:: Specify entire string and then search.
333 * Word Search:: Search for sequence of words.
334 * Regexp Search:: Search for match for a regexp.
335 * Regexps:: Syntax of regular expressions.
336 * Search Case:: To ignore case while searching, or not.
337 * Replace:: Search, and replace some or all matches.
338 * Other Repeating Search:: Operating on all matches for some regexp.
339
340 Replacement Commands
341
342 * Unconditional Replace:: Replacing all matches for a string.
343 * Regexp Replace:: Replacing all matches for a regexp.
344 * Replacement and Case:: How replacements preserve case of letters.
345 * Query Replace:: How to use querying.
346
347 Commands for Fixing Typos
348
349 * Kill Errors:: Commands to kill a batch of recently entered text.
350 * Transpose:: Exchanging two characters, words, lines, lists...
351 * Fixing Case:: Correcting case of last word entered.
352 * Spelling:: Apply spelling checker to a word or a whole buffer.
353
354 File Handling
355
356 * File Names:: How to type and edit file-name arguments.
357 * Visiting:: Visiting a file prepares Emacs to edit the file.
358 * Saving:: Saving makes your changes permanent.
359 * Reverting:: Reverting cancels all the changes not saved.
360 * Auto Save:: Auto Save periodically protects against loss of data.
361 * File Aliases:: Handling multiple names for one file.
362 * Version Control:: Version control systems (RCS, CVS and SCCS).
363 * Directories:: Creating, deleting, and listing file directories.
364 * Comparing Files:: Finding where two files differ.
365 * Misc File Ops:: Other things you can do on files.
366 * Compressed Files:: Accessing compressed files.
367 * Remote Files:: Accessing files on other sites.
368 * Quoted File Names:: Quoting special characters in file names.
369
370 Saving Files
371
372 * Backup:: How Emacs saves the old version of your file.
373 * Interlocking:: How Emacs protects against simultaneous editing
374 of one file by two users.
375
376 Version Control
377
378 * Introduction to VC:: How version control works in general.
379 * VC Mode Line:: How the mode line shows version control status.
380 * Basic VC Editing:: How to edit a file under version control.
381 * Old Versions:: Examining and comparing old versions.
382 * Secondary VC Commands:: The commands used a little less frequently.
383 * Branches:: Multiple lines of development.
384 * Snapshots:: Sets of file versions treated as a unit.
385 * Miscellaneous VC:: Various other commands and features of VC.
386 * Customizing VC:: Variables that change VC's behavior.
387
388 Using Multiple Buffers
389
390 * Select Buffer:: Creating a new buffer or reselecting an old one.
391 * List Buffers:: Getting a list of buffers that exist.
392 * Misc Buffer:: Renaming; changing read-onliness; copying text.
393 * Kill Buffer:: Killing buffers you no longer need.
394 * Several Buffers:: How to go through the list of all buffers
395 and operate variously on several of them.
396 * Indirect Buffers:: An indirect buffer shares the text of another buffer.
397
398 Multiple Windows
399
400 * Basic Window:: Introduction to Emacs windows.
401 * Split Window:: New windows are made by splitting existing windows.
402 * Other Window:: Moving to another window or doing something to it.
403 * Pop Up Window:: Finding a file or buffer in another window.
404 * Force Same Window:: Forcing certain buffers to appear in the selected
405 window rather than in another window.
406 * Change Window:: Deleting windows and changing their sizes.
407
408 Frames and X Windows
409
410 * Mouse Commands:: Moving, cutting, and pasting, with the mouse.
411 * Secondary Selection:: Cutting without altering point and mark.
412 * Clipboard:: Using the clipboard for selections.
413 * Mouse References:: Using the mouse to select an item from a list.
414 * Menu Mouse Clicks:: Mouse clicks that bring up menus.
415 * Mode Line Mouse:: Mouse clicks on the mode line.
416 * Creating Frames:: Creating additional Emacs frames with various contents.
417 * Frame Commands:: Iconifying, deleting, and switching frames.
418 * Speedbar:: How to make and use a speedbar frame.
419 * Multiple Displays:: How one Emacs job can talk to several displays.
420 * Special Buffer Frames:: You can make certain buffers have their own frames.
421 * Frame Parameters:: Changing the colors and other modes of frames.
422 * Scroll Bars:: How to enable and disable scroll bars; how to use them.
423 * Wheeled Mice:: Using mouse wheels for scrolling.
424 * Menu Bars:: Enabling and disabling the menu bar.
425 * Tool Bars:: Enabling and disabling the tool bar.
426 * Dialog Boxes:: Controlling use of dialog boxes.
427 * Faces:: How to change the display style using faces.
428 * Font Lock:: Minor mode for syntactic highlighting using faces.
429 * Highlight Changes:: Using colors to show where you changed the buffer.
430 * Highlight Interactively:: Tell Emacs what text to highlight.
431 * Trailing Whitespace:: Showing possibly-spurious trailing whitespace.
432 * Tooltips:: Showing "tooltips", AKA "ballon help" for active text.
433 * Mouse Avoidance:: Moving the mouse pointer out of the way.
434 * Non-Window Terminals:: Multiple frames on terminals that show only one.
435 * XTerm Mouse:: Using the mouse in an XTerm terminal emulator.
436
437 International Character Set Support
438
439 * International Chars:: Basic concepts of multibyte characters.
440 * Enabling Multibyte:: Controlling whether to use multibyte characters.
441 * Language Environments:: Setting things up for the language you use.
442 * Input Methods:: Entering text characters not on your keyboard.
443 * Select Input Method:: Specifying your choice of input methods.
444 * Coding Systems:: Character set conversion when you read and
445 write files, and so on.
446 * Recognize Coding:: How Emacs figures out which conversion to use.
447 * Specify Coding:: Various ways to choose which conversion to use.
448 * Fontsets:: Fontsets are collections of fonts
449 that cover the whole spectrum of characters.
450 * Defining Fontsets:: Defining a new fontset.
451 * Single-Byte Character Support::
452 You can pick one European character set
453 to use without multibyte characters.
454
455 Major Modes
456
457 * Choosing Modes:: How major modes are specified or chosen.
458
459 Indentation
460
461 * Indentation Commands:: Various commands and techniques for indentation.
462 * Tab Stops:: You can set arbitrary "tab stops" and then
463 indent to the next tab stop when you want to.
464 * Just Spaces:: You can request indentation using just spaces.
465
466 Commands for Human Languages
467
468 * Words:: Moving over and killing words.
469 * Sentences:: Moving over and killing sentences.
470 * Paragraphs:: Moving over paragraphs.
471 * Pages:: Moving over pages.
472 * Filling:: Filling or justifying text.
473 * Case:: Changing the case of text.
474 * Text Mode:: The major modes for editing text files.
475 * Outline Mode:: Editing outlines.
476 * TeX Mode:: Editing input to the formatter TeX.
477 * Nroff Mode:: Editing input to the formatter nroff.
478 * Formatted Text:: Editing formatted text directly in WYSIWYG fashion.
479
480 Filling Text
481
482 * Auto Fill:: Auto Fill mode breaks long lines automatically.
483 * Fill Commands:: Commands to refill paragraphs and center lines.
484 * Fill Prefix:: Filling paragraphs that are indented
485 or in a comment, etc.
486 * Adaptive Fill:: How Emacs can determine the fill prefix automatically.
487
488 Editing Programs
489
490 * Program Modes:: Major modes for editing programs.
491 * Defuns:: Commands to operate on major top-level parts
492 of a program.
493 * Program Indent:: Adjusting indentation to show the nesting.
494 * Comments:: Inserting, killing, and aligning comments.
495 * Parentheses:: Commands that operate on parentheses.
496 * Documentation:: Getting documentation of functions you plan to call.
497 * Hideshow:: Displaying blocks selectively.
498 * Symbol Completion:: Completion on symbol names of your program or language.
499 * Glasses:: Making identifiersLikeThis more readable.
500 * Misc for Programs:: Other Emacs features useful for editing programs.
501 * C Modes:: Special commands of C, C++, Objective-C,
502 Java, and Pike modes.
503 * Fortran:: Fortran mode and its special features.
504 * Asm Mode:: Asm mode and its special features.
505
506 Top-Level Definitions, or Defuns
507
508 * Left Margin Paren:: An open-paren or similar opening delimiter
509 starts a defun if it is at the left margin.
510 * Moving by Defuns:: Commands to move over or mark a major definition.
511 * Imenu:: Making buffer indexes as menus.
512 * Which Function:: Which Function mode shows which function you are in.
513
514 Indentation for Programs
515
516 * Basic Indent:: Indenting a single line.
517 * Multi-line Indent:: Commands to reindent many lines at once.
518 * Lisp Indent:: Specifying how each Lisp function should be indented.
519 * C Indent:: Extra features for indenting C and related modes.
520 * Custom C Indent:: Controlling indentation style for C and related modes.
521
522 Commands for Editing with Parentheses
523
524 * Expressions:: Expressions with balanced parentheses.
525 * Moving by Parens:: Commands for moving up, down and across
526 in the structure of parentheses.
527 * Matching:: Insertion of a close-delimiter flashes matching open.
528
529 Manipulating Comments
530
531 * Comment Commands:: Inserting, killing, and indenting comments.
532 * Multi-Line Comments:: Commands for adding and editing multi-line comments.
533 * Options for Comments::Customizing the comment features.
534
535 Documentation Lookup
536
537 * Info Lookup:: Looking up library functions and commands
538 in Info files.
539 * Man Page:: Looking up man pages of library functions and commands.
540 * Lisp Doc:: Looking up Emacs Lisp functions, etc.
541
542 C and Related Modes
543
544 * Motion in C:: Commands to move by C statements, etc.
545 * Electric C:: Colon and other chars can automatically reindent.
546 * Hungry Delete:: A more powerful DEL command.
547 * Other C Commands:: Filling comments, viewing expansion of macros,
548 and other neat features.
549 * Comments in C:: Options for customizing comment style.
550
551 Fortran Mode
552
553 * Motion: Fortran Motion. Moving point by statements or subprograms.
554 * Indent: Fortran Indent. Indentation commands for Fortran.
555 * Comments: Fortran Comments. Inserting and aligning comments.
556 * Autofill: Fortran Autofill. Auto fill minor mode for Fortran.
557 * Columns: Fortran Columns. Measuring columns for valid Fortran.
558 * Abbrev: Fortran Abbrev. Built-in abbrevs for Fortran keywords.
559
560 Compiling and Testing Programs
561
562 * Compilation:: Compiling programs in languages other
563 than Lisp (C, Pascal, etc.).
564 * Compilation Mode:: The mode for visiting compiler errors.
565 * Compilation Shell:: Customizing your shell properly
566 for use in the compilation buffer.
567 * Debuggers:: Running symbolic debuggers for non-Lisp programs.
568 * Executing Lisp:: Various modes for editing Lisp programs,
569 with different facilities for running
570 the Lisp programs.
571 * Lisp Libraries:: Creating Lisp programs to run in Emacs.
572 * Lisp Interaction:: Executing Lisp in an Emacs buffer.
573 * Lisp Eval:: Executing a single Lisp expression in Emacs.
574 * External Lisp:: Communicating through Emacs with a separate Lisp.
575
576 Running Debuggers Under Emacs
577
578 * Starting GUD:: How to start a debugger subprocess.
579 * Debugger Operation:: Connection between the debugger and source buffers.
580 * Commands of GUD:: Key bindings for common commands.
581 * GUD Customization:: Defining your own commands for GUD.
582
583 Maintaining Programs
584
585 * Change Log:: Maintaining a change history for your program.
586 @ignore
587 * Authors:: Maintaining the Emacs @file{AUTHORS} file.
588 @end ignore
589 * Tags:: Go direct to any function in your program in one
590 command. Tags remembers which file it is in.
591 * Emerge:: A convenient way of merging two versions of a program.
592
593 Tags Tables
594
595 * Tag Syntax:: Tag syntax for various types of code and text files.
596 * Create Tags Table:: Creating a tags table with @code{etags}.
597 * Select Tags Table:: How to visit a tags table.
598 * Find Tag:: Commands to find the definition of a specific tag.
599 * Tags Search:: Using a tags table for searching and replacing.
600 * List Tags:: Listing and finding tags defined in a file.
601
602 Merging Files with Emerge
603
604 * Overview of Emerge:: How to start Emerge. Basic concepts.
605 * Submodes of Emerge:: Fast mode vs. Edit mode.
606 Skip Prefers mode and Auto Advance mode.
607 * State of Difference:: You do the merge by specifying state A or B
608 for each difference.
609 * Merge Commands:: Commands for selecting a difference,
610 changing states of differences, etc.
611 * Exiting Emerge:: What to do when you've finished the merge.
612 * Combining in Emerge:: How to keep both alternatives for a difference.
613 * Fine Points of Emerge:: Misc.
614
615 Abbrevs
616
617 * Abbrev Concepts:: Fundamentals of defined abbrevs.
618 * Defining Abbrevs:: Defining an abbrev, so it will expand when typed.
619 * Expanding Abbrevs:: Controlling expansion: prefixes, canceling expansion.
620 * Editing Abbrevs:: Viewing or editing the entire list of defined abbrevs.
621 * Saving Abbrevs:: Saving the entire list of abbrevs for another session.
622 * Dynamic Abbrevs:: Abbreviations for words already in the buffer.
623
624 Editing Pictures
625
626 * Basic Picture:: Basic concepts and simple commands of Picture Mode.
627 * Insert in Picture:: Controlling direction of cursor motion
628 after "self-inserting" characters.
629 * Tabs in Picture:: Various features for tab stops and indentation.
630 * Rectangles in Picture:: Clearing and superimposing rectangles.
631
632 Sending Mail
633
634 * Mail Format:: Format of the mail being composed.
635 * Mail Headers:: Details of permitted mail header fields.
636 * Mail Aliases:: Abbreviating and grouping mail addresses.
637 * Mail Mode:: Special commands for editing mail being composed.
638 * Mail Amusements:: Distract the NSA's attention; add a fortune to a msg.
639 * Mail Methods:: Using alternative mail-composition methods.
640
641 Reading Mail with Rmail
642
643 * Rmail Basics:: Basic concepts of Rmail, and simple use.
644 * Rmail Scrolling:: Scrolling through a message.
645 * Rmail Motion:: Moving to another message.
646 * Rmail Deletion:: Deleting and expunging messages.
647 * Rmail Inbox:: How mail gets into the Rmail file.
648 * Rmail Files:: Using multiple Rmail files.
649 * Rmail Output:: Copying message out to files.
650 * Rmail Labels:: Classifying messages by labeling them.
651 * Rmail Attributes:: Certain standard labels, called attributes.
652 * Rmail Reply:: Sending replies to messages you are viewing.
653 * Rmail Summary:: Summaries show brief info on many messages.
654 * Rmail Sorting:: Sorting messages in Rmail.
655 * Rmail Display:: How Rmail displays a message; customization.
656 * Rmail Editing:: Editing message text and headers in Rmail.
657 * Rmail Digest:: Extracting the messages from a digest message.
658 * Out of Rmail:: Converting an Rmail file to mailbox format.
659 * Rmail Rot13:: Reading messages encoded in the rot13 code.
660 * Movemail:: More details of fetching new mail.
661
662 Dired, the Directory Editor
663
664 * Dired Enter:: How to invoke Dired.
665 * Dired Navigation:: How to move in the Dired buffer.
666 * Dired Deletion:: Deleting files with Dired.
667 * Flagging Many Files:: Flagging files based on their names.
668 * Dired Visiting:: Other file operations through Dired.
669 * Marks vs Flags:: Flagging for deletion vs marking.
670 * Operating on Files:: How to copy, rename, print, compress, etc.
671 either one file or several files.
672 * Shell Commands in Dired:: Running a shell command on the marked files.
673 * Transforming File Names:: Using patterns to rename multiple files.
674 * Comparison in Dired:: Running `diff' by way of Dired.
675 * Subdirectories in Dired:: Adding subdirectories to the Dired buffer.
676 * Subdirectory Motion:: Moving across subdirectories, and up and down.
677 * Hiding Subdirectories:: Making subdirectories visible or invisible.
678 * Dired Updating:: Discarding lines for files of no interest.
679 * Dired and Find:: Using `find' to choose the files for Dired.
680
681 The Calendar and the Diary
682
683 * Calendar Motion:: Moving through the calendar; selecting a date.
684 * Scroll Calendar:: Bringing earlier or later months onto the screen.
685 * Counting Days:: How many days are there between two dates?
686 * General Calendar:: Exiting or recomputing the calendar.
687 * LaTeX Calendar:: Print a calendar using LaTeX.
688 * Holidays:: Displaying dates of holidays.
689 * Sunrise/Sunset:: Displaying local times of sunrise and sunset.
690 * Lunar Phases:: Displaying phases of the moon.
691 * Other Calendars:: Converting dates to other calendar systems.
692 * Diary:: Displaying events from your diary.
693 * Appointments:: Reminders when it's time to do something.
694 * Daylight Savings:: How to specify when daylight savings time is active.
695
696 Movement in the Calendar
697
698 * Calendar Unit Motion:: Moving by days, weeks, months, and years.
699 * Move to Beginning or End:: Moving to start/end of weeks, months, and years.
700 * Specified Dates:: Moving to the current date or another
701 specific date.
702
703 Conversion To and From Other Calendars
704
705 * Calendar Systems:: The calendars Emacs understands
706 (aside from Gregorian).
707 * To Other Calendar:: Converting the selected date to various calendars.
708 * From Other Calendar:: Moving to a date specified in another calendar.
709 * Mayan Calendar:: Moving to a date specified in a Mayan calendar.
710
711 The Diary
712
713 * Diary Commands:: Viewing diary entries and associated calendar dates.
714 * Format of Diary File:: Entering events in your diary.
715 * Date Formats:: Various ways you can specify dates.
716 * Adding to Diary:: Commands to create diary entries.
717 * Special Diary Entries:: Anniversaries, blocks of dates, cyclic entries, etc.
718
719 @sc{Gnus}
720
721 * Buffers of Gnus:: The group, summary, and article buffers.
722 * Gnus Startup:: What you should know about starting Gnus.
723 * Summary of Gnus:: A short description of the basic Gnus commands.
724
725 Running Shell Commands from Emacs
726
727 * Single Shell:: How to run one shell command and return.
728 * Interactive Shell:: Permanent shell taking input via Emacs.
729 * Shell Mode:: Special Emacs commands used with permanent shell.
730 * Shell History:: Repeating previous commands in a shell buffer.
731 * Shell Options:: Options for customizing Shell mode.
732 * Remote Host:: Connecting to another computer.
733
734 Customization
735
736 * Minor Modes:: Each minor mode is one feature you can turn on
737 independently of any others.
738 * Variables:: Many Emacs commands examine Emacs variables
739 to decide what to do; by setting variables,
740 you can control their functioning.
741 * Keyboard Macros:: A keyboard macro records a sequence of
742 keystrokes to be replayed with a single command.
743 * Key Bindings:: The keymaps say what command each key runs.
744 By changing them, you can "redefine keys".
745 * Keyboard Translations::
746 If your keyboard passes an undesired code
747 for a key, you can tell Emacs to
748 substitute another code.
749 * Syntax:: The syntax table controls how words and
750 expressions are parsed.
751 * Init File:: How to write common customizations in the
752 @file{.emacs} file.
753
754 Variables
755
756 * Examining:: Examining or setting one variable's value.
757 * Easy Customization::
758 Convenient and easy customization of variables.
759 * Hooks:: Hook variables let you specify programs for parts
760 of Emacs to run on particular occasions.
761 * Locals:: Per-buffer values of variables.
762 * File Variables:: How files can specify variable values.
763
764 Keyboard Macros
765
766 * Basic Kbd Macro:: Defining and running keyboard macros.
767 * Save Kbd Macro:: Giving keyboard macros names; saving them in files.
768 * Kbd Macro Query:: Making keyboard macros do different things each time.
769
770 Customizing Key Bindings
771
772 * Keymaps:: Generalities. The global keymap.
773 * Prefix Keymaps:: Keymaps for prefix keys.
774 * Local Keymaps:: Major and minor modes have their own keymaps.
775 * Minibuffer Maps:: The minibuffer uses its own local keymaps.
776 * Rebinding:: How to redefine one key's meaning conveniently.
777 * Init Rebinding:: Rebinding keys with your init file, @file{.emacs}.
778 * Function Keys:: Rebinding terminal function keys.
779 * Named ASCII Chars:: Distinguishing @key{TAB} from @kbd{C-i}, and so on.
780 * Mouse Buttons:: Rebinding mouse buttons in Emacs.
781 * Disabling:: Disabling a command means confirmation is required
782 before it can be executed. This is done to protect
783 beginners from surprises.
784
785 The Init File, @file{~/.emacs}
786
787 * Init Syntax:: Syntax of constants in Emacs Lisp.
788 * Init Examples:: How to do some things with an init file.
789 * Terminal Init:: Each terminal type can have an init file.
790 * Find Init:: How Emacs finds the init file.
791
792 Dealing with Emacs Trouble
793
794 * DEL Does Not Delete:: What to do if @key{DEL} doesn't delete.
795 * Stuck Recursive:: `[...]' in mode line around the parentheses.
796 * Screen Garbled:: Garbage on the screen.
797 * Text Garbled:: Garbage in the text.
798 * Unasked-for Search:: Spontaneous entry to incremental search.
799 * Memory Full:: How to cope when you run out of memory.
800 * Emergency Escape:: Emergency escape---
801 What to do if Emacs stops responding.
802 * Total Frustration:: When you are at your wits' end.
803
804 Reporting Bugs
805
806 * Criteria: Bug Criteria. Have you really found a bug?
807 * Understanding Bug Reporting:: How to report a bug effectively.
808 * Checklist:: Steps to follow for a good bug report.
809 * Sending Patches:: How to send a patch for GNU Emacs.
810
811 Command Line Options and Arguments
812
813 * Action Arguments:: Arguments to visit files, load libraries,
814 and call functions.
815 * Initial Options:: Arguments that take effect while starting Emacs.
816 * Command Example:: Examples of using command line arguments.
817 * Resume Arguments:: Specifying arguments when you resume a running Emacs.
818 * Environment:: Environment variables that Emacs uses.
819 * Display X:: Changing the default display and using remote login.
820 * Font X:: Choosing a font for text, under X.
821 * Colors:: Choosing display colors.
822 * Window Size X:: Start-up window size, under X.
823 * Borders X:: Internal and external borders, under X.
824 * Title X:: Specifying the initial frame's title.
825 * Icons X:: Choosing what sort of icon to use, under X.
826
827 X Resources
828
829 * Resources:: Using X resources with Emacs (in general).
830 * Table of Resources:: Table of specific X resources that affect Emacs.
831 * Face Resources:: X resources for customizing faces.
832 * Lucid Resources:: X resources for Lucid menus.
833 * LessTif Resources:: X resources for LessTif and Motif menus.
834
835 Environment Variables
836
837 * General Variables:: Environment variables that all versions of Emacs use.
838 * Misc Variables:: Certain system specific variables.
839
840 MS-DOS and Windows 95/98/NT
841
842 * MS-DOS Input:: Keyboard and mouse usage on MS-DOS.
843 * MS-DOS Display:: Fonts, frames and display size on MS-DOS.
844 * MS-DOS File Names:: File-name conventions on MS-DOS.
845 * Text and Binary:: Text files on MS-DOS use CRLF to separate lines.
846 * MS-DOS Printing:: How to specify the printer on MS-DOS.
847 * MS-DOS Processes:: Running subprocesses on MS-DOS.
848 * Windows Processes:: Running subprocesses on Windows.
849 * Windows System Menu:: Controlling what the ALT key does.
850 @end menu
851
852 @iftex
853 @unnumbered Preface
854
855 This manual documents the use and simple customization of the Emacs
856 editor. The reader is not expected to be a programmer; simple
857 customizations do not require programming skill. But the user who is not
858 interested in customizing can ignore the scattered customization hints.
859
860 This is primarily a reference manual, but can also be used as a
861 primer. For complete beginners, it is a good idea to start with the
862 on-line, learn-by-doing tutorial, before reading the manual. To run the
863 tutorial, start Emacs and type @kbd{C-h t}. This way you can learn
864 Emacs by using Emacs on a specially designed file which describes
865 commands, tells you when to try them, and then explains the results you
866 see.
867
868 On first reading, just skim chapters 1 and 2, which describe the
869 notational conventions of the manual and the general appearance of the
870 Emacs display screen. Note which questions are answered in these
871 chapters, so you can refer back later. After reading chapter 4, you
872 should practice the commands there. The next few chapters describe
873 fundamental techniques and concepts that are used constantly. You need
874 to understand them thoroughly, experimenting with them if necessary.
875
876 Chapters 14 through 19 describe intermediate-level features that are
877 useful for all kinds of editing. Chapter 20 and following chapters
878 describe features that you may or may not want to use; read those
879 chapters when you need them.
880
881 Read the Trouble chapter if Emacs does not seem to be working
882 properly. It explains how to cope with some common problems
883 (@pxref{Lossage}), as well as when and how to report Emacs bugs
884 (@pxref{Bugs}).
885
886 To find the documentation on a particular command, look in the index.
887 Keys (character commands) and command names have separate indexes. There
888 is also a glossary, with a cross reference for each term.
889
890 This manual is available as a printed book and also as an Info file.
891 The Info file is for on-line perusal with the Info program, which will
892 be the principal way of viewing documentation on-line in the GNU system.
893 Both the Info file and the Info program itself are distributed along
894 with GNU Emacs. The Info file and the printed book contain
895 substantially the same text and are generated from the same source
896 files, which are also distributed along with GNU Emacs.
897
898 GNU Emacs is a member of the Emacs editor family. There are many Emacs
899 editors, all sharing common principles of organization. For information on
900 the underlying philosophy of Emacs and the lessons learned from its
901 development, write for a copy of AI memo 519a, ``Emacs, the Extensible,
902 Customizable Self-Documenting Display Editor,'' to Publications Department,
903 Artificial Intelligence Lab, 545 Tech Square, Cambridge, MA 02139, USA@. At
904 last report they charge $2.25 per copy. Another useful publication is LCS
905 TM-165, ``A Cookbook for an Emacs,'' by Craig Finseth, available from
906 Publications Department, Laboratory for Computer Science, 545 Tech Square,
907 Cambridge, MA 02139, USA@. The price today is $3.
908
909 This edition of the manual is intended for use with GNU Emacs installed
910 on GNU and Unix systems. GNU Emacs can also be used on VMS, MS-DOS
911 (also called MS-DOG), Windows NT, and Windows 95 systems. Those systems use
912 different file name syntax; in addition, VMS and MS-DOS do not support
913 all GNU Emacs features. We don't try to describe VMS usage in this
914 manual. @xref{MS-DOS}, for information about using Emacs on MS-DOS.
915 @end iftex
916
917 @node Distrib, Copying, Top, Top
918 @unnumbered Distribution
919
920 GNU Emacs is @dfn{free software}; this means that everyone is free to
921 use it and free to redistribute it on certain conditions. GNU Emacs is
922 not in the public domain; it is copyrighted and there are restrictions
923 on its distribution, but these restrictions are designed to permit
924 everything that a good cooperating citizen would want to do. What is
925 not allowed is to try to prevent others from further sharing any version
926 of GNU Emacs that they might get from you. The precise conditions are
927 found in the GNU General Public License that comes with Emacs and also
928 appears following this section.
929
930 One way to get a copy of GNU Emacs is from someone else who has it. You
931 need not ask for our permission to do so, or tell any one else; just
932 copy it. If you have access to the Internet, you can get the latest
933 distribution version of GNU Emacs by anonymous FTP; see the file
934 @file{etc/FTP} in the Emacs distribution for more information.
935
936 You may also receive GNU Emacs when you buy a computer. Computer
937 manufacturers are free to distribute copies on the same terms that apply to
938 everyone else. These terms require them to give you the full sources,
939 including whatever changes they may have made, and to permit you to
940 redistribute the GNU Emacs received from them under the usual terms of the
941 General Public License. In other words, the program must be free for you
942 when you get it, not just free for the manufacturer.
943
944 You can also order copies of GNU Emacs from the Free Software Foundation
945 on CD-ROM@. This is a convenient and reliable way to get a copy; it is
946 also a good way to help fund our work. (The Foundation has always
947 received most of its funds in this way.) An order form is included in
948 the file @file{etc/ORDERS} in the Emacs distribution, and on our web
949 site in @url{http://www.gnu.org/order/order.html}. For further
950 information, write to
951
952 @display
953 Free Software Foundation
954 59 Temple Place, Suite 330
955 Boston, MA 02111-1307 USA
956 USA
957 @end display
958
959 The income from distribution fees goes to support the foundation's
960 purpose: the development of new free software, and improvements to our
961 existing programs including GNU Emacs.
962
963 If you find GNU Emacs useful, please @strong{send a donation} to the
964 Free Software Foundation to support our work. Donations to the Free
965 Software Foundation are tax deductible in the US. If you use GNU Emacs
966 at your workplace, please suggest that the company make a donation. If
967 company policy is unsympathetic to the idea of donating to charity, you
968 might instead suggest ordering a CD-ROM from the Foundation
969 occasionally, or subscribing to periodic updates.
970
971 @iftex
972 Contributors to GNU Emacs include Per Abrahamsen, Jay K. Adams, Joe
973 Arceneaux, Boaz Ben-Zvi, Jim Blandy, Terrence Brannon, Frank Bresz,
974 Peter Breton, Kevin Broadey, Vincent Broman, David M. Brown, Bill
975 Carpenter, Hans Chalupsky, Bob Chassell, James Clark, Mike Clarkson,
976 Glynn Clements, Andrew Csillag, Doug Cutting, Michael DeCorte, Gary
977 Delp, Matthieu Devin, Eri Ding, Carsten Dominik, Scott Draves, Viktor
978 Dukhovni, John Eaton, Rolf Ebert, Stephen Eglen, Torbj@"orn Einarsson,
979 Tsugumoto Enami, Hans Henrik Eriksen, Michael Ernst, Ata Etemadi,
980 Frederick Farnback, Fred Fish, Karl Fogel, Gary Foster, Noah Friedman,
981 Keith Gabryelski, Kevin Gallagher, Kevin Gallo, Howard Gayle, Stephen
982 Gildea, David Gillespie, Bob Glickstein, Boris Goldowsky, Michelangelo
983 Grigni, Michael Gschwind, Henry Guillaume, Doug Gwyn, Ken'ichi Handa,
984 Chris Hanson, K. Shane Hartman, John Heidemann, Markus Heritsch, Karl
985 Heuer, Manabu Higashida, Anders Holst, Kurt Hornik, Tom Houlder, Lars
986 Ingebrigtsen, Andrew Innes, Michael K. Johnson, Kyle Jones, Tomoji
987 Kagatani, Brewster Kahle, David Kaufman, Henry Kautz, Howard Kaye,
988 Michael Kifer, Richard King, Larry K. Kolodney, Robert Krawitz,
989 Sebastian Kremer, Geoff Kuenning, David K@aa gedal, Daniel LaLiberte,
990 Aaron Larson, James R. Larus, Frederic Lepied, Lars Lindberg, Eric
991 Ludlam, Neil M. Mager, Ken Manheimer, Bill Mann, Brian Marick, Simon
992 Marshall, Bengt Martensson, Charlie Martin, Thomas May, Roland McGrath,
993 David Megginson, Wayne Mesard, Richard Mlynarik, Keith Moore, Erik
994 Naggum, Thomas Neumann, Mike Newton, Jurgen Nickelsen, Jeff Norden,
995 Andrew Norman, Jeff Peck, Damon Anton Permezel, Tom Perrine, Jens
996 Petersen, Daniel Pfeiffer, Fred Pierresteguy, Christian Plaunt,
997 Francesco A. Potorti, Michael D. Prange, Ashwin Ram, Eric S. Raymond,
998 Paul Reilly, Edward M. Reingold, Rob Riepel, Roland B. Roberts, John
999 Robinson, Danny Roozendaal, William Rosenblatt, Guillermo J. Rozas, Ivar
1000 Rummelhoff, Wolfgang Rupprecht, James B. Salem, Masahiko Sato, William
1001 Schelter, Ralph Schleicher, Gregor Schmid, Michael Schmidt, Ronald
1002 S. Schnell, Philippe Schnoebelen, Stephen Schoef, Randal Schwartz,
1003 Manuel Serrano, Stanislav Shalunov, Mark Shapiro, Richard Sharman, Olin
1004 Shivers, Espen Skoglund, Rick Sladkey, Lynn Slater, Chris Smith, David
1005 Smith, Paul D. Smith, William Sommerfeld, Michael Staats, Sam Steingold,
1006 Ake Stenhoff, Peter Stephenson, Jonathan Stigelman, Steve Strassman,
1007 Jens T. Berger Thielemann, Spencer Thomas, Jim Thompson, Masanobu Umeda,
1008 Neil W. Van Dyke, Ulrik Vieth, Geoffrey Voelker, Johan Vromans, Barry
1009 Warsaw, Morten Welinder, Joseph Brian Wells, Rodney Whitby, Ed
1010 Wilkinson, Mike Williams, Steven A. Wood, Dale R. Worley, Felix
1011 S. T. Wu, Tom Wurgler, Eli Zaretskii, Jamie Zawinski, Ian T. Zimmermann,
1012 Reto Zimmermann, and Neal Ziring.
1013 @end iftex
1014
1015 @node Copying, GNU Free Documentation License, Distrib, Top
1016 @unnumbered GNU GENERAL PUBLIC LICENSE
1017 @center Version 2, June 1991
1018
1019 @display
1020 Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
1021 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1022
1023 Everyone is permitted to copy and distribute verbatim copies
1024 of this license document, but changing it is not allowed.
1025 @end display
1026
1027 @unnumberedsec Preamble
1028
1029 The licenses for most software are designed to take away your
1030 freedom to share and change it. By contrast, the GNU General Public
1031 License is intended to guarantee your freedom to share and change free
1032 software---to make sure the software is free for all its users. This
1033 General Public License applies to most of the Free Software
1034 Foundation's software and to any other program whose authors commit to
1035 using it. (Some other Free Software Foundation software is covered by
1036 the GNU Library General Public License instead.) You can apply it to
1037 your programs, too.
1038
1039 When we speak of free software, we are referring to freedom, not
1040 price. Our General Public Licenses are designed to make sure that you
1041 have the freedom to distribute copies of free software (and charge for
1042 this service if you wish), that you receive source code or can get it
1043 if you want it, that you can change the software or use pieces of it
1044 in new free programs; and that you know you can do these things.
1045
1046 To protect your rights, we need to make restrictions that forbid
1047 anyone to deny you these rights or to ask you to surrender the rights.
1048 These restrictions translate to certain responsibilities for you if you
1049 distribute copies of the software, or if you modify it.
1050
1051 For example, if you distribute copies of such a program, whether
1052 gratis or for a fee, you must give the recipients all the rights that
1053 you have. You must make sure that they, too, receive or can get the
1054 source code. And you must show them these terms so they know their
1055 rights.
1056
1057 We protect your rights with two steps: (1) copyright the software, and
1058 (2) offer you this license which gives you legal permission to copy,
1059 distribute and/or modify the software.
1060
1061 Also, for each author's protection and ours, we want to make certain
1062 that everyone understands that there is no warranty for this free
1063 software. If the software is modified by someone else and passed on, we
1064 want its recipients to know that what they have is not the original, so
1065 that any problems introduced by others will not reflect on the original
1066 authors' reputations.
1067
1068 Finally, any free program is threatened constantly by software
1069 patents. We wish to avoid the danger that redistributors of a free
1070 program will individually obtain patent licenses, in effect making the
1071 program proprietary. To prevent this, we have made it clear that any
1072 patent must be licensed for everyone's free use or not licensed at all.
1073
1074 The precise terms and conditions for copying, distribution and
1075 modification follow.
1076
1077 @iftex
1078 @unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1079 @end iftex
1080 @ifinfo
1081 @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1082 @end ifinfo
1083
1084 @enumerate 0
1085 @item
1086 This License applies to any program or other work which contains
1087 a notice placed by the copyright holder saying it may be distributed
1088 under the terms of this General Public License. The ``Program,'' below,
1089 refers to any such program or work, and a ``work based on the Program''
1090 means either the Program or any derivative work under copyright law:
1091 that is to say, a work containing the Program or a portion of it,
1092 either verbatim or with modifications and/or translated into another
1093 language. (Hereinafter, translation is included without limitation in
1094 the term ``modification.'') Each licensee is addressed as ``you.''
1095
1096 Activities other than copying, distribution and modification are not
1097 covered by this License; they are outside its scope. The act of
1098 running the Program is not restricted, and the output from the Program
1099 is covered only if its contents constitute a work based on the
1100 Program (independent of having been made by running the Program).
1101 Whether that is true depends on what the Program does.
1102
1103 @item
1104 You may copy and distribute verbatim copies of the Program's
1105 source code as you receive it, in any medium, provided that you
1106 conspicuously and appropriately publish on each copy an appropriate
1107 copyright notice and disclaimer of warranty; keep intact all the
1108 notices that refer to this License and to the absence of any warranty;
1109 and give any other recipients of the Program a copy of this License
1110 along with the Program.
1111
1112 You may charge a fee for the physical act of transferring a copy, and
1113 you may at your option offer warranty protection in exchange for a fee.
1114
1115 @item
1116 You may modify your copy or copies of the Program or any portion
1117 of it, thus forming a work based on the Program, and copy and
1118 distribute such modifications or work under the terms of Section 1
1119 above, provided that you also meet all of these conditions:
1120
1121 @enumerate a
1122 @item
1123 You must cause the modified files to carry prominent notices
1124 stating that you changed the files and the date of any change.
1125
1126 @item
1127 You must cause any work that you distribute or publish, that in
1128 whole or in part contains or is derived from the Program or any
1129 part thereof, to be licensed as a whole at no charge to all third
1130 parties under the terms of this License.
1131
1132 @item
1133 If the modified program normally reads commands interactively
1134 when run, you must cause it, when started running for such
1135 interactive use in the most ordinary way, to print or display an
1136 announcement including an appropriate copyright notice and a
1137 notice that there is no warranty (or else, saying that you provide
1138 a warranty) and that users may redistribute the program under
1139 these conditions, and telling the user how to view a copy of this
1140 License. (Exception: if the Program itself is interactive but
1141 does not normally print such an announcement, your work based on
1142 the Program is not required to print an announcement.)
1143 @end enumerate
1144
1145 These requirements apply to the modified work as a whole. If
1146 identifiable sections of that work are not derived from the Program,
1147 and can be reasonably considered independent and separate works in
1148 themselves, then this License, and its terms, do not apply to those
1149 sections when you distribute them as separate works. But when you
1150 distribute the same sections as part of a whole which is a work based
1151 on the Program, the distribution of the whole must be on the terms of
1152 this License, whose permissions for other licensees extend to the
1153 entire whole, and thus to each and every part regardless of who wrote it.
1154
1155 Thus, it is not the intent of this section to claim rights or contest
1156 your rights to work written entirely by you; rather, the intent is to
1157 exercise the right to control the distribution of derivative or
1158 collective works based on the Program.
1159
1160 In addition, mere aggregation of another work not based on the Program
1161 with the Program (or with a work based on the Program) on a volume of
1162 a storage or distribution medium does not bring the other work under
1163 the scope of this License.
1164
1165 @item
1166 You may copy and distribute the Program (or a work based on it,
1167 under Section 2) in object code or executable form under the terms of
1168 Sections 1 and 2 above provided that you also do one of the following:
1169
1170 @enumerate a
1171 @item
1172 Accompany it with the complete corresponding machine-readable
1173 source code, which must be distributed under the terms of Sections
1174 1 and 2 above on a medium customarily used for software interchange; or,
1175
1176 @item
1177 Accompany it with a written offer, valid for at least three
1178 years, to give any third party, for a charge no more than your
1179 cost of physically performing source distribution, a complete
1180 machine-readable copy of the corresponding source code, to be
1181 distributed under the terms of Sections 1 and 2 above on a medium
1182 customarily used for software interchange; or,
1183
1184 @item
1185 Accompany it with the information you received as to the offer
1186 to distribute corresponding source code. (This alternative is
1187 allowed only for noncommercial distribution and only if you
1188 received the program in object code or executable form with such
1189 an offer, in accord with Subsection b above.)
1190 @end enumerate
1191
1192 The source code for a work means the preferred form of the work for
1193 making modifications to it. For an executable work, complete source
1194 code means all the source code for all modules it contains, plus any
1195 associated interface definition files, plus the scripts used to
1196 control compilation and installation of the executable. However, as a
1197 special exception, the source code distributed need not include
1198 anything that is normally distributed (in either source or binary
1199 form) with the major components (compiler, kernel, and so on) of the
1200 operating system on which the executable runs, unless that component
1201 itself accompanies the executable.
1202
1203 If distribution of executable or object code is made by offering
1204 access to copy from a designated place, then offering equivalent
1205 access to copy the source code from the same place counts as
1206 distribution of the source code, even though third parties are not
1207 compelled to copy the source along with the object code.
1208
1209 @item
1210 You may not copy, modify, sublicense, or distribute the Program
1211 except as expressly provided under this License. Any attempt
1212 otherwise to copy, modify, sublicense or distribute the Program is
1213 void, and will automatically terminate your rights under this License.
1214 However, parties who have received copies, or rights, from you under
1215 this License will not have their licenses terminated so long as such
1216 parties remain in full compliance.
1217
1218 @item
1219 You are not required to accept this License, since you have not
1220 signed it. However, nothing else grants you permission to modify or
1221 distribute the Program or its derivative works. These actions are
1222 prohibited by law if you do not accept this License. Therefore, by
1223 modifying or distributing the Program (or any work based on the
1224 Program), you indicate your acceptance of this License to do so, and
1225 all its terms and conditions for copying, distributing or modifying
1226 the Program or works based on it.
1227
1228 @item
1229 Each time you redistribute the Program (or any work based on the
1230 Program), the recipient automatically receives a license from the
1231 original licensor to copy, distribute or modify the Program subject to
1232 these terms and conditions. You may not impose any further
1233 restrictions on the recipients' exercise of the rights granted herein.
1234 You are not responsible for enforcing compliance by third parties to
1235 this License.
1236
1237 @item
1238 If, as a consequence of a court judgment or allegation of patent
1239 infringement or for any other reason (not limited to patent issues),
1240 conditions are imposed on you (whether by court order, agreement or
1241 otherwise) that contradict the conditions of this License, they do not
1242 excuse you from the conditions of this License. If you cannot
1243 distribute so as to satisfy simultaneously your obligations under this
1244 License and any other pertinent obligations, then as a consequence you
1245 may not distribute the Program at all. For example, if a patent
1246 license would not permit royalty-free redistribution of the Program by
1247 all those who receive copies directly or indirectly through you, then
1248 the only way you could satisfy both it and this License would be to
1249 refrain entirely from distribution of the Program.
1250
1251 If any portion of this section is held invalid or unenforceable under
1252 any particular circumstance, the balance of the section is intended to
1253 apply and the section as a whole is intended to apply in other
1254 circumstances.
1255
1256 It is not the purpose of this section to induce you to infringe any
1257 patents or other property right claims or to contest validity of any
1258 such claims; this section has the sole purpose of protecting the
1259 integrity of the free software distribution system, which is
1260 implemented by public license practices. Many people have made
1261 generous contributions to the wide range of software distributed
1262 through that system in reliance on consistent application of that
1263 system; it is up to the author/donor to decide if he or she is willing
1264 to distribute software through any other system and a licensee cannot
1265 impose that choice.
1266
1267 This section is intended to make thoroughly clear what is believed to
1268 be a consequence of the rest of this License.
1269
1270 @item
1271 If the distribution and/or use of the Program is restricted in
1272 certain countries either by patents or by copyrighted interfaces, the
1273 original copyright holder who places the Program under this License
1274 may add an explicit geographical distribution limitation excluding
1275 those countries, so that distribution is permitted only in or among
1276 countries not thus excluded. In such case, this License incorporates
1277 the limitation as if written in the body of this License.
1278
1279 @item
1280 The Free Software Foundation may publish revised and/or new versions
1281 of the General Public License from time to time. Such new versions will
1282 be similar in spirit to the present version, but may differ in detail to
1283 address new problems or concerns.
1284
1285 Each version is given a distinguishing version number. If the Program
1286 specifies a version number of this License which applies to it and ``any
1287 later version,'' you have the option of following the terms and conditions
1288 either of that version or of any later version published by the Free
1289 Software Foundation. If the Program does not specify a version number of
1290 this License, you may choose any version ever published by the Free Software
1291 Foundation.
1292
1293 @item
1294 If you wish to incorporate parts of the Program into other free
1295 programs whose distribution conditions are different, write to the author
1296 to ask for permission. For software which is copyrighted by the Free
1297 Software Foundation, write to the Free Software Foundation; we sometimes
1298 make exceptions for this. Our decision will be guided by the two goals
1299 of preserving the free status of all derivatives of our free software and
1300 of promoting the sharing and reuse of software generally.
1301
1302 @iftex
1303 @heading NO WARRANTY
1304 @end iftex
1305 @ifinfo
1306 @center NO WARRANTY
1307 @end ifinfo
1308
1309 @item
1310 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
1311 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW@. EXCEPT WHEN
1312 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
1313 PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
1314 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1315 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE@. THE ENTIRE RISK AS
1316 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU@. SHOULD THE
1317 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
1318 REPAIR OR CORRECTION.
1319
1320 @item
1321 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
1322 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
1323 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
1324 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
1325 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
1326 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
1327 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
1328 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
1329 POSSIBILITY OF SUCH DAMAGES.
1330 @end enumerate
1331
1332 @iftex
1333 @heading END OF TERMS AND CONDITIONS
1334 @end iftex
1335 @ifinfo
1336 @center END OF TERMS AND CONDITIONS
1337 @end ifinfo
1338
1339 @page
1340 @unnumberedsec How to Apply These Terms to Your New Programs
1341
1342 If you develop a new program, and you want it to be of the greatest
1343 possible use to the public, the best way to achieve this is to make it
1344 free software which everyone can redistribute and change under these terms.
1345
1346 To do so, attach the following notices to the program. It is safest
1347 to attach them to the start of each source file to most effectively
1348 convey the exclusion of warranty; and each file should have at least
1349 the ``copyright'' line and a pointer to where the full notice is found.
1350
1351 @smallexample
1352 @var{one line to give the program's name and an idea of what it does.}
1353 Copyright (C) 19@var{yy} @var{name of author}
1354
1355 This program is free software; you can redistribute it and/or
1356 modify it under the terms of the GNU General Public License
1357 as published by the Free Software Foundation; either version 2
1358 of the License, or (at your option) any later version.
1359
1360 This program is distributed in the hope that it will be useful,
1361 but WITHOUT ANY WARRANTY; without even the implied warranty of
1362 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE@. See the
1363 GNU General Public License for more details.
1364
1365 You should have received a copy of the GNU General Public License along
1366 with this program; if not, write to the Free Software Foundation, Inc.,
1367 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
1368 @end smallexample
1369
1370 Also add information on how to contact you by electronic and paper mail.
1371
1372 If the program is interactive, make it output a short notice like this
1373 when it starts in an interactive mode:
1374
1375 @smallexample
1376 Gnomovision version 69, Copyright (C) 20@var{yy} @var{name of author}
1377 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
1378 type `show w'. This is free software, and you are welcome
1379 to redistribute it under certain conditions; type `show c'
1380 for details.
1381 @end smallexample
1382
1383 The hypothetical commands @samp{show w} and @samp{show c} should show
1384 the appropriate parts of the General Public License. Of course, the
1385 commands you use may be called something other than @samp{show w} and
1386 @samp{show c}; they could even be mouse-clicks or menu items---whatever
1387 suits your program.
1388
1389 You should also get your employer (if you work as a programmer) or your
1390 school, if any, to sign a ``copyright disclaimer'' for the program, if
1391 necessary. Here is a sample; alter the names:
1392
1393 @smallexample
1394 @group
1395 Yoyodyne, Inc., hereby disclaims all copyright
1396 interest in the program `Gnomovision'
1397 (which makes passes at compilers) written
1398 by James Hacker.
1399
1400 @var{signature of Ty Coon}, 1 April 1989
1401 Ty Coon, President of Vice
1402 @end group
1403 @end smallexample
1404
1405 This General Public License does not permit incorporating your program into
1406 proprietary programs. If your program is a subroutine library, you may
1407 consider it more useful to permit linking proprietary applications with the
1408 library. If this is what you want to do, use the GNU Library General
1409 Public License instead of this License.
1410
1411 @include doclicense.texi
1412
1413 @node Intro, Glossary, GNU Free Documentation License, Top
1414 @unnumbered Introduction
1415
1416 You are reading about GNU Emacs, the GNU incarnation of the advanced,
1417 self-documenting, customizable, extensible real-time display editor Emacs.
1418 (The `G' in `GNU' is not silent.)
1419
1420 We say that Emacs is a @dfn{display} editor because normally the text
1421 being edited is visible on the screen and is updated automatically as you
1422 type your commands. @xref{Screen,Display}.
1423
1424 We call it a @dfn{real-time} editor because the display is updated very
1425 frequently, usually after each character or pair of characters you
1426 type. This minimizes the amount of information you must keep in your
1427 head as you edit. @xref{Basic,Real-time,Basic Editing}.
1428
1429 We call Emacs advanced because it provides facilities that go beyond
1430 simple insertion and deletion: controlling subprocesses; automatic
1431 indentation of programs; viewing two or more files at once; editing
1432 formatted text; and dealing in terms of characters, words, lines,
1433 sentences, paragraphs, and pages, as well as expressions and comments in
1434 several different programming languages.
1435
1436 @dfn{Self-documenting} means that at any time you can type a special
1437 character, @kbd{Control-h}, to find out what your options are. You can
1438 also use it to find out what any command does, or to find all the commands
1439 that pertain to a topic. @xref{Help}.
1440
1441 @dfn{Customizable} means that you can change the definitions of Emacs
1442 commands in little ways. For example, if you use a programming language in
1443 which comments start with @samp{<**} and end with @samp{**>}, you can tell
1444 the Emacs comment manipulation commands to use those strings
1445 (@pxref{Comments}). Another sort of customization is rearrangement of the
1446 command set. For example, if you prefer the four basic cursor motion
1447 commands (up, down, left and right) on keys in a diamond pattern on the
1448 keyboard, you can rebind the keys that way. @xref{Customization}.
1449
1450 @dfn{Extensible} means that you can go beyond simple customization and
1451 write entirely new commands, programs in the Lisp language to be run by
1452 Emacs's own Lisp interpreter. Emacs is an ``on-line extensible''
1453 system, which means that it is divided into many functions that call
1454 each other, any of which can be redefined in the middle of an editing
1455 session. Almost any part of Emacs can be replaced without making a
1456 separate copy of all of Emacs. Most of the editing commands of Emacs
1457 are written in Lisp; the few exceptions could have been written
1458 in Lisp but are written in C for efficiency. Although only a programmer
1459 can write an extension, anybody can use it afterward. If you want to
1460 learn Emacs Lisp programming, we recommend the @cite{Introduction to
1461 Emacs Lisp} by Robert J. Chassell, also published by the Free Software
1462 Foundation.
1463
1464 When run under the X Window System, Emacs provides its own menus and
1465 convenient bindings to mouse buttons. But Emacs can provide many of the
1466 benefits of a window system on a text-only terminal. For instance, you
1467 can look at or edit several files at once, move text between files, and
1468 edit files while running shell commands.
1469
1470 @include screen.texi
1471 @include commands.texi
1472 @include entering.texi
1473 @include basic.texi
1474 @include mini.texi
1475 @include m-x.texi
1476 @include help.texi
1477 @include mark.texi
1478 @include killing.texi
1479 @include regs.texi
1480 @include display.texi
1481 @include search.texi
1482 @include fixit.texi
1483 @include files.texi
1484 @include buffers.texi
1485 @include windows.texi
1486 @include frames.texi
1487 @include mule.texi
1488 @include major.texi
1489 @include indent.texi
1490 @include text.texi
1491 @include programs.texi
1492 @include building.texi
1493 @include maintaining.texi
1494 @include abbrevs.texi
1495 @include picture.texi
1496 @include sending.texi
1497 @include rmail.texi
1498 @include dired.texi
1499 @include calendar.texi
1500 @include misc.texi
1501 @include custom.texi
1502 @include trouble.texi
1503 @include cmdargs.texi
1504 @include xresources.texi
1505
1506 @include anti.texi
1507 @include macos.texi
1508 @include msdog.texi
1509 @include gnu.texi
1510 @include glossary.texi
1511 @ifinfo
1512 @include ack.texi
1513 @end ifinfo
1514
1515 @c The Option Index is produced only in the on-line version,
1516 @c because the index entries related to command-line options
1517 @c tend to point to the same pages and all begin with a dash.
1518 @c This, and the need to keep the node links consistent, are
1519 @c the reasons for the funky @iftex/@ifnottex dance below.
1520 @c The Option Index is _not_ before Key Index, because that
1521 @c would require changes in the glossary.texi's @node line.
1522 @c It is not after Concept Index for similar reasons.
1523
1524 @iftex
1525 @node Key Index, Command Index, Glossary, Top
1526 @unnumbered Key (Character) Index
1527 @printindex ky
1528 @end iftex
1529
1530 @ifnottex
1531 @node Key Index, Option Index, Glossary, Top
1532 @unnumbered Key (Character) Index
1533 @printindex ky
1534
1535 @node Option Index, Command Index, Key Index, Top
1536 @unnumbered Command-Line Options Index
1537 @printindex op
1538
1539 @node Command Index, Variable Index, Option Index, Top
1540 @unnumbered Command and Function Index
1541 @printindex fn
1542 @end ifnottex
1543
1544 @iftex
1545 @node Command Index, Variable Index, Key Index, Top
1546 @unnumbered Command and Function Index
1547 @printindex fn
1548 @end iftex
1549
1550 @node Variable Index, Concept Index, Command Index, Top
1551 @unnumbered Variable Index
1552 @printindex vr
1553
1554 @node Concept Index, Acknowledgments, Variable Index, Top
1555 @unnumbered Concept Index
1556 @printindex cp
1557
1558 @summarycontents
1559 @contents
1560 @bye
1561