@database /info/emacs

@Master emacs.texi

@Width 72


This is the AmigaGuideŽ file /info/emacs, produced by Makeinfo-1.55 from 
the input file emacs.texi.

   This file documents the GNU Emacs editor.

   Copyright (C) 1985, 1986, 1988, 1992 Richard M. Stallman.

   Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.

   Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided also
that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
General Public License" are included exactly as in the original, and
provided that the entire resulting derived work is distributed under the
terms of a permission notice identical to this one.

   Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that the sections entitled "The GNU Manifesto",
"Distribution" and "GNU General Public License" may be included in a
translation approved by the author instead of in the original English.


@Node Main "/info/emacs"
@Next "Distrib"

The Emacs Editor
****************

   Emacs is the extensible, customizable, self-documenting real-time
display editor.  This Info file describes how to edit with Emacs and
some of how to customize it, but not how to extend it.


 @{" Distrib " Link "Distrib"}      How to get the latest Emacs distribution.
 @{" License " Link "License"}      The GNU General Public License gives you permission
		to redistribute GNU Emacs on certain terms; and also
		explains that there is no warranty.
 @{" Intro " Link "Intro"}        An introduction to Emacs concepts.
 @{" Glossary " Link "Glossary"}     The glossary.
 @{" Version 19 " Link "Version 19"}   Changes coming in Emacs version 19, to be released.
 @{" Manifesto " Link "Manifesto"}    What's GNU?  Gnu's Not Unix!

Indexes, nodes containing large menus
 @{" Key Index " Link "Key Index"}       An item for each standard Emacs key sequence.
 @{" Command Index " Link "Command Index"}   An item for each command name.
 @{" Variable Index " Link "Variable Index"}  An item for each documented variable.
 @{" Concept Index " Link "Concept Index"}   An item for each concept.

Important General Concepts
 @{" Screen " Link "Screen"}       How to interpret what you see on the screen.
 @{" Characters " Link "Characters"}   Emacs's character sets for file contents and for keyboard.
 @{" Keys " Link "Keys"}         Key sequences: what you type to request one editing action.
 @{" Commands " Link "Commands"}     Commands: named functions run by key sequences to do editing.
 @{" Entering Emacs " Link "Entering Emacs"}     Starting Emacs from the shell.
 @{" Command Switches " Link "Command Switches"}   Hairy startup options.
 @{" Exiting " Link "Exiting"}      Stopping or killing Emacs.
 @{" Basic " Link "Basic"}        The most basic editing commands.
 @{" Undo " Link "Undo"}         Undoing recently made changes in the text.
 @{" Minibuffer " Link "Minibuffer"}   Entering arguments that are prompted for.
 @{" M-x " Link "M-x"}          Invoking commands by their names.
 @{" Help " Link "Help"}         Commands for asking Emacs about its commands.

Important Text-Changing Commands
 @{" Mark " Link "Mark"}         The mark: how to delimit a "region" of text.
 @{" Killing " Link "Killing"}      Killing text.
 @{" Yanking " Link "Yanking"}      Recovering killed text.  Moving text.
 @{" Accumulating Text " Link "Accumulating Text"} 
                Other ways of copying text.
 @{" Rectangles " Link "Rectangles"}   Operating on the text inside a rectangle on the screen.
 @{" Registers " Link "Registers"}    Saving a text string or a location in the buffer.
 @{" Display " Link "Display"}      Controlling what text is displayed.
 @{" Search " Link "Search"}       Finding or replacing occurrences of a string.
 @{" Fixit " Link "Fixit"}        Commands especially useful for fixing typos.

Larger Units of Text
 @{" Files " Link "Files"}        All about handling files.
 @{" Buffers " Link "Buffers"}      Multiple buffers; editing several files at once.
 @{" Windows " Link "Windows"}      Viewing two pieces of text at once.

Advanced Features
 @{" Major Modes " Link "Major Modes"}  Text mode vs. Lisp mode vs. C mode ...
 @{" Indentation " Link "Indentation"}  Editing the white space at the beginnings of lines.
 @{" Text " Link "Text"}         Commands and modes for editing English.
 @{" Programs " Link "Programs"}     Commands and modes for editing programs.
 @{" Compiling-Testing " Link "Compiling-Testing"} 
		Compiling, running and debugging programs.
 @{" Abbrevs " Link "Abbrevs"}      How to define text abbreviations to reduce
                 the number of characters you must type.
 @{" Picture " Link "Picture"}      Editing pictures made up of characters
                 using the quarter-plane screen model.
 @{" Sending Mail " Link "Sending Mail"} Sending mail in Emacs.
 @{" Rmail " Link "Rmail"}        Reading mail in Emacs.
 @{" Recursive Edit " Link "Recursive Edit"} 
                A command can allow you to do editing
                 "within the command".  This is called a
                 `recursive editing level'.
 @{" Narrowing " Link "Narrowing"}    Restricting display and editing to a portion
                 of the buffer.
 @{" Sorting " Link "Sorting"} 	Sorting lines, paragraphs or pages within Emacs.
 @{" Shell " Link "Shell"}        Executing shell commands from Emacs.
 @{" Hardcopy " Link "Hardcopy"} 	Printing buffers or regions.
 @{" Dissociated Press " Link "Dissociated Press"}   Dissociating text for fun.
 @{" Amusements " Link "Amusements"}          Various games and hacks.
 @{" Emulation " Link "Emulation"} 	       Emulating some other editors with Emacs.
 @{" Customization " Link "Customization"}       Modifying the behavior of Emacs.

Recovery from Problems.
 @{" Quitting " Link "Quitting"}     Quitting and aborting.
 @{" Lossage " Link "Lossage"}      What to do if Emacs is hung or malfunctioning.
 @{" Bugs " Link "Bugs"}         How and when to report a bug.

Here are some other nodes which are really inferiors of the ones
already listed, mentioned here so you can get to them in one step:

Subnodes of Screen
 @{" Point " Link "Point"} 	The place in the text where editing commands operate.
 @{" Echo Area " Link "Echo Area"}    Short messages appear at the bottom of the screen.
 @{" Mode Line " Link "Mode Line"} 	Interpreting the mode line.

Subnodes of Basic
 @{" Blank Lines " Link "Blank Lines"}  Commands to make or delete blank lines.
 @{" Continuation Lines " Link "Continuation Lines"}  Lines too wide for the screen.
 @{" Position Info " Link "Position Info"}       What page, line, row, or column is point on?
 @{" Arguments " Link "Arguments"}           Giving numeric arguments to commands.

Subnodes of Minibuffer
 @{" Minibuffer File " Link "Minibuffer File"}     Entering file names with the minibuffer.
 @{" Minibuffer Edit " Link "Minibuffer Edit"}     How to edit in the minibuffer.
 @{" Completion " Link "Completion"}   An abbreviation facility for minibuffer input.
 @{" Repetition " Link "Repetition"}   Re-executing previous commands that used the minibuffer.

Subnodes of Mark
 @{" Setting Mark " Link "Setting Mark"}        Commands to set the mark.
 @{" Using Region " Link "Using Region"}        Summary of ways to operate on contents of the region.
 @{" Marking Objects " Link "Marking Objects"}     Commands to put region around textual units.
 @{" Mark Ring " Link "Mark Ring"}           Previous mark positions saved so you can go back there.

Subnodes of Yanking
 @{" Kill Ring " Link "Kill Ring"}           Where killed text is stored.  Basic yanking.
 @{" Appending Kills " Link "Appending Kills"}     Several kills in a row all yank together.
 @{" Earlier Kills " Link "Earlier Kills"}       Yanking something killed some time ago.

Subnodes of Registers
 @{" RegPos " Link "RegPos"}              Saving positions in registers.
 @{" RegText " Link "RegText"}             Saving text in registers.
 @{" RegRect " Link "RegRect"}             Saving rectangles in registers.

Subnodes of Display
 @{" Scrolling " Link "Scrolling"} 	           Moving text up and down in a window.
 @{" Horizontal Scrolling " Link "Horizontal Scrolling"}    Moving text left and right in a window.
 @{" Selective Display " Link "Selective Display"}       Hiding lines with lots of indentation.
 @{" Display Vars " Link "Display Vars"}            Information on variables for customizing display.

Subnodes of Search
 @{" Incremental Search " Link "Incremental Search"}      Search happens as you type the string.
 @{" Nonincremental Search " Link "Nonincremental Search"}   Specify entire string and then search.
 @{" Word Search " Link "Word Search"}  	   Search for sequence of words.
 @{" Regexp Search " Link "Regexp Search"} 	   Search for match for a regexp.
 @{" Regexps " Link "Regexps"}      	   Syntax of regular expressions.
 @{" Search Case " Link "Search Case"} 		   To ignore case while searching, or not.
 @{" Replace " Link "Replace"}      	   Search, and replace some or all matches.
 @{" Unconditional Replace " Link "Unconditional Replace"}   Everything about replacement except for querying.
 @{" Query Replace " Link "Query Replace"}           How to use querying.
 @{" Other Repeating Search " Link "Other Repeating Search"}  Operating on all matches for some regexp.

Subnodes of Fixit
 @{" Kill Errors " Link "Kill Errors"}  Commands to kill a batch of recently entered text.
 @{" Transpose " Link "Transpose"}    Exchanging two characters, words, lines, lists...
 @{" Fixing Case " Link "Fixing Case"}  Correcting case of last word entered.
 @{" Spelling " Link "Spelling"}     Apply spelling checker to a word, or a whole file.

Subnodes of Files
 @{" File Names " Link "File Names"}   How to type and edit file name arguments.
 @{" Visiting " Link "Visiting"}     Visiting a file prepares Emacs to edit the file.
 @{" Saving " Link "Saving"}       Saving makes your changes permanent.
 @{" Backup " Link "Backup"}       How Emacs saves the old version of your file.
 @{" Interlocking " Link "Interlocking"} How Emacs protects against simultaneous editing
                 of one file by two users.
 @{" Reverting " Link "Reverting"}    Reverting cancels all the changes not saved.
 @{" Auto Save " Link "Auto Save"}    Auto Save periodically protects against loss of data.
 @{" ListDir " Link "ListDir"}      Listing the contents of a file directory.
 @{" Dired " Link "Dired"}        "Editing" a directory to delete, rename, etc.
                 the files in it.
 @{" Misc File Ops " Link "Misc File Ops"}  Other things you can do on files.

Subnodes of Buffers
 @{" Select Buffer " Link "Select Buffer"}    Creating a new buffer or reselecting an old one.
 @{" List Buffers " Link "List Buffers"}     Getting a list of buffers that exist.
 @{" Misc Buffer " Link "Misc Buffer"}      Renaming; changing read-only status.
 @{" Kill Buffer " Link "Kill Buffer"}      Killing buffers you no longer need.
 @{" Several Buffers " Link "Several Buffers"}  How to go through the list of all buffers
                     and operate variously on several of them.

Subnodes of Windows
 @{" Basic Window " Link "Basic Window"}     Introduction to Emacs windows.
 @{" Split Window " Link "Split Window"}     New windows are made by splitting existing windows.
 @{" Other Window " Link "Other Window"}     Moving to another window or doing something to it.
 @{" Pop Up Window " Link "Pop Up Window"}    Finding a file or buffer in another window.
 @{" Change Window " Link "Change Window"}    Deleting windows and changing their sizes.

Subnodes of Indentation
 @{" Indentation Commands " Link "Indentation Commands"}  Various commands and techniques for indentation.
 @{" Tab Stops " Link "Tab Stops"}    You can set arbitrary "tab stops" and then
                 indent to the next tab stop when you want to.
 @{" Just Spaces " Link "Just Spaces"}  You can request indentation using just spaces.

Subnodes of Text
 @{" Text Mode " Link "Text Mode"}    The major mode for editing text files.
 @{" Nroff Mode " Link "Nroff Mode"}   The major mode for editing input to the formatter nroff.
 @{" TeX Mode " Link "TeX Mode"}     The major mode for editing input to the formatter TeX.
 @{" Texinfo Mode " Link "Texinfo Mode"} The major mode for editing input to the formatter Texinfo.
 @{" Outline Mode " Link "Outline Mode"} The major mode for editing outlines.
 @{" Words " Link "Words"}        Moving over and killing words.
 @{" Sentences " Link "Sentences"}    Moving over and killing sentences.
 @{" Paragraphs " Link "Paragraphs"} 	Moving over paragraphs.
 @{" Pages " Link "Pages"} 	Moving over pages.
 @{" Filling " Link "Filling"}      Filling or justifying text
 @{" Case " Link "Case"}         Changing the case of text

Subnodes of Programs
 @{" Program Modes " Link "Program Modes"}        Major modes for editing programs.
 @{" Lists " Link "Lists"}        Expressions with balanced parentheses.
                 There are editing commands to operate on them.
 @{" Defuns " Link "Defuns"}       Each program is made up of separate functions.
                 There are editing commands to operate on them.
 @{" Grinding " Link "Grinding"}     Adjusting indentation to show the nesting.
 @{" Matching " Link "Matching"}     Insertion of a close-delimiter flashes matching open.
 @{" Comments " Link "Comments"}     Inserting, killing and aligning comments.
 @{" Balanced Editing " Link "Balanced Editing"}     Inserting two matching parentheses at once, etc.
 @{" Lisp Completion " Link "Lisp Completion"}      Completion on symbol names in Lisp code.
 @{" Documentation " Link "Documentation"}        Getting documentation of functions you plan to call.
 @{" Change Log " Link "Change Log"}   Maintaining a change history for your program.
 @{" Tags " Link "Tags"}         Go direct to any function in your program in one
                 command.  Tags remembers which file it is in.
 @{" Fortran " Link "Fortran"} 	Fortran mode and its special features.

Subnodes of Compiling/Testing
 @{" Compilation " Link "Compilation"}        Compiling programs in languages other than Lisp
                       (C, Pascal, etc.)
 @{" Lisp Modes " Link "Lisp Modes"}         Various modes for editing Lisp programs, with
                       different facilities for running the Lisp programs.
 @{" Lisp Libraries " Link "Lisp Libraries"}     Creating Lisp programs to run in Emacs.
 @{" Lisp Interaction " Link "Lisp Interaction"}   Executing Lisp in an Emacs buffer.
 @{" Lisp Eval " Link "Lisp Eval"}          Executing a single Lisp expression in Emacs.
 @{" Lisp Debug " Link "Lisp Debug"}         Debugging Lisp programs running in Emacs.
 @{" External Lisp " Link "External Lisp"}      Communicating through Emacs with a separate Lisp.

Subnodes of Abbrevs
 @{" Defining Abbrevs " Link "Defining Abbrevs"}   Defining an abbrev, so it will expand when typed.
 @{" Expanding Abbrevs " Link "Expanding Abbrevs"}  Controlling expansion: prefixes, canceling expansion.
 @{" Editing Abbrevs " Link "Editing Abbrevs"}    Viewing or editing the entire list of defined abbrevs.
 @{" Saving Abbrevs " Link "Saving Abbrevs"}     Saving the entire list of abbrevs for another session.
 @{" Dynamic Abbrevs " Link "Dynamic Abbrevs"}    Abbreviations for words already in the buffer.

Subnodes of Picture
 @{" Basic Picture " Link "Basic Picture"}      Basic concepts and simple commands of Picture mode.
 @{" Insert in Picture " Link "Insert in Picture"}  Controlling direction of cursor motion
                       after "self-inserting" characters.
 @{" Tabs in Picture " Link "Tabs in Picture"}    Various features for tab stops and indentation.
 @{" Rectangles in Picture " Link "Rectangles in Picture"}  Clearing and superimposing rectangles.

Subnodes of Sending Mail
 @{" Mail Format " Link "Mail Format"}        Format of the mail being composed.
 @{" Mail Headers " Link "Mail Headers"}       Details of allowed mail header fields.
 @{" Mail Mode " Link "Mail Mode"}          Special commands for editing mail being composed.

Subnodes of Rmail
 @{" Rmail Scrolling " Link "Rmail Scrolling"}    Scrolling through a message.
 @{" Rmail Motion " Link "Rmail Motion"}       Moving to another message.
 @{" Rmail Deletion " Link "Rmail Deletion"}     Deleting and expunging messages.
 @{" Rmail Inbox " Link "Rmail Inbox"}        How mail gets into the Rmail file.
 @{" Rmail Files " Link "Rmail Files"}        Using multiple Rmail files.
 @{" Rmail Output " Link "Rmail Output"}       Copying message out to files.
 @{" Rmail Labels " Link "Rmail Labels"}       Classifying messages by labeling them.
 @{" Rmail Summary " Link "Rmail Summary"}      Summaries show brief info on many messages.
 @{" Rmail Reply " Link "Rmail Reply"}        Sending replies to messages you are viewing.
 @{" Rmail Editing " Link "Rmail Editing"}      Editing message text and headers in Rmail.
 @{" Rmail Digest " Link "Rmail Digest"}       Extracting the messages from a digest message.

Subnodes of Shell
 @{" Single Shell " Link "Single Shell"}       Commands to run one shell command and return.
 @{" Interactive Shell " Link "Interactive Shell"}  Permanent shell taking input via Emacs.
 @{" Shell Mode " Link "Shell Mode"}         Special Emacs commands used with permanent shell.

Subnodes of Customization
 @{" Minor Modes " Link "Minor Modes"}        Each minor mode is one feature you can turn on
                       independently of any others.
 @{" Variables " Link "Variables"}          Many Emacs commands examine Emacs variables
                       to decide what to do; by setting variables,
                       you can control their functioning.
 @{" Examining " Link "Examining"}          Examining or setting one variable's value.
 @{" Edit Options " Link "Edit Options"}       Examining or editing list of all variables' values.
 @{" Locals " Link "Locals"}             Per-buffer values of variables.
 @{" File Variables " Link "File Variables"}     How files can specify variable values.
 @{" Keyboard Macros " Link "Keyboard Macros"}    A keyboard macro records a sequence of keystrokes
                       to be replayed with a single command.
 @{" Key Bindings " Link "Key Bindings"}       The keymaps say what command each key runs.
                       By changing them, you can "redefine keys".
 @{" Keymaps " Link "Keymaps"}            Definition of the keymap data structure.
 @{" Rebinding " Link "Rebinding"}          How to redefine one key's meaning conveniently.
 @{" Disabling " Link "Disabling"}          Disabling a command means confirmation is required
                       before it can be executed.  This is done to protect
                       beginners from surprises.
 @{" Syntax " Link "Syntax"}             The syntax table controls how words and expressions
                       are parsed.
 @{" Init File " Link "Init File"}          How to write common customizations in the `.emacs' file.

Subnodes of Lossage (and recovery)
 @{" Stuck Recursive " Link "Stuck Recursive"}    `[...]' in mode line around the parentheses.
 @{" Screen Garbled " Link "Screen Garbled"}     Garbage on the screen.
 @{" Text Garbled " Link "Text Garbled"}       Garbage in the text.
 @{" Unasked-for Search " Link "Unasked-for Search"} Spontaneous entry to incremental search.
 @{" Emergency Escape " Link "Emergency Escape"}   Emergency escape--
                       What to do if Emacs stops responding.
 @{" Total Frustration " Link "Total Frustration"}  When you are at your wits' end.


@EndNode

@Node "Distrib" "emacs/Distrib"
@Next "License"
@Prev "Main"
@Toc "Main"

Distribution
************

   GNU Emacs is @{i}free@{ui}; this means that everyone is free to use it and
free to redistribute it on a free basis.  GNU Emacs is not in the public
domain; it is copyrighted and there are restrictions on its
distribution, but these restrictions are designed to permit everything
that a good cooperating citizen would want to do.  What is not allowed
is to try to prevent others from further sharing any version of GNU
Emacs that they might get from you.  The precise conditions are found in
the GNU General Public License that comes with Emacs and also appears
following this section.

   The easiest way to get a copy of GNU Emacs is from someone else who
has it.  You need not ask for permission to do so, or tell any one
else; just copy it.

   If you have access to the Internet, you can get the latest
distribution version of GNU Emacs from host @{b}prep.ai.mit.edu@{ub} using
anonymous login.  See the file @{b}/u2/emacs/GETTING.GNU.SOFTWARE@{ub} on that
host to find out about your options for copying and which files to use.

   You may also receive GNU Emacs when you buy a computer.  Computer
manufacturers are free to distribute copies on the same terms that
apply to everyone else.  These terms require them to give you the full
sources, including whatever changes they may have made, and to permit
you to redistribute the GNU Emacs received from them under the usual
terms of the General Public License.  In other words, the program must
be free for you when you get it, not just free for the manufacturer.

   If you cannot get a copy in any of those ways, you can order one
from the Free Software Foundation.  Though Emacs itself is free, our
distribution service is not.  An order form is included at the end of
manuals printed by the Foundation.  It is also included in the file
@{b}etc/DISTRIB@{ub} in the Emacs distribution.  For further information, write
to

     Free Software Foundation
     675 Mass Ave
     Cambridge, MA 02139
     USA

   The income from distribution fees goes to support the foundation's
purpose: the development of more free software to distribute just like
GNU Emacs.

   If you find GNU Emacs useful, please @{i}send a donation@{ui} to the Free
Software Foundation.  This will help support development of the rest of
the GNU system, and other useful software beyond that.  Your donation
is tax deductible.


@EndNode

@Node "License" "emacs/License"
@Next "Intro"
@Prev "Distrib"
@Toc "Main"

GNU GENERAL PUBLIC LICENSE
**************************

                       Version 1, February 1989

     Copyright (C) 1989 Free Software Foundation, Inc.
     675 Mass Ave, Cambridge, MA 02139, USA
     
     Everyone is permitted to copy and distribute verbatim copies
     of this license document, but changing it is not allowed.

Preamble
========

   The license agreements of most software companies try to keep users
at the mercy of those companies.  By contrast, our General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  The
General Public License applies to the Free Software Foundation's
software and to any other program whose authors commit to using it.
You can use it for your programs, too.

   When we speak of free software, we are referring to freedom, not
price.  Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free
software, that you receive source code or can get it if you want it,
that you can change the software or use pieces of it in new free
programs; and that you know you can do these things.

   To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

   For example, if you distribute copies of a such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must tell them their rights.

   We protect your rights with two steps: (1) copyright the software,
and (2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

   Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

   The precise terms and conditions for copying, distribution and
modification follow.

                         TERMS AND CONDITIONS

  1. This License Agreement applies to any program or other work which
     contains a notice placed by the copyright holder saying it may be
     distributed under the terms of this General Public License.  The
     "Program", below, refers to any such program or work, and a "work
     based on the Program" means either the Program or any work
     containing the Program or a portion of it, either verbatim or with
     modifications.  Each licensee is addressed as "you".

  2. You may copy and distribute verbatim copies of the Program's source
     code as you receive it, in any medium, provided that you
     conspicuously and appropriately publish on each copy an
     appropriate copyright notice and disclaimer of warranty; keep
     intact all the notices that refer to this General Public License
     and to the absence of any warranty; and give any other recipients
     of the Program a copy of this General Public License along with
     the Program.  You may charge a fee for the physical act of
     transferring a copy.

  3. You may modify your copy or copies of the Program or any portion of
     it, and copy and distribute such modifications under the terms of
     Paragraph 1 above, provided that you also do the following:

        @{b}*@{ub} cause the modified files to carry prominent notices stating
          that you changed the files and the date of any change; and

        @{b}*@{ub} cause the whole of any work that you distribute or publish,
          that in whole or in part contains the Program or any part
          thereof, either with or without modifications, to be licensed
          at no charge to all third parties under the terms of this
          General Public License (except that you may choose to grant
          warranty protection to some or all third parties, at your
          option).

        @{b}*@{ub} If the modified program normally reads commands interactively
          when run, you must cause it, when started running for such
          interactive use in the simplest and most usual way, to print
          or display an announcement including an appropriate copyright
          notice and a notice that there is no warranty (or else,
          saying that you provide a warranty) and that users may
          redistribute the program under these conditions, and telling
          the user how to view a copy of this General Public License.

        @{b}*@{ub} You may charge a fee for the physical act of transferring a
          copy, and you may at your option offer warranty protection in
          exchange for a fee.

     Mere aggregation of another independent work with the Program (or
     its derivative) on a volume of a storage or distribution medium
     does not bring the other work under the scope of these terms.

  4. You may copy and distribute the Program (or a portion or
     derivative of it, under Paragraph 2) in object code or executable
     form under the terms of Paragraphs 1 and 2 above provided that you
     also do one of the following:

        @{b}*@{ub} accompany it with the complete corresponding machine-readable
          source code, which must be distributed under the terms of
          Paragraphs 1 and 2 above; or,

        @{b}*@{ub} accompany it with a written offer, valid for at least three
          years, to give any third party free (except for a nominal
          charge for the cost of distribution) a complete
          machine-readable copy of the corresponding source code, to be
          distributed under the terms of Paragraphs 1 and 2 above; or,

        @{b}*@{ub} accompany it with the information you received as to where the
          corresponding source code may be obtained.  (This alternative
          is allowed only for noncommercial distribution and only if you
          received the program in object code or executable form alone.)

     Source code for a work means the preferred form of the work for
     making modifications to it.  For an executable file, complete
     source code means all the source code for all modules it contains;
     but, as a special exception, it need not include source code for
     modules which are standard libraries that accompany the operating
     system on which the executable file runs, or for standard header
     files or definitions files that accompany that operating system.

  5. You may not copy, modify, sublicense, distribute or transfer the
     Program except as expressly provided under this General Public
     License.  Any attempt otherwise to copy, modify, sublicense,
     distribute or transfer the Program is void, and will automatically
     terminate your rights to use the Program under this License.
     However, parties who have received copies, or rights to use
     copies, from you under this General Public License will not have
     their licenses terminated so long as such parties remain in full
     compliance.

  6. By copying, distributing or modifying the Program (or any work
     based on the Program) you indicate your acceptance of this license
     to do so, and all its terms and conditions.

  7. Each time you redistribute the Program (or any work based on the
     Program), the recipient automatically receives a license from the
     original licensor to copy, distribute or modify the Program
     subject to these terms and conditions.  You may not impose any
     further restrictions on the recipients' exercise of the rights
     granted herein.

  8. The Free Software Foundation may publish revised and/or new
     versions of the General Public License from time to time.  Such
     new versions will be similar in spirit to the present version, but
     may differ in detail to address new problems or concerns.

     Each version is given a distinguishing version number.  If the
     Program specifies a version number of the license which applies to
     it and "any later version", you have the option of following the
     terms and conditions either of that version or of any later
     version published by the Free Software Foundation.  If the Program
     does not specify a version number of the license, you may choose
     any version ever published by the Free Software Foundation.

  9. If you wish to incorporate parts of the Program into other free
     programs whose distribution conditions are different, write to the
     author to ask for permission.  For software which is copyrighted
     by the Free Software Foundation, write to the Free Software
     Foundation; we sometimes make exceptions for this.  Our decision
     will be guided by the two goals of preserving the free status of
     all derivatives of our free software and of promoting the sharing
     and reuse of software generally.

                                NO WARRANTY

 10. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
     WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
     LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
     HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
     WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
     NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
     FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE
     QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
     PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
     SERVICING, REPAIR OR CORRECTION.

 11. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
     WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
     MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
     LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
     INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
     INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
     DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
     OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
     OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
     ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

                      END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs
=============================================

   If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.

   To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.

     @{i}one line to give the program's name and a brief idea of what it does.@{ui}
     Copyright (C) 19@{i}yy@{ui}  @{i}name of author@{ui}
     
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 1, or (at your option)
     any later version.
     
     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.
     
     You should have received a copy of the GNU General Public License
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

   Also add information on how to contact you by electronic and paper
mail.

   If the program is interactive, make it output a short notice like
this when it starts in an interactive mode:

     Gnomovision version 69, Copyright (C) 19@{i}yy@{ui} @{i}name of author@{ui}
     Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
     type `show w'.  This is free software, and you are welcome
     to redistribute it under certain conditions; type `show c'
     for details.

   The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License.  Of course, the
commands you use may be called something other than `show w' and `show
c'; they could even be mouse-clicks or menu items--whatever suits your
program.

   You should also get your employer (if you work as a programmer) or
your school, if any, to sign a "copyright disclaimer" for the program,
if necessary.  Here is a sample; alter the names:

     Yoyodyne, Inc., hereby disclaims all copyright
     interest in the program `Gnomovision'
     (a program to direct compilers to make passes
     at assemblers) written by James Hacker.
     
     @{i}signature of Ty Coon@{ui}, 1 April 1989
     Ty Coon, President of Vice

   That's all there is to it!


@EndNode

@Node "Intro" "emacs/Intro"
@Next "Glossary"
@Prev "License"
@Toc "Main"

Introduction
************

   You are reading about GNU Emacs, the GNU incarnation of the advanced,
self-documenting, customizable, extensible real-time display editor
Emacs.  (The `G' in `GNU' is not silent.)

   We say that Emacs is a @{i}display@{ui} editor because normally the text
being edited is visible on the screen and is updated automatically as
you type your commands.  See @{"Display" Link "Screen"}.

   We call it a @{i}real-time@{ui} editor because the display is updated very
frequently, usually after each character or pair of characters you
type.  This minimizes the amount of information you must keep in your
head as you edit.  See @{"Real-time" Link "Basic"}.

   We call Emacs advanced because it provides facilities that go beyond
simple insertion and deletion: filling of text; automatic indentation of
programs; viewing two or more files at once; and dealing in terms of
characters, words, lines, sentences, paragraphs, and pages, as well as
expressions and comments in several different programming languages.
It is much easier to type one command meaning "go to the end of the
paragraph" than to find that spot with simple cursor keys.

   @{i}Self-documenting@{ui} means that at any time you can type a special
character, @{b}Control-h@{ub}, to find out what your options are.  You can also
use it to find out what any command does, or to find all the commands
that pertain to a topic.  See @{"Help" Link "Help"}.

   @{i}Customizable@{ui} means that you can change the definitions of Emacs
commands in little ways.  For example, if you use a programming
language in which comments start with @{b}<**@{ub} and end with @{b}**>@{ub}, you can tell
the Emacs comment manipulation commands to use those strings (see
@{"Comments" Link "Comments"}).  Another sort of customization is rearrangement of the
command set.  For example, if you prefer the four basic cursor motion
commands (up, down, left and right) on keys in a diamond pattern on the
keyboard, you can have it.  See @{"Customization" Link "Customization"}.

   @{i}Extensible@{ui} means that you can go beyond simple customization and
write entirely new commands, programs in the Lisp language to be run by
Emacs's own Lisp interpreter.  Emacs is an "on-line extensible" system,
which means that it is divided into many functions that call each other,
any of which can be redefined in the middle of an editing session.  Any
part of Emacs can be replaced without making a separate copy of all of
Emacs.  Most of the editing commands of Emacs are written in Lisp
already; the few exceptions could have been written in Lisp but are
written in C for efficiency.  Although only a programmer can write an
extension, anybody can use it afterward.


@EndNode

@Node "Screen" "emacs/Screen"
@Next "Characters"
@Prev "Concept Index"
@Toc "Main"

The Organization of the Screen
******************************

   Emacs divides the screen into several areas, each of which contains
its own sorts of information.  The biggest area, of course, is the one
in which you usually see the text you are editing.

   When you are using Emacs, the screen is divided into a number of
@{i}windows@{ui}.  Initially there is one text window occupying all but the last
line, plus the special @{i}echo area@{ui} or @{i}minibuffer window@{ui} in the last line.
The text window can be subdivided horizontally or vertically into
multiple text windows, each of which can be used for a different file
(see @{"Windows" Link "Windows"}).  The window that the cursor is in is the @{i}selected
window@{ui}, in which editing takes place.  The other windows are just
for reference unless you select one of them.

   Each text window's last line is a @{i}mode line@{ui} which describes what is
going on in that window.  It is in inverse video if the terminal
supports that, and contains text that starts like @{b}----Emacs: @{i}something@{ui}@{ub}.
Its purpose is to indicate what buffer is being displayed above it in
the window; what major and minor modes are in use; and whether the
buffer's text has been changed.


 @{" Point " Link "Point"} 	The place in the text where editing commands operate.
 @{" Echo Area " Link "Echo Area"}    Short messages appear at the bottom of the screen.
 @{" Mode Line " Link "Mode Line"} 	Interpreting the mode line.


@EndNode

@Node "Point" "emacs/Point"
@Next "Echo Area"
@Prev "Screen"
@Toc "Screen"

Point
=====

   When Emacs is running, the terminal's cursor shows the location at
which editing commands will take effect.  This location is called
@{i}point@{ui}.  Other commands move point through the text, so that you can
edit at different places in it.

   While the cursor appears to point @{i}at@{ui} a character, point should be
thought of as @{i}between@{ui} two characters; it points @{i}before@{ui} the character
that the cursor appears on top of.  Sometimes people speak of "the
cursor" when they mean "point", or speak of commands that move point as
"cursor motion" commands.

   Terminals have only one cursor, and when output is in progress it
must appear where the typing is being done.  This does not mean that
point is moving.  It is only that Emacs has no way to show you the
location of point except when the terminal is idle.

   If you are editing several files in Emacs, each file has its own
point location.  A file that is not being displayed remembers where
point is so that it can be seen when you look at that file again.

   When there are multiple text windows, each window has its own point
location.  The cursor shows the location of point in the selected
window.  This also is how you can tell which window is selected.  If
the same buffer appears in more than one window, point can be moved in
each window independently.

   The term `point' comes from the character @{b}.@{ub}, which was the command
in TECO (the language in which the original Emacs was written) for
accessing the value now called `point'.


@EndNode

@Node "Echo Area" "emacs/Echo Area"
@Next "Mode Line"
@Prev "Point"
@Toc "Screen"

The Echo Area
=============

   The line at the bottom of the screen (below the mode line) is the
@{i}echo area@{ui}.  It is used to display small amounts of text for several
purposes.

   @{i}Echoing@{ui} means printing out the characters that you type.  Emacs
never echoes single-character commands, and multi-character commands are
echoed only if you pause while typing them.  As soon as you pause for
more than a second in the middle of a command, all the characters of
the command so far are echoed.  This is intended to @{i}prompt@{ui} you for the
rest of the command.  Once echoing has started, the rest of the command
is echoed immediately when you type it.  This behavior is designed to
give confident users fast response, while giving hesitant users maximum
feedback.  You can change this behavior by setting a variable (see
@{"Display Vars" Link "Display Vars"}).

   If a command cannot be executed, it may print an @{i}error message@{ui} in
the echo area.  Error messages are accompanied by a beep or by flashing
the screen.  Also, any input you have typed ahead is thrown away when
an error happens.

   Some commands print informative messages in the echo area.  These
messages look much like error messages, but they are not announced with
a beep and do not throw away input.  Sometimes the message tells you
what the command has done, when this is not obvious from looking at the
text being edited.  Sometimes the sole purpose of a command is to print
a message giving you specific information.  For example, the command
@{b}C-x =@{ub} is used to print a message describing the character position of
point in the text and its current column in the window.  Commands that
take a long time often display messages ending in @{b}...@{ub} while they are
working, and add @{b}done@{ub} at the end when they are finished.

   The echo area is also used to display the @{i}minibuffer@{ui}, a window that
is used for reading arguments to commands, such as the name of a file
to be edited.  When the minibuffer is in use, the echo area begins with
a prompt string that usually ends with a colon; also, the cursor
appears in that line because it is the selected window.  You can always
get out of the minibuffer by typing @{b}C-g@{ub}.  See @{"Minibuffer" Link "Minibuffer"}.


@EndNode

@Node "Mode Line" "emacs/Mode Line"
@Prev "Echo Area"
@Toc "Screen"

The Mode Line
=============

   Each text window's last line is a @{i}mode line@{ui} which describes what is
going on in that window.  When there is only one text window, the mode
line appears right above the echo area.  The mode line is in inverse
video if the terminal supports that, starts and ends with dashes, and
contains text like @{b}Emacs: @{i}something@{ui}@{ub}.

   If a mode line has something else in place of @{b}Emacs: @{i}something@{ui}@{ub}, then
the window above it is in a special subsystem such as Dired.  The mode
line then indicates the status of the subsystem.

   Normally, the mode line has the following appearance:

     --@{i}ch@{ui}-Emacs: @{i}buf@{ui}      (@{i}major@{ui} @{i}minor@{ui})----@{i}pos@{ui}------

This gives information about the buffer being displayed in the window:
the buffer's name, what major and minor modes are in use, whether the
buffer's text has been changed, and how far down the buffer you are
currently looking.

   @{i}ch@{ui} contains two stars @{b}**@{ub} if the text in the buffer has been edited
(the buffer is "modified"), or @{b}-@{ub} if the buffer has not been edited.
Exception: for a read-only buffer, it is @{b}%%@{ub}.

   @{i}buf@{ui} is the name of the window's chosen @{i}buffer@{ui}.  The chosen buffer in
the selected window (the window that the cursor is in) is also Emacs's
selected buffer, the one that editing takes place in.  When we speak of
what some command does to "the buffer", we are talking about the
currently selected buffer.  See @{"Buffers" Link "Buffers"}.

   @{i}pos@{ui} tells you whether there is additional text above the top of the
screen, or below the bottom.  If your file is small and it is all on the
screen, @{i}pos@{ui} is @{b}All@{ub}.  Otherwise, it is @{b}Top@{ub} if you are looking at the
beginning of the file, @{b}Bot@{ub} if you are looking at the end of the file,
or @{b}@{i}nn@{ui}%@{ub}, where @{i}nn@{ui} is the percentage of the file above the top of the
screen.

   @{i}major@{ui} is the name of the @{i}major mode@{ui} in effect in the buffer.  At any
time, each buffer is in one and only one of the possible major modes.
The major modes available include Fundamental mode (the least
specialized), Text mode, Lisp mode, and C mode.  See @{"Major Modes" Link "Major Modes"}, for
details of how the modes differ and how to select one.

   @{i}minor@{ui} is a list of some of the @{i}minor modes@{ui} that are turned on at the
moment in the window's chosen buffer.  @{b}Fill@{ub} means that Auto Fill mode
is on.  @{b}Abbrev@{ub} means that Word Abbrev mode is on.  @{b}Ovwrt@{ub} means that
Overwrite mode is on.  See @{"Minor Modes" Link "Minor Modes"}, for more information.  @{b}Narrow@{ub}
means that the buffer being displayed has editing restricted to only a
portion of its text.  This is not really a minor mode, but is like one.
See @{"Narrowing" Link "Narrowing"}.  @{b}Def@{ub} means that a keyboard macro is being defined.  See
@{"Keyboard Macros" Link "Keyboard Macros"}.

   Some buffers display additional information after the minor modes.
For example, Rmail buffers display the current message number and the
total number of messages.  Compilation buffers and Shell mode display
the status of the subprocess.

   In addition, if Emacs is currently inside a recursive editing level,
square brackets (@{b} [...]@{ub}) appear around the parentheses that surround
the modes.  If Emacs is in one recursive editing level within another,
double square brackets appear, and so on.  Since this information
pertains to Emacs in general and not to any one buffer, the square
brackets appear in every mode line on the screen or not in any of them.
See @{"Recursive Edit" Link "Recursive Edit"}.

   Emacs can optionally display the time and system load in all mode
lines.  To enable this feature, type @{b}M-x display-time@{ub}.  The information
added to the mode line usually appears after the file name, before the
mode names and their parentheses.  It looks like this:

     @{i}hh@{ui}:@{i}mm@{ui}pm @{i}l.ll@{ui} [@{i}d@{ui}]

(Some fields may be missing if your operating system cannot support
them.) @{i}hh@{ui} and @{i}mm@{ui} are the hour and minute, followed always by @{b}am@{ub} or @{b}pm@{ub}.
@{i}l.ll@{ui} is the average number of running processes in the whole system
recently.  @{i}d@{ui} is an approximate index of the ratio of disk activity to
cpu activity for all users.

   The word @{b}Mail@{ub} appears after the load level if there is mail for you
that you have not read yet.

   Customization note: the user variable @{b}mode-line-inverse-video@{ub}
controls whether the mode line is displayed in inverse video (assuming
the terminal supports it); @{b}nil@{ub} means no inverse video.  The default is
@{b}t@{ub}.


@EndNode

@Node "Characters" "emacs/Characters"
@Next "Keys"
@Prev "Screen"
@Toc "Main"

The Emacs Character Set
=======================

   GNU Emacs uses the ASCII character set, which defines 128 different
character codes.  Some of these codes are assigned graphic symbols such
as @{b}a@{ub} and @{b}=@{ub}; the rest are control characters, such as @{b}Control-a@{ub} (also
called @{b}C-a@{ub} for short).  @{b}C-a@{ub} gets its name from the fact that you type
it by holding down the CTRL key and then pressing @{b}a@{ub}.  There is no
distinction between @{b}C-a@{ub} and @{b}C-A@{ub}; they are the same character.

   Some control characters have special names, and special keys you can
type them with: RET, TAB, LFD, DEL and ESC.  The space character is
usually referred to below as SPC, even though strictly speaking it is a
graphic character whose graphic happens to be blank.

   Emacs extends the 7-bit ASCII code to an 8-bit code by adding an
extra bit to each character.  This makes 256 possible command
characters.  The additional bit is called Meta.  Any ASCII character
can be made Meta; examples of Meta characters include @{b}Meta-a@{ub} (@{b}M-a@{ub}, for
short), @{b}M-A@{ub} (not the same character as @{b}M-a@{ub}, but those two characters
normally have the same meaning in Emacs), @{b}M-RET@{ub}, and @{b}M-C-a@{ub}.  For
traditional reasons, @{b}M-C-a@{ub} is usually called @{b}C-M-a@{ub}; logically speaking,
the order in which the modifier keys CTRL and META are mentioned does
not matter.

   Some terminals have a META key, and allow you to type Meta
characters by holding this key down.  Thus, @{b}Meta-a@{ub} is typed by holding
down META and pressing @{b}a@{ub}.  The META key works much like the SHIFT key.
Such a key is not always labeled META, however, as this function is
often a special option for a key with some other primary purpose.

   If there is no META key, you can still type Meta characters using
two-character sequences starting with ESC.  Thus, to enter @{b}M-a@{ub}, you
could type @{b}ESC a@{ub}.  To enter @{b}C-M-a@{ub}, you would type @{b}ESC C-a@{ub}.  ESC is
allowed on terminals with Meta keys, too, in case you have formed a
habit of using it.

   Emacs believes the terminal has a META key if the variable @{b}meta-flag@{ub}
is non-@{b}nil@{ub}.  Normally this is set automatically according to the
termcap entry for your terminal type.  However, sometimes the termcap
entry is wrong, and then it is useful to set this variable yourself.
See @{"Variables" Link "Variables"}, for how to do this.

   Emacs buffers also use an 8-bit character set, because bytes have 8
bits, but only the ASCII characters are considered meaningful.  ASCII
graphic characters in Emacs buffers are displayed with their graphics.
LFD is the same as a newline character; it is displayed by starting a
new line.  TAB is displayed by moving to the next tab stop column
(usually every 8 columns).  Other control characters are displayed as a
caret (@{b}^@{ub}) followed by the non-control version of the character; thus,
@{b}C-a@{ub} is displayed as @{b}^A@{ub}.  Non-ASCII characters 128 and up are displayed
with octal escape sequences; thus, character code 243 (octal), also
called @{b}M-#@{ub} when used as an input character, is displayed as @{b}\243@{ub}.


@EndNode

@Node "Keys" "emacs/Keys"
@Next "Commands"
@Prev "Characters"
@Toc "Main"

Keys
====

   A @{i}complete key@{ui}--where `key' is short for @{i}key sequence@{ui}--is a sequence
of keystrokes that are understood by Emacs as a unit, as a single
command (possibly undefined).  Most single characters constitute
complete keys in the standard Emacs command set; there are also some
multi-character keys.  Examples of complete keys are @{b}C-a@{ub}, @{b}X@{ub}, RET, @{b}C-x
C-f@{ub} and @{b}C-x 4 C-f@{ub}.

   A @{i}prefix key@{ui} is a sequence of keystrokes that are the beginning of a
complete key, but not a whole one.  Prefix keys and complete keys are
collectively called @{i}keys@{ui}.

   A prefix key is the beginning of a series of longer sequences that
are valid keys; adding any single character to the end of the prefix
gives a valid key, which could be defined as an Emacs command, or could
be a prefix itself.  For example, @{b}C-x@{ub} is standardly defined as a
prefix, so @{b}C-x@{ub} and the next input character combine to make a
two-character key.  There are 256 different two-character keys starting
with @{b}C-x@{ub}, one for each possible second character.  Many of these
two-character keys starting with @{b}C-x@{ub} are standardly defined as Emacs
commands.  Notable examples include @{b}C-x C-f@{ub} and @{b}C-x s@{ub} (see @{"Files" Link "Files"}).

   Adding one character to a prefix key does not have to form a complete
key.  It could make another, longer prefix.  For example, @{b}C-x 4@{ub} is
itself a prefix that leads to 256 different three-character keys,
including @{b}C-x 4 f@{ub}, @{b}C-x 4 b@{ub} and so on.  It would be possible to define
one of those three-character sequences as a prefix, creating a series of
four-character keys, but we did not define any of them this way.

   By contrast, the two-character sequence @{b}C-f C-k@{ub} is not a key,
because the @{b}C-f@{ub} is a complete key in itself.  It's impossible to give
@{b}C-f C-k@{ub} an independent meaning as a command as long as @{b}C-f@{ub} retains its
meaning.  @{b}C-f C-k@{ub} is two commands.

   All told, the prefix keys in Emacs are @{b}C-c@{ub}, @{b}C-x@{ub}, @{b}C-h@{ub}, @{b}C-x 4@{ub}, and
ESC.  But this is not built in; it is just a matter of Emacs's standard
key bindings.  In customizing Emacs, you could make new prefix keys, or
eliminate these.  See @{"Key Bindings" Link "Key Bindings"}.

   Whether a sequence is a key can be changed by customization.  For
example, if you redefine @{b}C-f@{ub} as a prefix, @{b}C-f C-k@{ub} automatically becomes
a key (complete, unless you define it too as a prefix).  Conversely, if
you remove the prefix definition of @{b}C-x 4@{ub}, then @{b}C-x 4 f@{ub} (or @{b}C-x 4
@{i}anything@{ui}@{ub}) is no longer a key.


@EndNode

@Node "Commands" "emacs/Commands"
@Next "Entering Emacs"
@Prev "Keys"
@Toc "Main"

Keys and Commands
=================

   This manual is full of passages that tell you what particular keys
do.  But Emacs does not assign meanings to keys directly.  Instead,
Emacs assigns meanings to @{i}functions@{ui}, and then gives keys their meanings
by @{i}binding@{ui} them to functions.

   A function is a Lisp object that can be executed as a program.
Usually it is a Lisp symbol which has been given a function definition;
every symbol has a name, usually made of a few English words separated
by dashes, such as @{b}next-line@{ub} or @{b}forward-word@{ub}.  It also has a @{i}definition@{ui}
which is a Lisp program; this is what makes the function do what it
does.  Only some functions can be the bindings of keys; these are
functions whose definitions use @{b}interactive@{ub} to specify how to call them
interactively.  Such functions are called @{i}commands@{ui}, and their names are
@{i}command names@{ui}.  See @{"Defining Commands" Link "elisp/Defining Commands"}, for more information.

   The bindings between keys and functions are recorded in various
tables called @{i}keymaps@{ui}.  See @{"Keymaps" Link "Keymaps"}.

   When we say that "@{b}C-n@{ub} moves down vertically one line" we are
glossing over a distinction that is irrelevant in ordinary use but is
vital in understanding how to customize Emacs.  It is the function
@{b}next-line@{ub} that is programmed to move down vertically.  @{b}C-n@{ub} has this
effect @{i}because@{ui} it is bound to that function.  If you rebind @{b}C-n@{ub} to the
function @{b}forward-word@{ub} then @{b}C-n@{ub} will move forward by words instead.
Rebinding keys is a common method of customization.

   In the rest of this manual, we usually ignore this subtlety to keep
things simple.  To give the customizer the information he needs, we
state the name of the command which really does the work in parentheses
after mentioning the key that runs it.  For example, we will say that
"The command @{b}C-n@{ub} (@{b}next-line@{ub}) moves point vertically down," meaning that
@{b}next-line@{ub} is a command that moves vertically down and @{b}C-n@{ub} is a key that
is standardly bound to it.

   While we are on the subject of information for customization only,
it's a good time to tell you about @{i}variables@{ui}.  Often the description of
a command will say, "To change this, set the variable @{b}mumble-foo@{ub}." A
variable is a name used to remember a value.  Most of the variables
documented in this manual exist just to facilitate customization: some
command or other part of Emacs examines the variable and behaves
differently accordingly.  Until you are interested in customizing, you
can ignore the information about variables.  When you are ready to be
interested, read the basic information on variables, and then the
information on individual variables will make sense.  See @{"Variables" Link "Variables"}.


@EndNode

@Node "Entering Emacs" "emacs/Entering Emacs"
@Next "Exiting"
@Prev "Commands"
@Toc "Main"

Entering and Exiting Emacs
**************************

   The usual way to invoke Emacs is just to type @{b}emacs RET@{ub} at the
shell.  Emacs clears the screen and then displays an initial advisor
message and copyright notice.  You can begin typing Emacs commands
immediately afterward.

   Some operating systems insist on discarding all type-ahead when Emacs
starts up; they give Emacs no way to prevent this.  Therefore, it is
wise to wait until Emacs clears the screen before typing your first
editing command.

   Before Emacs reads the first command, you have not had a chance to
give a command to specify a file to edit.  But Emacs must always have a
current buffer for editing.  In an attempt to do something useful,
Emacs presents a buffer named @{b}*scratch*@{ub} which is in Lisp Interaction
mode; you can use it to type Lisp expressions and evaluate them, or you
can ignore that capability and simply doodle.  (You can specify a
different major mode for this buffer by setting the variable
@{b}initial-major-mode@{ub} in your init file.  See @{"Init File" Link "Init File"}.)

   It is also possible to specify files to be visited, Lisp files to be
loaded, and functions to be called, by giving Emacs arguments in the
shell command line.  See @{"Command Switches" Link "Command Switches"}.


@EndNode

@Node "Exiting" "emacs/Exiting"
@Next "Command Switches"
@Prev "Entering Emacs"
@Toc "Main"

Exiting Emacs
=============

   There are two commands for exiting Emacs because there are two kinds
of exiting: @{i}suspending@{ui} Emacs and @{i}killing@{ui} Emacs.  @{i}Suspending@{ui} means
stopping Emacs temporarily and returning control to its superior
(usually the shell), allowing you to resume editing later in the same
Emacs job, with the same files, same kill ring, same undo history, and
so on.  This is the usual way to exit.  @{i}Killing@{ui} Emacs means destroying
the Emacs job.  You can run Emacs again later, but you will get a fresh
Emacs; there is no way to resume the same editing session after it has
been killed.

@{b}C-z@{ub}
     Suspend Emacs (@{b}suspend-emacs@{ub}).

@{b}C-x C-c@{ub}
     Kill Emacs (@{b}save-buffers-kill-emacs@{ub}).

   To suspend Emacs, type @{b}C-z@{ub} (@{b}suspend-emacs@{ub}).  This takes you back to
the shell from which you invoked Emacs.  You can resume Emacs with the
command @{b}%emacs@{ub} if you are using the C shell or the Bourne-Again shell.

   On systems that do not permit programs to be suspended, @{b}C-z@{ub} runs an
inferior shell that communicates directly with the terminal, and Emacs
waits until you exit the subshell.  The only way on these systems to get
back to the shell from which Emacs was run (to log out, for example) is
to kill Emacs.  @{b}C-d@{ub} or @{b}exit@{ub} are typical commands to exit a subshell.

   To kill Emacs, type @{b}C-x C-c@{ub} (@{b}save-buffers-kill-emacs@{ub}).  A
two-character key is used for this to make it harder to type.  Unless a
numeric argument is used, this command first offers to save any modified
buffers.  If you do not save them all, it asks for reconfirmation with
@{b}yes@{ub} before killing Emacs, since any changes not saved before that will
be lost forever.  Also, if any subprocesses are still running, @{b}C-x C-c@{ub}
asks for confirmation about them, since killing Emacs will kill the
subprocesses immediately.

   In most programs running on Unix, certain characters may instantly
suspend or kill the program.  (In Berkeley Unix these characters are
normally @{b}C-z@{ub} and @{b}C-c@{ub}.)  @{i}This Unix feature is turned off while you are
in Emacs.@{ui}  The meanings of @{b}C-z@{ub} and @{b}C-x C-c@{ub} as keys in Emacs were
inspired by the standard Berkeley Unix meanings of @{b}C-z@{ub} and @{b}C-c@{ub}, but
that is their only relationship with Unix.  You could customize these
keys to do anything (see @{"Keymaps" Link "Keymaps"}).


@EndNode

@Node "Command Switches" "emacs/Command Switches"
@Next "Basic"
@Prev "Exiting"
@Toc "Main"

Command Line Switches and Arguments
===================================

   GNU Emacs supports command line arguments to request various actions
when invoking Emacs.  These are for compatibility with other editors and
for sophisticated activities.  They are not needed for ordinary editing
with Emacs, so new users can skip this section.

   You may be used to using command line arguments with other editors
to specify which file to edit.  That's because many other editors are
designed to be started afresh each time you want to edit.  You edit one
file and then exit the editor.  The next time you want to edit either
another file or the same one, you must run the editor again.  With
these editors, it makes sense to use a command line argument to say
which file to edit.

   The recommended way to use GNU Emacs is to start it only once, just
after you log in, and do all your editing in the same Emacs process.
Each time you want to edit a different file, you visit it with the
existing Emacs, which eventually comes to have many files in it ready
for editing.  Usually you do not kill the Emacs until you are about to
log out.

   In the usual style of Emacs use, files are nearly always read by
typing commands to an editor that is already running.  So command line
arguments for specifying a file when the editor is started are seldom
used.

   Emacs accepts command-line arguments that specify files to visit,
functions to call, and other activities and operating modes.

   The command arguments are processed in the order they appear in the
command argument list; however, certain arguments (the ones in the
second table) must be at the front of the list if they are used.

   Here are the arguments allowed:

@{b}@{i}file@{ui}@{ub}
     Visit @{i}file@{ui} using @{b}find-file@{ub}.  See @{"Visiting" Link "Visiting"}.

@{b} +@{i}linenum@{ui} @{i}file@{ui}@{ub}
     Visit @{i}file@{ui} using @{b}find-file@{ub}, then go to line number @{i}linenum@{ui} in it.

@{b}-l @{i}file@{ui}@{ub}
@{b}-load @{i}file@{ui}@{ub}
     Load a file @{i}file@{ui} of Lisp code with the function @{b}load@{ub}.  See
     @{"Lisp Libraries" Link "Lisp Libraries"}.

@{b}-f @{i}function@{ui}@{ub}
@{b}-funcall @{i}function@{ui}@{ub}
     Call Lisp function @{i}function@{ui} with no arguments.

@{b}-i @{i}file@{ui}@{ub}
@{b}-insert @{i}file@{ui}@{ub}
     Insert the contents of @{i}file@{ui} into the current buffer.  This is like
     what @{b}M-x insert-buffer@{ub} does; see @{"Misc File Ops" Link "Misc File Ops"}.

@{b}-kill@{ub}
     Exit from Emacs without asking for confirmation.

   The following switches are recognized only at the beginning of the
command line.  If more than one of them appears, they must appear in the
order that they appear in this table.

@{b}-t @{i}device@{ui}@{ub}
     Use @{i}device@{ui} as the device for terminal input and output.

@{b}-d @{i}display@{ui}@{ub}
     When running with the X window system, use the display named
     @{i}display@{ui} to make Emacs's X window.

@{b}-nw@{ub}
     Don't use a window system; display text only, using an ordinary
     terminal device.  Thus, if you run an X-capable Emacs in an Xterm
     with @{b}emacs -nw@{ub}, it displays in the Xterm's own window instead of
     making its own.

@{b}-batch@{ub}
     Run Emacs in @{i}batch mode@{ui}, which means that the text being edited is
     not displayed and the standard Unix interrupt characters such as
     @{b}C-z@{ub} and @{b}C-c@{ub} continue to have their normal effect.  Emacs in batch
     mode outputs to @{b}stdout@{ub} only what would normally be printed in the
     echo area under program control.

     Batch mode is used for running programs written in Emacs Lisp from
     shell scripts, makefiles, and so on.  Normally the @{b}-l@{ub} switch or @{b}-f@{ub}
     switch will be used as well, to invoke a Lisp program to do the
     batch processing.

     @{b}-batch@{ub} implies @{b}-q@{ub} (do not load an init file).  It also causes
     Emacs to exit after all command switches have been processed.  In
     addition, auto-saving is not done except in buffers for which it
     has been explicitly requested.

@{b}-q@{ub}
@{b}-no-init-file@{ub}
     Do not load your Emacs init file @{b}~/.emacs@{ub}.

@{b}-u @{i}user@{ui}@{ub}
@{b}-user @{i}user@{ui}@{ub}
     Load @{i}user@{ui}'s Emacs init file @{b} ~@{i}user@{ui}/.emacs@{ub} instead of your own.

   With X Windows, you can use these additional options to specify how
to display the window.  Each option has a corresponding resource name
(used with @{b}emacs@{ub} unless you specify another name with @{b}-rn @{i}name@{ui}@{ub}), listed
with the option, which lets you specify the same parameter using the
usual X Windows defaulting mechanism.  The corresponding generic
resource name (used with @{b}Emacs@{ub}) is usually made by capitalizing the
first letter of the individual resource name, but in some cases it is a
completely different string (which is listed below).

@{b}-rn @{i}name@{ui}@{ub}
     Use @{i}name@{ui} instead of @{b}emacs@{ub} when looking for X resources.

@{b}-font @{i}fontname@{ui}@{ub}
@{b}-fn @{i}fontname@{ui}@{ub}
     Use font @{i}fontname@{ui}.
     (Resource @{b}font@{ub}.)

@{b}-wn @{i}name@{ui}@{ub}
     Name the window @{i}name@{ui}.
     (Resource @{b}title@{ub}.)

@{b}-i@{ub}
     Use a bitmap icon (showing the kitchen sink) rather than a textual
     icon.
     (Resource @{b}bitmapIcon@{ub}.)

@{b}-in @{i}name@{ui}@{ub}
     Name the icon @{i}name@{ui}.  (Resource @{b}iconName@{ub}; @{b}Title@{ub}).

@{b}-geometry @{i}coords@{ui}@{ub}
@{b}-w @{i}coords@{ui}@{ub}
     Specify the shape and optionally the position of the Emacs window
     in the usual X way.
     (Resource @{b}geometry@{ub}.)

@{b}-b @{i}width@{ui}@{ub}
     Specify that the window border is @{i}width@{ui} pixels thick.
     (Resource @{b}borderWidth@{ub}.)

@{b}-ib @{i}width@{ui}@{ub}
     Leave @{i}width@{ui} blank pixels between the border and the window
     contents.
     (Resource @{b}internalBorder@{ub}; @{b}BorderWidth@{ub}.)

@{b}-r@{ub}
     Use reverse video.
     (Resource @{b}reverseVideo@{ub}.)

@{b}-fg @{i}color@{ui}@{ub}
     Use color @{i}color@{ui} for text in the window.
     (Resource @{b}foreground@{ub}.)

@{b}-bg @{i}color@{ui}@{ub}
     Use the color @{i}color@{ui} for the background of the window.
     (Resource @{b}background@{ub}.)

@{b}-bd @{i}color@{ui}@{ub}
     Use color @{i}color@{ui} for the window border.
     (Resource @{b}borderColor@{ub}.)

@{b}-cr @{i}color@{ui}@{ub}
     Specify the color, @{i}color@{ui}, to use for the cursor.
     (Resource @{b}cursorColor@{ub}; @{b}Foreground@{ub}.)

@{b}-ms @{i}color@{ui}@{ub}
     Use color @{i}color@{ui} for the mouse cursor.
     (Resource @{b}pointerColor@{ub}; @{b}Foreground@{ub}.)

   The init file can get access to the command line argument values as
the elements of a list in the variable @{b}command-line-args@{ub}.  (The
arguments in the second table above will already have been processed and
will not be in the list.)  The init file can override the normal
processing of the other arguments by setting this variable.

   One way to use command arguments is to visit many files
automatically:

     emacs *.c

passes each @{b}.c@{ub} file as a separate argument to Emacs, so that Emacs
visits each file (see @{"Visiting" Link "Visiting"}).

   Here is an advanced example that assumes you have a Lisp program
file called @{b}hack-c-program.el@{ub} which, when loaded, performs some useful
operation on current buffer, expected to be a C program.

     emacs -batch foo.c -l hack-c-program -f save-buffer -kill > log

This says to visit @{b}foo.c@{ub}, load @{b}hack-c-program.el@{ub} (which makes changes
in the visited file), save @{b}foo.c@{ub} (note that @{b}save-buffer@{ub} is the function
that @{b}C-x C-s@{ub} is bound to), and then exit to the shell that this command
was done with.  @{b}-batch@{ub} guarantees there will be no problem redirecting
output to @{b}log@{ub}, because Emacs will not assume that it has a display
terminal to work with.


@EndNode

@Node "Basic" "emacs/Basic"
@Next "Undo"
@Prev "Command Switches"
@Toc "Main"

Basic Editing Commands
**********************

   We now give the basics of how to enter text, make corrections, and
save the text in a file.  If this material is new to you, you might
learn it more easily by running the Emacs learn-by-doing tutorial.  To
do this, type @{b}Control-h t@{ub} (@{b}help-with-tutorial@{ub}).

Inserting Text
==============

   To insert printing characters into the text you are editing, just
type them.  This inserts the character into the buffer at the cursor
(that is, at @{i}point@{ui}; see @{"Point" Link "Point"}).  The cursor moves forward.  Any
characters after the cursor move forward too.  If the text in the
buffer is @{b}FOOBAR@{ub}, with the cursor before the @{b}B@{ub}, then if you type @{b}XX@{ub},
you get @{b}FOOXXBAR@{ub}, with the cursor still before the @{b}B@{ub}.

   To @{i}delete@{ui} text you have just inserted, use DEL.  DEL deletes the
character @{i}before@{ui} the cursor (not the one that the cursor is on top of
or under; that is the character @{i}after@{ui} the cursor).  The cursor and all
characters after it move backwards.  Therefore, if you type a printing
character and then type DEL, they cancel out.

   To end a line and start typing a new one, type RET.  This inserts a
newline character in the buffer.  If point is in the middle of a line,
RET splits the line.  Typing DEL when the cursor is at the beginning of
a line rubs out the newline before the line, thus joining the line with
the preceding line.

   Emacs will split lines automatically when they become too long, if
you turn on a special mode called @{i}Auto Fill@{ui} mode.  See @{"Filling" Link "Filling"}, for how
to use Auto Fill mode.

   Customization information: DEL in most modes runs the command named
@{b}delete-backward-char@{ub}; RET runs the command @{b}newline@{ub}, and self-inserting
printing characters run the command @{b}self-insert@{ub}, which inserts whatever
character was typed to invoke it.  Some major modes rebind DEL to other
commands.

   Direct insertion works for printing characters and SPC, but other
characters act as editing commands and do not insert themselves.  If you
need to insert a control character or a character whose code is above
200 octal, you must @{i}quote@{ui} it by typing the character @{b}control-q@{ub}
(@{b}quoted-insert@{ub}) first.  There are two ways to use @{b}C-q@{ub}:

   @{b}*@{ub}     @{b}Control-q@{ub} followed by any non-graphic character (even @{b}C-g@{ub})
     inserts that character.

   @{b}*@{ub}     @{b}Control-q@{ub} followed by three octal digits inserts the character
     with the specified character code.

A numeric argument to @{b}C-q@{ub} specifies how many copies of the quoted
character should be inserted (see @{"Arguments" Link "Arguments"}).

   If you prefer to have text characters replace (overwrite) existing
text rather than shove it to the right, you can enable Overwrite mode,
a minor mode.  See @{"Minor Modes" Link "Minor Modes"}.

Changing the Location of Point
==============================

   To do more than insert characters, you have to know how to move
point (see @{"Point" Link "Point"}).  Here are a few of the commands for doing that.

@{b}C-a@{ub}
     Move to the beginning of the line (@{b}beginning-of-line@{ub}).

@{b}C-e@{ub}
     Move to the end of the line (@{b}end-of-line@{ub}).

@{b}C-f@{ub}
     Move forward one character (@{b}forward-char@{ub}).

@{b}C-b@{ub}
     Move backward one character (@{b}backward-char@{ub}).

@{b}M-f@{ub}
     Move forward one word (@{b}forward-word@{ub}).

@{b}M-b@{ub}
     Move backward one word (@{b}backward-word@{ub}).

@{b}C-n@{ub}
     Move down one line, vertically (@{b}next-line@{ub}).  This command attempts
     to keep the horizontal position unchanged, so if you start in the
     middle of one line, you end in the middle of the next.  When on
     the last line of text, @{b}C-n@{ub} creates a new line and moves onto it.

@{b}C-p@{ub}
     Move up one line, vertically (@{b}previous-line@{ub}).

@{b}C-l@{ub}
     Clear the screen and reprint everything (@{b}recenter@{ub}).  Text moves on
     the screen to bring point to the center of the window.

@{b}M-r@{ub}
     Move point to left margin on the line halfway down the screen or
     window (@{b}move-to-window-line@{ub}).  Text does not move on the screen.
     A numeric argument says how many screen lines down from the top of
     the window (zero for the top).  A negative argument counts from
     the bottom (-1 for the bottom).

@{b}C-t@{ub}
     Transpose two characters, the ones before and after the cursor
     (@{b}transpose-chars@{ub}).

@{b}M-<@{ub}
     Move to the top of the buffer (@{b}beginning-of-buffer@{ub}).  With numeric
     argument @{i}n@{ui}, move to @{i}n@{ui}/10 of the way from the top.  See @{"Arguments" Link "Arguments"},
     for more information on numeric arguments.

@{b}M->@{ub}
     Move to the end of the buffer (@{b}end-of-buffer@{ub}).

@{b}M-x goto-char@{ub}
     Read a number @{i}n@{ui} and move cursor to character number @{i}n@{ui}.  Position 1
     is the beginning of the buffer.

@{b}M-x goto-line@{ub}
     Read a number @{i}n@{ui} and move cursor to line number @{i}n@{ui}.  Line 1 is the
     beginning of the buffer.

@{b}C-x C-n@{ub}
     Use the current column of point as the @{i}semipermanent goal column@{ui}
     for @{b}C-n@{ub} and @{b}C-p@{ub} (@{b}set-goal-column@{ub}).  Henceforth, those commands
     always move to this column in each line moved into, or as close as
     possible given the contents of the line.  This goal column remains
     in effect until canceled.

@{b}C-u C-x C-n@{ub}
     Cancel the goal column.  Henceforth, @{b}C-n@{ub} and @{b}C-p@{ub} once again try to
     avoid changing the horizontal position, as usual.

   If you set the variable @{b}track-eol@{ub} to a non-@{b}nil@{ub} value, then @{b}C-n@{ub} and
@{b}C-p@{ub} when at the end of the starting line move to the end of the line.
Normally, @{b}track-eol@{ub} is @{b}nil@{ub}.

Erasing Text
============

@{b}DEL@{ub}
     Delete the character before the cursor (@{b}delete-backward-char@{ub}).

@{b}C-d@{ub}
     Delete the character after the cursor (@{b}delete-char@{ub}).

@{b}C-k@{ub}
     Kill to the end of the line (@{b}kill-line@{ub}).

@{b}M-d@{ub}
     Kill forward to the end of the next word (@{b}kill-word@{ub}).

@{b}M-DEL@{ub}
     Kill back to the beginning of the previous word
     (@{b}backward-kill-word@{ub}).

   You already know about the DEL key which deletes the character
before the cursor.  Another key, @{b}Control-d@{ub}, deletes the character after
the cursor, causing the rest of the text on the line to shift left.  If
@{b}Control-d@{ub} is typed at the end of a line, that line and the next line
are joined together.

   To erase a larger amount of text, use the @{b}Control-k@{ub} key, which kills
a line at a time.  If @{b}C-k@{ub} is done at the beginning or middle of a line,
it kills all the text up to the end of the line.  If @{b}C-k@{ub} is done at the
end of a line, it joins that line and the next line.

   See @{"Killing" Link "Killing"}, for more flexible ways of killing text.

Files
=====

   The commands above are sufficient for creating and altering text in
an Emacs buffer; the more advanced Emacs commands just make things
easier.  But to keep any text permanently you must put it in a @{i}file@{ui}.
Files are named units of text which are stored by the operating system
for you to retrieve later by name.  To look at or use the contents of a
file in any way, including editing the file with Emacs, you must specify the
file name.

   Consider a file named @{b}/usr/rms/foo.c@{ub}.  In Emacs, to begin editing
this file, type

     C-x C-f /usr/rms/foo.c RET

Here the file name is given as an @{i}argument@{ui} to the command @{b}C-x C-f@{ub}
(@{b}find-file@{ub}).  That command uses the @{i}minibuffer@{ui} to read the
argument, and you type RET to terminate the argument (see @{"Minibuffer" Link "Minibuffer"}).

   Emacs obeys the command by @{i}visiting@{ui} the file: creating a buffer,
copying the contents of the file into the buffer, and then displaying
the buffer for you to edit.  You can make changes in it, and then @{i}save@{ui}
the file by typing @{b}C-x C-s@{ub} (@{b}save-buffer@{ub}).  This makes the changes
permanent by copying the altered contents of the buffer back into the
file @{b}/usr/rms/foo.c@{ub}.  Until then, the changes are only inside your
Emacs, and the file @{b}foo.c@{ub} is not changed.

   To create a file, just visit the file with @{b}C-x C-f@{ub} as if it already
existed.  Emacs will make an empty buffer in which you can insert the
text you want to put in the file.  When you save your text with @{b}C-x C-s@{ub},
the file will be created.

   Of course, there is a lot more to learn about using files.  See
@{"Files" Link "Files"}.

Help
====

   If you forget what a key does, you can find out with the Help
character, which is @{b}C-h@{ub}.  Type @{b}C-h k@{ub} followed by the key you want to
know about; for example, @{b}C-h k C-n@{ub} tells you all about what @{b}C-n@{ub} does.
@{b}C-h@{ub} is a prefix key; @{b}C-h k@{ub} is just one of its subcommands (the command
@{b}describe-key@{ub}).  The other subcommands of @{b}C-h@{ub} provide different kinds of
help.  Type @{b}C-h@{ub} three times to get a description of all the help
facilities.  See @{"Help" Link "Help"}.


 @{" Blank Lines " Link "Blank Lines"}         Commands to make or delete blank lines.
 @{" Continuation Lines " Link "Continuation Lines"}  Lines too wide for the screen.
 @{" Position Info " Link "Position Info"}       What page, line, row, or column is point on?
 @{" Arguments " Link "Arguments"} 	       Numeric arguments for repeating a command.


@EndNode

@Node "Blank Lines" "emacs/Blank Lines"
@Next "Continuation Lines"
@Prev "Basic"
@Toc "Basic"

Blank Lines
===========

   Here are special commands and techniques for putting in and taking
out blank lines.

@{b}C-o@{ub}
     Insert one or more blank lines after the cursor (@{b}open-line@{ub}).

@{b}C-x C-o@{ub}
     Delete all but one of many consecutive blank lines
     (@{b}delete-blank-lines@{ub}).

   When you want to insert a new line of text before an existing line,
you can do it by typing the new line of text, followed by RET.  However,
it may be easier to see what you are doing if you first make a blank
line and then insert the desired text into it.  This is easy to do
using the key @{b}C-o@{ub} (@{b}open-line@{ub}), which inserts a newline after point but
leaves point in front of the newline.  After @{b}C-o@{ub}, type the text for the
new line.  @{b}C-o F O O@{ub} has the same effect as @{b}F O O RET@{ub}, except for the
final location of point.

   You can make several blank lines by typing @{b}C-o@{ub} several times, or by
giving it an argument to tell it how many blank lines to make.  See
@{"Arguments" Link "Arguments"}, for how.

   If you have many blank lines in a row and want to get rid of them,
use @{b}C-x C-o@{ub} (@{b}delete-blank-lines@{ub}).  When point is on a blank line which
is adjacent to at least one other blank line, @{b}C-x C-o@{ub} deletes all but
one of the consecutive blank lines, leaving exactly one.  With point on
a blank line with no other blank line adjacent to it, the sole blank
line is deleted, leaving none.  When point is on a nonblank line, @{b}C-x
C-o@{ub} deletes any blank lines following that nonblank line.


@EndNode

@Node "Continuation Lines" "emacs/Continuation Lines"
@Next "Position Info"
@Prev "Blank Lines"
@Toc "Basic"

Continuation Lines
==================

   If you add too many characters to one line, without breaking it with
a RET, the line will grow to occupy two (or more) lines on the screen,
with a @{b}\ @{ub} at the extreme right margin of all but the last of them.  The
@{b}\ @{ub} says that the following screen line is not really a distinct line in
the text, but just the @{i}continuation@{ui} of a line too long to fit the
screen.  Sometimes it is nice to have Emacs insert newlines
automatically when a line gets too long; for this, use Auto Fill mode
(see @{"Filling" Link "Filling"}).

   Instead of continuation, long lines can be displayed by @{i}truncation@{ui}.
This means that all the characters that do not fit in the width of the
screen or window do not appear at all.  They remain in the buffer,
temporarily invisible.  @{b}$@{ub} is used in the last column instead of @{b}\ @{ub} to
inform you that truncation is in effect.

   Continuation can be turned off for a particular buffer by setting the
variable @{b}truncate-lines@{ub} to non-@{b}nil@{ub} in that buffer.  Truncation instead of
continuation also happens whenever horizontal scrolling is in use, and
optionally whenever side-by-side windows are in use (see @{"Windows" Link "Windows"}).
Altering the value of @{b}truncate-lines@{ub} makes it local to the current
buffer; until that time, the default value is in effect.  The default
is initially @{b}nil@{ub}.  See @{"Locals" Link "Locals"}.


@EndNode

@Node "Position Info" "emacs/Position Info"
@Next "Arguments"
@Prev "Continuation Lines"
@Toc "Basic"

Cursor Position Information
===========================

   If you are accustomed to other display editors, you may be surprised
that Emacs does not always display the page number or line number of
point in the mode line.  This is because the text is stored in a way
that makes it difficult to compute this information.  Displaying them
all the time would be intolerably slow.  They are not needed very often
in Emacs anyway, but there are commands to compute them and print them.

@{b}M-x what-page@{ub}
     Print page number of point, and line number within page.

@{b}M-x what-line@{ub}
     Print line number of point in the buffer.

@{b}M-=@{ub}
     Print number of lines in the current region (@{b}count-lines-region@{ub}).

@{b}C-x =@{ub}
     Print character code of character after point, character position
     of point, and column of point (@{b}what-cursor-position@{ub}).

   There are two commands for printing line numbers.  @{b}M-x what-line@{ub}
counts lines from the beginning of the file and prints the line number
point is on.  The first line of the file is line number 1.  These
numbers can be used as arguments to @{b}M-x goto-line@{ub}.  By contrast, @{b}M-x
what-page@{ub} counts pages from the beginning of the file, and counts lines
within the page, printing both of them.  See @{"Pages" Link "Pages"}.

   While on this subject, we might as well mention @{b}M-=@{ub}
(@{b}count-lines-region@{ub}), which prints the number of lines in the
region (see @{"Mark" Link "Mark"}).  See @{"Pages" Link "Pages"}, for the command @{b}C-x l@{ub} which counts the
lines in the current page.

   The command @{b}C-x =@{ub} (@{b}what-cursor-position@{ub}) can be used to find out the
column that the cursor is in, and other miscellaneous information about
point.  It prints a line in the echo area that looks like this:

     Char: x (0170)  point=65986 of 563027(12%)  x=44

(In fact, this is the output produced when point is before the @{b}x=44@{ub} in
the example.)

   The two values after @{b}Char:@{ub} describe the character following point,
first by showing it and second by giving its octal character code.

   @{b}point=@{ub} is followed by the position of point expressed as a character
count.  The front of the buffer counts as position 1, one character
later as 2, and so on.  The next, larger number is the total number of
characters in the buffer.  Afterward in parentheses comes the position
expressed as a percentage of the total size.

   @{b}x=@{ub} is followed by the horizontal position of point, in columns from
the left edge of the window.

   If the buffer has been narrowed, making some of the text at the
beginning and the end temporarily invisible, @{b}C-x =@{ub} prints additional
text describing the current visible range.  For example, it might say

     Char: x (0170)  point=65986 of 563025(12%) <65102 - 68533>  x=44

where the two extra numbers give the smallest and largest character
position that point is allowed to assume.  The characters between those
two positions are the visible ones.  See @{"Narrowing" Link "Narrowing"}.

   If point is at the end of the buffer (or the end of the visible
part), @{b}C-x =@{ub} omits any description of the character after point.  The
output looks like

     point=563026 of 563025(100%)  x=0


@EndNode

@Node "Arguments" "emacs/Arguments"
@Prev "Position Info"
@Toc "Basic"

Numeric Arguments
=================

   Any Emacs command can be given a @{i}numeric argument@{ui}.  Some commands
interpret the argument as a repetition count.  For example, giving an
argument of ten to the key @{b}C-f@{ub} (the command @{b}forward-char@{ub}, move forward
one character) moves forward ten characters.  With these commands, no
argument is equivalent to an argument of one.  Negative arguments are
allowed.  Often they tell a command to move or act backwards.

   If your terminal keyboard has a META key, the easiest way to specify
a numeric argument is to type digits and/or a minus sign while holding
down the META key.  For example,
     M-5 C-n

would move down five lines.  The characters @{b}Meta-1@{ub}, @{b}Meta-2@{ub}, and so on,
as well as @{b}Meta-@{ub}, do this because they are keys bound to commands
(@{b}digit-argument@{ub} and @{b}negative-argument@{ub}) that are defined to
contribute to an argument for the next command.

   Another way of specifying an argument is to use the @{b}C-u@{ub}
(@{b}universal-argument@{ub}) command followed by the digits of the argument.
With @{b}C-u@{ub}, you can type the argument digits without holding down shift
keys.  To type a negative argument, start with a minus sign.  Just a
minus sign normally means -1.  @{b}C-u@{ub} works on all terminals.

   @{b}C-u@{ub} followed by a character which is neither a digit nor a minus
sign has the special meaning of "multiply by four".  It multiplies the
argument for the next command by four.  @{b}C-u@{ub} twice multiplies it by
sixteen.  Thus, @{b}C-u C-u C-f@{ub} moves forward sixteen characters.  This is
a good way to move forward "fast", since it moves about 1/5 of a line
in the usual size screen.  Other useful combinations are @{b}C-u C-n@{ub}, @{b}C-u
C-u C-n@{ub} (move down a good fraction of a screen), @{b}C-u C-u C-o@{ub} (make "a
lot" of blank lines), and @{b}C-u C-k@{ub} (kill four lines).

   Some commands care only about whether there is an argument, and not
about its value.  For example, the command @{b}M-q@{ub} (@{b}fill-paragraph@{ub}) with no
argument fills text; with an argument, it justifies the text as well.
(See @{"Filling" Link "Filling"}, for more information on @{b}M-q@{ub}.)  Just @{b}C-u@{ub} is a handy way of
providing an argument for such commands.

   Some commands use the value of the argument as a repeat count, but do
something peculiar when there is no argument.  For example, the command
@{b}C-k@{ub} (@{b}kill-line@{ub}) with argument @{i}n@{ui} kills @{i}n@{ui} lines, including their
terminating newlines.  But @{b}C-k@{ub} with no argument is special: it kills
the text up to the next newline, or, if point is right at the end of
the line, it kills the newline itself.  Thus, two @{b}C-k@{ub} commands with no
arguments can kill a nonblank line, just like @{b}C-k@{ub} with an argument of
one.  (See @{"Killing" Link "Killing"}, for more information on @{b}C-k@{ub}.)

   A few commands treat a plain @{b}C-u@{ub} differently from an ordinary
argument.  A few others may treat an argument of just a minus sign
differently from an argument of -1.  These unusual cases will be
described when they come up; they are always for reasons of convenience
of use of the individual command.

   To insert multiple copies of a digit, you can type @{b}C-u @{i}count@{ui} C-u
@{i}digit@{ui}@{ub}.  The second @{b}C-u@{ub} ends the numeric argument, so that the following
character always acts a key sequence to be executed.


@EndNode

@Node "Undo" "emacs/Undo"
@Next "Minibuffer"
@Prev "Basic"
@Toc "Main"

Undoing Changes
***************

   Emacs allows all changes made in the text of a buffer to be undone,
up to a certain amount of change (8000 characters).  Each buffer records
changes individually, and the undo command always applies to the
current buffer.  Usually each editing command makes a separate entry in
the undo records, but some commands such as @{b}query-replace@{ub} make many
entries, and very simple commands such as self-inserting characters are
often grouped to make undoing less tedious.

@{b}C-x u@{ub}
     Undo one batch of changes (usually, one command worth) (@{b}undo@{ub}).

@{b}C-_@{ub}
     The same.

   The command @{b}C-x u@{ub} or @{b}C-_@{ub} is how you undo.  The first time you give
this command, it undoes the last change.  Point moves to the text
affected by the undo, so you can see what was undone.

   Consecutive repetitions of the @{b}C-_@{ub} or @{b}C-x u@{ub} commands undo earlier
and earlier changes, back to the limit of what has been recorded.  If
all recorded changes have already been undone, the undo command prints
an error message and does nothing.

   Any command other than an undo command breaks the sequence of undo
commands.  Starting at this moment, the previous undo commands are
considered ordinary changes that can themselves be undone.  Thus, to
redo changes you have undone, type @{b}C-f@{ub} or any other command that will
have no important effect, and then give more undo commands.

   If you notice that a buffer has been modified accidentally, the
easiest way to recover is to type @{b}C-_@{ub} repeatedly until the stars
disappear from the front of the mode line.  At this time, all the
modifications you made have been cancelled.  If you do not remember
whether you changed the buffer deliberately, type @{b}C-_@{ub} once, and when
you see the last change you made undone, you will remember why you made
it.  If it was an accident, leave it undone.  If it was deliberate,
redo the change as described in the preceding paragraph.

   Whenever an undo command makes the stars disappear from the mode
line, it means that the buffer contents are the same as they were when
the file was last read in or saved.

   Not all buffers record undo information.  Buffers whose names start
with spaces don't; these buffers are used internally by Emacs and its
extensions to hold text that users don't normally look at or edit.
Also, minibuffers, help buffers and documentation buffers don't record
undo information.  Use the command @{b}buffer-enable-undo@{ub} to enable
recording undo information in the current buffer.

   As editing continues, undo lists get longer and longer.  To prevent
them from using up all available memory space, garbage collection trims
back their sizes to thresholds you can set.  (For this purpose, the
"size" of an undo list measures the cons cells that make up the list,
plus the strings of deleted text.)

   Two variables control the range of acceptable sizes: @{b}undo-limit@{ub} and
@{b}undo-strong-limit@{ub}.  Normally, the most recent changes are kept until
their size exceeds @{b}undo-limit@{ub}; all older changes are discarded.  But if
a change pushes the size above @{b}undo-strong-limit@{ub}, it is discarded as
well as all older changes.  One exception: the most recent set of
changes is sacred; garbage collection never discards that.  (In Emacs
versions 18.57 and 18.58, these variables are called @{b}undo-threshold@{ub} and
@{b}undo-high-threshold@{ub}.)

   The reason the @{b}undo@{ub} command has two keys, @{b}C-x u@{ub} and @{b}C-_@{ub}, set up to
run it is that it is worthy of a single-character key, but the way to
type @{b}C-_@{ub} on some keyboards is not obvious.  @{b}C-x u@{ub} is an alternative you
can type in the same fashion on any terminal.


@EndNode

@Node "Minibuffer" "emacs/Minibuffer"
@Next "M-x"
@Prev "Undo"
@Toc "Main"

The Minibuffer
**************

   The @{i}minibuffer@{ui} is the facility used by Emacs commands to read
arguments more complicated than a single number.  Minibuffer arguments
can be file names, buffer names, Lisp function names, Emacs command
names, Lisp expressions, and many other things, depending on the
command reading the argument.  The usual Emacs editing commands can be
used in the minibuffer to edit the argument.

   When the minibuffer is in use, it appears in the echo area, and the
terminal's cursor moves there.  The beginning of the minibuffer line
displays a @{i}prompt@{ui} which says what kind of input you should supply and
how it will be used.  Often this prompt is derived from the name of the
command that the argument is for.  The prompt normally ends with a
colon.

   Sometimes a @{i}default argument@{ui} appears in parentheses after the colon;
it too is part of the prompt.  The default will be used as the argument
value if you enter an empty argument (e.g., just type RET).  For
example, commands that read buffer names always show a default, which
is the name of the buffer that will be used if you type just RET.

   The simplest way to give a minibuffer argument is to type the text
you want, terminated by RET which exits the minibuffer.  You can get out
of the minibuffer, canceling the command that it was for, by typing @{b}C-g@{ub}.

   Since the minibuffer uses the screen space of the echo area, it can
conflict with other ways Emacs customarily uses the echo area.  Here is
how Emacs handles such conflicts:

   @{b}*@{ub} If a command gets an error while you are in the minibuffer, this
     does not cancel the minibuffer.  However, the echo area is needed
     for the error message and therefore the minibuffer itself is
     hidden for a while.  It comes back after a few seconds, or as soon
     as you type anything.

   @{b}*@{ub} If in the minibuffer you use a command whose purpose is to print a
     message in the echo area, such as @{b}C-x =@{ub}, the message is printed
     normally, and the minibuffer is hidden for a while.  It comes back
     after a few seconds, or as soon as you type anything.

   @{b}*@{ub} Echoing of keystrokes does not take place while the minibuffer is
     in use.


 @{" File " Link "Minibuffer File"}                   Entering file names with the minibuffer.
 @{" Edit " Link "Minibuffer Edit"}                   How to edit in the minibuffer.
 @{" Completion " Link "Completion"} 		  An abbreviation facility for minibuffer input.
 @{" Repetition " Link "Repetition"} 		  Re-executing commands that used the minibuffer.


@EndNode

@Node "Minibuffer File" "emacs/Minibuffer File"
@Next "Minibuffer Edit"
@Prev "Minibuffer"
@Toc "Minibuffer"

Minibuffers for File Names
==========================

   Sometimes the minibuffer starts out with text in it.  For example,
when you are supposed to give a file name, the minibuffer starts out
containing the @{i}default directory@{ui}, which ends with a slash.  This is to
inform you which directory the file will be found in if you do not
specify a directory.  For example, the minibuffer might start out with

     Find File: /u2/emacs/src/

where @{b}Find File: @{ub} is the prompt.  Typing @{b}buffer.c@{ub} specifies the file
@{b}/u2/emacs/src/buffer.c@{ub}.  To find files in nearby directories, use @{b}..@{ub};
thus, if you type @{b}../lisp/simple.el@{ub}, the file that you visit will be
the one named @{b}/u2/emacs/lisp/simple.el@{ub}.  Alternatively, you can kill
with @{b}M-DEL@{ub} the directory names you don't want (see @{"Words" Link "Words"}).

   You can also type an absolute file name, one starting with a slash
or a tilde, ignoring the default directory.  For example, to find the
file @{b}/etc/termcap@{ub}, just type the name, giving

     Find File: /u2/emacs/src//etc/termcap

Two slashes in a row are not normally meaningful in Unix file names, but
they are allowed in GNU Emacs.  They mean, "ignore everything before the
second slash in the pair."  Thus, @{b}/u2/emacs/src/@{ub} is ignored, and you
get the file @{b}/etc/termcap@{ub}.

   If you set @{b}insert-default-directory@{ub} to @{b}nil@{ub}, the default directory is
not inserted in the minibuffer.  This way, the minibuffer starts out
empty.  But the name you type, if relative, is still interpreted with
respect to the same default directory.


@EndNode

@Node "Minibuffer Edit" "emacs/Minibuffer Edit"
@Next "Completion"
@Prev "Minibuffer File"
@Toc "Minibuffer"

Editing in the Minibuffer
=========================

   The minibuffer is an Emacs buffer (albeit a peculiar one), and the
usual Emacs commands are available for editing the text of an argument
you are entering.

   Since RET in the minibuffer is defined to exit the minibuffer,
inserting a newline into the minibuffer must be done with @{b}C-o@{ub} or with
@{b}C-q LFD@{ub}.  (Recall that a newline is really the LFD character.)

   The minibuffer has its own window which always has space on the
screen but acts as if it were not there when the minibuffer is not in
use.  When the minibuffer is in use, its window is just like the
others; you can switch to another window with @{b}C-x o@{ub}, edit text in other
windows and perhaps even visit more files, before returning to the
minibuffer to submit the argument.  You can kill text in another
window, return to the minibuffer window, and then yank the text to use
it in the argument.  See @{"Windows" Link "Windows"}.

   There are some restrictions on the use of the minibuffer window,
however.  You cannot switch buffers in it--the minibuffer and its
window are permanently attached.  Also, you cannot split or kill the
minibuffer window.  But you can make it taller in the normal fashion
with @{b}C-x ^@{ub} (see @{"Change Window" Link "Change Window"}).

   If while in the minibuffer you issue a command that displays help
text of any sort in another window, then that window is identified as
the one to scroll if you type @{b}C-M-v@{ub} while in the minibuffer.  This
lasts until you exit the minibuffer.  This feature comes into play if a
completing minibuffer gives you a list of possible completions.

   Recursive use of the minibuffer is supported by Emacs.  However, it
is easy to do this by accident (because of autorepeating keyboards, for
example) and get confused.  Therefore, most Emacs commands that use the
minibuffer refuse to operate if the minibuffer window is selected.  If
the minibuffer is active but you have switched to a different window,
recursive use of the minibuffer is allowed--if you know enough to try
to do this, you probably will not get confused.

   If you set the variable @{b}enable-recursive-minibuffers@{ub} to be non-@{b}nil@{ub},
recursive use of the minibuffer is always allowed.


@EndNode

@Node "Completion" "emacs/Completion"
@Next "Repetition"
@Prev "Minibuffer Edit"
@Toc "Minibuffer"

Completion
==========

   When appropriate, the minibuffer provides a @{i}completion@{ui} facility.
This means that you type enough of the argument to determine the rest,
based on Emacs's knowledge of which arguments make sense, and Emacs
visibly fills in the rest, or as much as can be determined from the
part you have typed.

   When completion is available, certain keys--TAB, RET, and SPC--are
redefined to complete an abbreviation present in the minibuffer into a
longer string that it stands for, by matching it against a set of
@{i}completion alternatives@{ui} provided by the command reading the argument.
@{b}?@{ub} is defined to display a list of possible completions of what you
have inserted.

   For example, when the minibuffer is being used by @{b}Meta-x@{ub} to read the
name of a command, it is given a list of all available Emacs command
names to complete against.  The completion keys match the text in the
minibuffer against all the command names, find any additional
characters of the name that are implied by the ones already present in
the minibuffer, and add those characters to the ones you have given.

   Case is normally significant in completion, because it is
significant in most of the names that you can complete (buffer names,
file names and command names).  Thus, @{b}fo@{ub} will not complete to @{b}Foo@{ub}.
When you are completing a name in which case does not matter, case may
be ignored for completion's sake if the program said to do so.

Completion Example
------------------

   A concrete example may help here.  If you type @{b}Meta-x au TAB@{ub}, the
TAB looks for alternatives (in this case, command names) that start
with @{b}au@{ub}.  There are only two: @{b}auto-fill-mode@{ub} and @{b}auto-save-mode@{ub}.  These
are the same as far as @{b}auto-@{ub}, so the @{b}au@{ub} in the minibuffer changes to
@{b}auto-@{ub}.

   If you type TAB again immediately, there are multiple possibilities
for the very next character--it could be @{b}s@{ub} or @{b}f@{ub}--so no more characters
are added; but a list of all possible completions is displayed in
another window.

   If you go on to type @{b}f TAB@{ub}, this TAB sees @{b}auto-f@{ub}.  The only command
name starting this way is @{b}auto-fill-mode@{ub}, so completion inserts the
rest of that.  You now have @{b}auto-fill-mode@{ub} in the minibuffer after
typing just @{b}au TAB f TAB@{ub}.  Note that TAB has this effect because in the
minibuffer it is bound to the function @{b}minibuffer-complete@{ub} when
completion is supposed to be done.

Completion Commands
-------------------

   Here is a list of all the completion commands, defined in the
minibuffer when completion is available.

@{b}TAB@{ub}
     Complete the text in the minibuffer as much as possible
     (@{b}minibuffer-complete@{ub}).

@{b}SPC@{ub}
     Complete the text in the minibuffer but don't add or fill out more
     than one word (@{b}minibuffer-complete-word@{ub}).

@{b}RET@{ub}
     Submit the text in the minibuffer as the argument, possibly
     completing first as described below (@{b}minibuffer-complete-and-exit@{ub}).

@{b}?@{ub}
     Print a list of all possible completions of the text in the
     minibuffer (@{b}minibuffer-list-completions@{ub}).

   SPC completes much like TAB, but never goes beyond the next hyphen
or space.  If you have @{b}auto-f@{ub} in the minibuffer and type SPC, it finds
that the completion is @{b}auto-fill-mode@{ub}, but it stops completing after
@{b}fill-@{ub}.  This gives @{b}auto-fill-@{ub}.  Another SPC at this point completes all
the way to @{b}auto-fill-mode@{ub}.  SPC in the minibuffer runs the function
@{b}minibuffer-complete-word@{ub} when completion is available.

   There are three different ways that RET can work in completing
minibuffers, depending on how the argument will be used.

   @{b}*@{ub}     @{i}Strict@{ui} completion is used when it is meaningless to give any
     argument except one of the known alternatives.  For example, when
     @{b}C-x k@{ub} reads the name of a buffer to kill, it is meaningless to
     give anything but the name of an existing buffer.  In strict
     completion, RET refuses to exit if the text in the minibuffer does
     not complete to an exact match.

   @{b}*@{ub}     @{i}Cautious@{ui} completion is similar to strict completion, except
     that RET exits only if the text was an exact match already, not
     needing completion.  If the text is not an exact match, RET does
     not exit, but it does complete the text.  If it completes to an
     exact match, a second RET will exit.

     Cautious completion is used for reading file names for files that
     must already exist.

   @{b}*@{ub}     @{i}Permissive@{ui} completion is used when any string whatever is
     meaningful, and the list of completion alternatives is just a
     guide.  For example, when @{b}C-x C-f@{ub} reads the name of a file to
     visit, any file name is allowed, in case you want to create a
     file.  In permissive completion, RET takes the text in the
     minibuffer exactly as given, without completing it.

   The completion commands display a list of all possible completions
in a window whenever there is more than one possibility for the very
next character.  Also, typing @{b}?@{ub} explicitly requests such a list.  The
list of completions counts as help text, so @{b}C-M-v@{ub} typed in the
minibuffer scrolls the list.

   When completion is done on file names, certain file names are usually
ignored.  The variable @{b}completion-ignored-extensions@{ub} contains a list of
strings; a file whose name ends in any of those strings is ignored as a
possible completion.  The standard value of this variable has several
elements including @{b}".o"@{ub}, @{b}".elc"@{ub}, @{b}".dvi"@{ub} and @{b}"~"@{ub}.  The effect is that,
for example, @{b}foo@{ub} can complete to @{b}foo.c@{ub} even though @{b}foo.o@{ub} exists as
well.  If the only possible completions are files that end in "ignored"
strings, then they are not ignored.

   Normally, a completion command that finds the next character is
undetermined automatically displays a list of all possible completions.
If the variable @{b}completion-auto-help@{ub} is set to @{b}nil@{ub}, this does not
happen, and you must type @{b}?@{ub} to display the possible completions.


@EndNode

@Node "Repetition" "emacs/Repetition"
@Prev "Completion"
@Toc "Minibuffer"

Repeating Minibuffer Commands
=============================

   Every command that uses the minibuffer at least once is recorded on a
special history list, together with the values of the minibuffer
arguments, so that you can repeat the command easily.  In particular,
every use of @{b}Meta-x@{ub} is recorded, since @{b}M-x@{ub} uses the minibuffer to read
the command name.

@{b}C-x ESC@{ub}
     Re-execute a recent minibuffer command @{b}repeat-complex-command@{ub}).

@{b}M-p@{ub}
     Within @{b}C-x ESC@{ub}, move to the previous recorded command
     (@{b}previous-complex-command@{ub}).

@{b}M-n@{ub}
     Within @{b}C-x ESC@{ub}, move to the next (more recent) recorded command
     (@{b}next-complex-command@{ub}).

@{b}M-x list-command-history@{ub}
     Display the entire command history, showing all the commands @{b}C-x
     ESC@{ub} can repeat, most recent first.

   @{b}C-x ESC@{ub} is used to re-execute a recent minibuffer-using command.
With no argument, it repeats the last such command.  A numeric argument
specifies which command to repeat; 1 means the last one, and larger
numbers specify earlier ones.

   @{b}C-x ESC@{ub} works by turning the previous command into a Lisp expression
and then entering a minibuffer initialized with the text for that
expression.  If you type just RET, the command is repeated as before.
You can also change the command by editing the Lisp expression.
Whatever expression you finally submit is what will be executed.  The
repeated command is added to the front of the command history unless it
is identical to the most recently executed command already there.

   Even if you don't understand Lisp syntax, it will probably be obvious
which command is displayed for repetition.  If you do not change the
text, you can be sure it will repeat exactly as before.

   Once inside the minibuffer for @{b}C-x ESC@{ub}, if the command shown to you
is not the one you want to repeat, you can move around the list of
previous commands using @{b}M-n@{ub} and @{b}M-p@{ub}.  @{b}M-p@{ub} replaces the contents of the
minibuffer with the next earlier recorded command, and @{b}M-n@{ub} replaces
them with the next later command.  After finding the desired previous
command, you can edit its expression as usual and then resubmit it by
typing RET as usual.  Any editing you have done on the command to be
repeated is lost if you use @{b}M-n@{ub} or @{b}M-p@{ub}.

   @{b}M-p@{ub} is more useful than @{b}M-n@{ub}, since more often you will initially
request to repeat the most recent command and then decide to repeat an
older one instead.  These keys are specially defined within @{b}C-x ESC@{ub} to
run the commands @{b}previous-complex-command@{ub} and @{b}next-complex-command@{ub}.

   The list of previous minibuffer-using commands is stored as a Lisp
list in the variable @{b}command-history@{ub}.  Each element is a Lisp expression
which describes one command and its arguments.  Lisp programs can
reexecute a command by feeding the corresponding @{b}command-history@{ub}
element to @{b}eval@{ub}.


@EndNode

@Node "M-x" "emacs/M-x"
@Next "Help"
@Prev "Minibuffer"
@Toc "Main"

Running Commands by Name
************************

   The Emacs commands that are used often or that must be quick to type
are bound to keys--short sequences of characters--for convenient use.
Other Emacs commands that do not need to be brief are not bound to
keys; to run them, you must refer to them by name.

   A command name is, by convention, made up of one or more words,
separated by hyphens; for example, @{b}auto-fill-mode@{ub} or @{b}manual-entry@{ub}.  The
use of English words makes the command name easier to remember than a
key made up of obscure characters, even though it is more characters to
type.  Any command can be run by name, even if it is also runnable by
keys.

   The way to run a command by name is to start with @{b}M-x@{ub}, type the
command name, and finish it with RET.  @{b}M-x@{ub} uses the minibuffer to read
the command name.  RET exits the minibuffer and runs the command.

   Emacs uses the minibuffer for reading input for many different
purposes; on this occasion, the string @{b}M-x@{ub} is displayed at the
beginning of the minibuffer as a @{i}prompt@{ui} to remind you that your input
should be the name of a command to be run.  See @{"Minibuffer" Link "Minibuffer"}, for full
information on the features of the minibuffer.

   You can use completion to enter the command name.  For example, the
command @{b}forward-char@{ub} can be invoked by name by typing

     M-x forward-char RET
or

     M-x fo TAB c RET

Note that @{b}forward-char@{ub} is the same command that you invoke with the key
@{b}C-f@{ub}.  Any command (interactively callable function) defined in Emacs
can be called by its name using @{b}M-x@{ub} whether or not any keys are bound
to it.

   If you type @{b}C-g@{ub} while the command name is being read, you cancel the
@{b}M-x@{ub} command and get out of the minibuffer, ending up at top level.

   To pass a numeric argument to the command you are invoking with @{b}M-x@{ub},
specify the numeric argument before the @{b}M-x@{ub}.  @{b}M-x@{ub} passes the argument along
to the function which it calls.  The argument value appears in the
prompt while the command name is being read.

   Normally, when describing a command that is run by name, we omit the
RET that is needed to terminate the name.  Thus we might speak of @{b}M-x
auto-fill-mode@{ub} rather than @{b}M-x auto-fill-mode RET@{ub}.  We mention the RET
only when there is a need to emphasize its presence, such as when
describing a sequence of input that contains a command name and
arguments that follow it.

   @{b}M-x@{ub} is defined to run the command @{b}execute-extended-command@{ub}, which is
responsible for reading the name of another command and invoking it.


@EndNode

@Node "Help" "emacs/Help"
@Next "Mark"
@Prev "M-x"
@Toc "Main"

Help
****

   Emacs provides extensive help features which revolve around a single
character, @{b}C-h@{ub}.  @{b}C-h@{ub} is a prefix key that is used only for
documentation-printing commands.  The characters that you can type after
@{b}C-h@{ub} are called @{i}help options@{ui}.  One help option is @{b}C-h@{ub}; that is how you
ask for help about using @{b}C-h@{ub}.

   @{b}C-h C-h@{ub} prints a list of the possible help options, and then asks
you to go ahead and type the option.  It prompts with a string

     A B C F I K L M N S T V W C-c C-d C-n C-w.  Type C-h again for more help:

and you should type one of those characters.

   Typing a third @{b}C-h@{ub} displays a description of what the options mean;
it still waits for you to type an option.  To cancel, type @{b}C-g@{ub}.

   Here is a summary of the defined help commands.

@{b}C-h a @{i}string@{ui} RET@{ub}
     Display a list of commands whose names contain @{i}string@{ui}
     (@{b}command-apropos@{ub}).

@{b}C-h b@{ub}
     Display a table of all key bindings in effect now; local bindings
     of the current major mode first, followed by all global bindings
     (@{b}describe-bindings@{ub}).

@{b}C-h c @{i}key@{ui}@{ub}
     Print the name of the command that @{i}key@{ui} runs (@{b}describe-key-briefly@{ub}).
     @{b}c@{ub} is for `character'.  For more extensive information on @{i}key@{ui}, use
     @{b}C-h k@{ub}.

@{b}C-h f @{i}function@{ui} RET@{ub}
     Display documentation on the Lisp function named @{i}function@{ui}
     (@{b}describe-function@{ub}).  Note that commands are Lisp functions, so
     a command name may be used.

@{b}C-h i@{ub}
     Run Info, the program for browsing documentation files (@{b}info@{ub}).
     The complete Emacs manual is available on-line in Info.

@{b}C-h k @{i}key@{ui}@{ub}
     Display name and documentation of the command @{i}key@{ui} runs
     (@{b}describe-key@{ub}).

@{b}C-h l@{ub}
     Display a description of the last 100 characters you typed
     (@{b}view-lossage@{ub}).

@{b}C-h m@{ub}
     Display documentation of the current major mode (@{b}describe-mode@{ub}).

@{b}C-h n@{ub}
     Display documentation of Emacs changes, most recent first
     (@{b}view-emacs-news@{ub}).

@{b}C-h s@{ub}
     Display current contents of the syntax table, plus an explanation
     of what they mean (@{b}describe-syntax@{ub}).

@{b}C-h t@{ub}
     Display the Emacs tutorial (@{b}help-with-tutorial@{ub}).

@{b}C-h v @{i}var@{ui} RET@{ub}
     Display the documentation of the Lisp variable @{i}var@{ui}
     (@{b}describe-variable@{ub}).

@{b}C-h w @{i}command@{ui} RET@{ub}
     Print which keys run the command named @{i}command@{ui} (@{b}where-is@{ub}).

Documentation for a Key
=======================

   The most basic @{b}C-h@{ub} options are @{b}C-h c@{ub} (@{b}describe-key-briefly@{ub}) and
@{b}C-h k@{ub} (@{b}describe-key@{ub}).  @{b}C-h c @{i}key@{ui}@{ub} prints in the echo area the name
of the command that @{i}key@{ui} is bound to.  For example, @{b}C-h c C-f@{ub} prints
@{b}forward-char@{ub}.  Since command names are chosen to describe what the
command does, this is a good way to get a very brief description of what
@{i}key@{ui} does.

   @{b}C-h k @{i}key@{ui}@{ub} is similar but gives more information.  It displays the
documentation string of the command @{i}key@{ui} is bound to as well as its
name.  This is too big for the echo area, so a window is used for the
display.

Help by Command or Variable Name
================================

   @{b}C-h f@{ub} (@{b}describe-function@{ub}) reads the name of a Lisp function using
the minibuffer, then displays that function's documentation string in a
window.  Since commands are Lisp functions, you can use this to get the
documentation of a command that is known by name.  For example,

     C-h f auto-fill-mode RET

displays the documentation of @{b}auto-fill-mode@{ub}.  This is the only way to
see the documentation of a command that is not bound to any key (one
which you would normally call using @{b}M-x@{ub}).

   @{b}C-h f@{ub} is also useful for Lisp functions that you are planning to use
in a Lisp program.  For example, if you have just written the code
@{b}(make-vector len)@{ub} and want to be sure that you are using @{b}make-vector@{ub}
properly, type @{b}C-h f make-vector RET@{ub}.  Because @{b}C-h f@{ub} allows all
function names, not just command names, you may find that some of your
favorite abbreviations that work in @{b}M-x@{ub} don't work in @{b}C-h f@{ub}.  An
abbreviation may be unique among command names yet fail to be unique
when other function names are allowed.

   The function name for @{b}C-h f@{ub} to describe has a default which is used
if you type RET leaving the minibuffer empty.  The default is the
function called by the innermost Lisp expression in the buffer around
point, @{i}provided@{ui} that is a valid, defined Lisp function name.  For
example, if point is located following the text @{b}(make-vector (car x)@{ub},
the innermost list containing point is the one that starts with
@{b}(make-vector@{ub}, so the default is to describe the function @{b}make-vector@{ub}.

   @{b}C-h f@{ub} is often useful just to verify that you have the right
spelling for the function name.  If @{b}C-h f@{ub} mentions a default in the
prompt, you have typed the name of a defined Lisp function.  If that
tells you what you want to know, just type @{b}C-g@{ub} to cancel the @{b}C-h f@{ub}
command and go on editing.

   @{b}C-h w @{i}command@{ui} RET@{ub} tells you what keys are bound to @{i}command@{ui}.  It
prints a list of the keys in the echo area.  Alternatively, it says
that the command is not on any keys, which implies that you must use
@{b}M-x@{ub} to call it.

   @{b}C-h v@{ub} (@{b}describe-variable@{ub}) is like @{b}C-h f@{ub} but describes Lisp variables
instead of Lisp functions.  Its default is the Lisp symbol around or
before point, but only if that is the name of a known Lisp variable.
See @{"Variables" Link "Variables"}.

Apropos
=======

   A more sophisticated sort of question to ask is, "What are the
commands for working with files?"  For this, type @{b}C-h a file RET@{ub}, which
displays a list of all command names that contain @{b}file@{ub}, such as
@{b}copy-file@{ub}, @{b}find-file@{ub}, and so on.  With each command name appears a
brief description of how to use the command, and what keys you can
currently invoke it with.  For example, it would say that you can
invoke @{b}find-file@{ub} by typing @{b}C-x C-f@{ub}.  The @{b}a@{ub} in @{b}C-h a@{ub} stands for
`Apropos'; @{b}C-h a@{ub} runs the Lisp function @{b}command-apropos@{ub}.

   Because @{b}C-h a@{ub} looks only for functions whose names contain the
string which you specify, you must use ingenuity in choosing the string.
If you are looking for commands for killing backwards and @{b}C-h a
kill-backwards RET@{ub} doesn't reveal any, don't give up.  Try just @{b}kill@{ub},
or just @{b}backwards@{ub}, or just @{b}back@{ub}.  Be persistent.  Pretend you are
playing Adventure.  Also note that you can use a regular expression as
the argument (see @{"Regexps" Link "Regexps"}).

   Here is a set of arguments to give to @{b}C-h a@{ub} that covers many classes
of Emacs commands, since there are strong conventions for naming the
standard Emacs commands.  By giving you a feel for the naming
conventions, this set should also serve to aid you in developing a
technique for picking @{b}apropos@{ub} strings.

     char, line, word, sentence, paragraph, region, page, sexp, list,
     defun, buffer, screen, window, file, dir, register, mode,
     beginning, end, forward, backward, next, previous, up, down,
     search, goto, kill, delete, mark, insert, yank, fill, indent, case,
     change, set, what, list, find, view, describe.

   To list all Lisp symbols that contain a match for a regexp, not just
the ones that are defined as commands, use the command @{b}M-x apropos@{ub}
instead of @{b}C-h a@{ub}.

Other Help Commands
===================

   @{b}C-h i@{ub} (@{b}info@{ub}) runs the Info program, which is used for browsing
through structured documentation files.  The entire Emacs manual is
available within Info.  Eventually all the documentation of the GNU
system will be available.  Type @{b}h@{ub} after entering Info to run a tutorial
on using Info.

   If something surprising happens, and you are not sure what commands
you typed, use @{b}C-h l@{ub} (@{b}view-lossage@{ub}).  @{b}C-h l@{ub} prints the last 100 command
characters you typed in.  If you see commands that you don't know, you
can use @{b}C-h c@{ub} to find out what they do.

   Emacs has several major modes, each of which redefines a few keys and
makes a few other changes in how editing works.  @{b}C-h m@{ub} (@{b}describe-mode@{ub})
prints documentation on the current major mode, which normally describes
all the commands that are changed in this mode.

   @{b}C-h b@{ub} (@{b}describe-bindings@{ub}) and @{b}C-h s@{ub} (@{b}describe-syntax@{ub}) present other
information about the current Emacs mode.  @{b}C-h b@{ub} displays a list of all
the key bindings now in effect; the local bindings of the current major
mode first, followed by the global bindings (see @{"Key Bindings" Link "Key Bindings"}).  @{b}C-h s@{ub}
displays the contents of the syntax table, with explanations of each
character's syntax (see @{"Syntax" Link "Syntax"}).

   The other @{b}C-h@{ub} options display various files of useful information.
@{b}C-h C-w@{ub} displays the full details on the complete absence of warranty
for GNU Emacs.  @{b}C-h n@{ub} (@{b}view-emacs-news@{ub}) displays the file
@{b}emacs/etc/NEWS@{ub}, which contains documentation on Emacs changes
arranged chronologically.  @{b}C-h t@{ub} (@{b}help-with-tutorial@{ub}) displays the
learn-by-doing Emacs tutorial.  @{b}C-h C-c@{ub} (@{b}describe-copying@{ub}) displays the
file @{b}emacs/etc/COPYING@{ub}, which tells you the conditions you must obey in
distributing copies of Emacs.  @{b}C-h C-d@{ub} (@{b}describe-distribution@{ub}) displays
another file named @{b}emacs/etc/DISTRIB@{ub}, which tells you how you can order
a copy of the latest version of Emacs.


@EndNode

@Node "Mark" "emacs/Mark"
@Next "Killing"
@Prev "Help"
@Toc "Main"

The Mark and the Region
***********************

   There are many Emacs commands which operate on an arbitrary
contiguous part of the current buffer.  To specify the text for such a
command to operate on, you set the @{i}mark@{ui} at one end of it, and move
point to the other end.  The text between point and the mark is called
the @{i}region@{ui}.  You can move point or the mark to adjust the boundaries of
the region.  It doesn't matter which one is set first chronologically,
or which one comes earlier in the text.

   Once the mark has been set, it remains until it is set again at
another place.  The mark remains fixed with respect to the preceding
character if text is inserted or deleted in the buffer.  Each Emacs
buffer has its own mark, so that when you return to a buffer that had
been selected previously, it has the same mark it had before.

   Many commands that insert text, such as @{b}C-y@{ub} (@{b}yank@{ub}) and @{b}M-x
insert-buffer@{ub}, position the mark at one end of the inserted text--the
opposite end from where point is positioned, so that the region
contains the text just inserted.

   Aside from delimiting the region, the mark is also useful for
remembering a spot that you may want to go back to.  To make this
feature more useful, Emacs remembers 16 previous locations of the mark,
in the @{b}mark ring@{ub}.


 @{" Setting Mark " Link "Setting Mark"} 	Commands to set the mark.
 @{" Using Region " Link "Using Region"} 	Summary of ways to operate on contents of the region.
 @{" Marking Objects " Link "Marking Objects"} 	Commands to put region around textual units.
 @{" Mark Ring " Link "Mark Ring"}    Previous mark positions saved so you can go back there.


@EndNode

@Node "Setting Mark" "emacs/Setting Mark"
@Next "Using Region"
@Prev "Mark"
@Toc "Mark"

Setting the Mark
================

   Here are some commands for setting the mark:

@{b}C-SPC@{ub}
     Set the mark where point is (@{b}set-mark-command@{ub}).

@{b}C-@@{ub}
     The same.

@{b}C-x C-x@{ub}
     Interchange mark and point (@{b}exchange-point-and-mark@{ub}).

   For example, if you wish to convert part of the buffer to all
upper-case, you can use the @{b}C-x C-u@{ub} (@{b}upcase-region@{ub}) command, which
operates on the text in the region.  You can first go to the beginning
of the text to be capitalized, type @{b}C-SPC@{ub} to put the mark there, move to
the end, and then type @{b}C-x C-u@{ub}.  Or, you can set the mark at the end of
the text, move to the beginning, and then type @{b}C-x C-u@{ub}.  Most commands
that operate on the text in the region have the word @{b}region@{ub} in their
names.

   The most common way to set the mark is with the @{b}C-SPC@{ub} command
(@{b}set-mark-command@{ub}).  This sets the mark where point is.  Then you
can move point away, leaving the mark behind.  It is actually incorrect
to speak of the character @{b}C-SPC@{ub}; there is no such character.  When you
type SPC while holding down CTRL, what you get on most terminals is the
character @{b}C-@@{ub}.  This is the key actually bound to @{b}set-mark-command@{ub}.
But unless you are unlucky enough to have a terminal where typing @{b}C-SPC@{ub}
does not produce @{b}C-@@{ub}, you might as well think of this character as
@{b}C-SPC@{ub}.

   Since terminals have only one cursor, there is no way for Emacs to
show you where the mark is located.  You have to remember.  The usual
solution to this problem is to set the mark and then use it soon,
before you forget where it is.  But you can see where the mark is with
the command @{b}C-x C-x@{ub} (@{b}exchange-point-and-mark@{ub}) which puts the mark where
point was and point where the mark was.  The extent of the region is
unchanged, but the cursor and point are now at the previous location of
the mark.

   @{b}C-x C-x@{ub} is also useful when you are satisfied with the location of
point but want to move the mark; do @{b}C-x C-x@{ub} to put point there and then
you can move it.  A second use of @{b}C-x C-x@{ub}, if necessary, puts the mark
at the new location with point back at its original location.


@EndNode

@Node "Using Region" "emacs/Using Region"
@Next "Marking Objects"
@Prev "Setting Mark"
@Toc "Mark"

Operating on the Region
=======================

   Once you have created an active region, you can do many things to
the text in it:
   @{b}*@{ub} Kill it with @{b}C-w@{ub} (see @{"Killing" Link "Killing"}).

   @{b}*@{ub} Save it in a register with @{b}C-x x@{ub} (see @{"Registers" Link "Registers"}).

   @{b}*@{ub} Save it in a buffer or a file (see @{"Accumulating Text" Link "Accumulating Text"}).

   @{b}*@{ub} Convert case with @{b}C-x C-l@{ub} or @{b}C-x C-u@{ub}
     (see @{"Case" Link "Case"}).

   @{b}*@{ub} Evaluate it as Lisp code with @{b}M-x eval-region@{ub} (see @{"Lisp Eval" Link "Lisp Eval"}).

   @{b}*@{ub} Fill it as text with @{b}M-g@{ub} (see @{"Filling" Link "Filling"}).

   @{b}*@{ub} Print hardcopy with @{b}M-x print-region@{ub} (see @{"Hardcopy" Link "Hardcopy"}).

   @{b}*@{ub} Indent it with @{b}C-x TAB@{ub} or @{b}C-M-\ @{ub}
     (see @{"Indentation" Link "Indentation"}).


@EndNode

@Node "Marking Objects" "emacs/Marking Objects"
@Next "Mark Ring"
@Prev "Using Region"
@Toc "Mark"

Commands to Mark Textual Objects
================================

   There are commands for placing point and the mark around a textual
object such as a word, list, paragraph or page.

@{b}M-@@{ub}
     Set mark after end of next word (@{b}mark-word@{ub}).  This command and the
     following one do not move point.

@{b}C-M-@@{ub}
     Set mark after end of next Lisp expression (@{b}mark-sexp@{ub}).

@{b}M-h@{ub}
     Put region around current paragraph (@{b}mark-paragraph@{ub}).

@{b}C-M-h@{ub}
     Put region around current Lisp defun (@{b}mark-defun@{ub}).

@{b}C-x h@{ub}
     Put region around entire buffer (@{b}mark-whole-buffer@{ub}).

@{b}C-x C-p@{ub}
     Put region around current page (@{b}mark-page@{ub}).

   @{b}M-@@{ub} (@{b}mark-word@{ub}) puts the mark at the end of the next word, while
@{b}C-M-@@{ub} (@{b}mark-sexp@{ub}) puts it at the end of the next Lisp expression.
These characters allow you to save a little typing or redisplay,
sometimes.

   Other commands set both point and mark, to delimit an object in the
buffer.  @{b}M-h@{ub} (@{b}mark-paragraph@{ub}) moves point to the beginning of the
paragraph that surrounds or follows point, and puts the mark at the end
of that paragraph (see @{"Paragraphs" Link "Paragraphs"}).  @{b}M-h@{ub} does all that's necessary if
you wish to indent, case-convert, or kill a whole paragraph.  @{b}C-M-h@{ub}
(@{b}mark-defun@{ub}) similarly puts point before and the mark after the
current or following defun (see @{"Defuns" Link "Defuns"}).  @{b}C-x C-p@{ub} (@{b}mark-page@{ub}) puts
point before the current page (or the next or previous, according to
the argument), and mark at the end (see @{"Pages" Link "Pages"}).  The mark goes after
the terminating page delimiter (to include it), while point goes after
the preceding page delimiter (to exclude it).  Finally, @{b}C-x h@{ub}
(@{b}mark-whole-buffer@{ub}) sets up the entire buffer as the region, by
putting point at the beginning and the mark at the end.


@EndNode

@Node "Mark Ring" "emacs/Mark Ring"
@Prev "Marking Objects"
@Toc "Mark"

The Mark Ring
=============

   Aside from delimiting the region, the mark is also useful for
remembering a spot that you may want to go back to.  To make this
feature more useful, Emacs remembers 16 previous locations of the mark,
in the @{i}mark ring@{ui}.  Most commands that set the mark push the old mark
onto this ring.  To return to a marked location, use @{b}C-u C-SPC@{ub} (or @{b}C-u
C-@@{ub}); this is the command @{b}set-mark-command@{ub} given a numeric argument.
It moves point to where the mark was, and restores the mark from the
ring of former marks.  So repeated use of this command moves point to
all of the old marks on the ring, one by one.  The marks you see go to
the end of the ring, so no marks are lost.

   Each buffer has its own mark ring.  All editing commands use the
current buffer's mark ring.  In particular, @{b}C-u C-SPC@{ub} always stays in
the same buffer.

   Many commands that can move long distances, such as @{b}M-<@{ub}
(@{b}beginning-of-buffer@{ub}), start by setting the mark and saving the old
mark on the mark ring.  This is to make it easier for you to move back
later.  Searches do this except when they do not actually move point.
You can tell when a command sets the mark because @{b}Mark Set@{ub} is printed in
the echo area.

   Another way of remembering positions so you can go back to them is
with registers (see @{"RegPos" Link "RegPos"}).

   The variable @{b}mark-ring-max@{ub} is the maximum number of entries to keep
in the mark ring.  If that many entries exist and another one is
pushed, the last one in the list is discarded.  Repeating @{b}C-u C-SPC@{ub}
circulates through the limited number of entries that are currently in
the ring.

   The variable @{b}mark-ring@{ub} holds the mark ring itself, as a list of
marker objects in the order most recent first.  This variable is local
in every buffer.


@EndNode

@Node "Killing" "emacs/Killing"
@Next "Yanking"
@Prev "Mark"
@Toc "Main"

Deletion and Killing
====================

   Most commands which erase text from the buffer save it so that you
can get it back if you change your mind, or move or copy it to other
parts of the buffer.  These commands are known as @{i}kill@{ui} commands.  The
rest of the commands that erase text do not save it; they are known as
@{i}delete@{ui} commands.  (This distinction is made only for erasure of text in
the buffer.)

   The delete commands include @{b}C-d@{ub} (@{b}delete-char@{ub}) and DEL
(@{b}delete-backward-char@{ub}), which delete only one character at a time,
and those commands that delete only spaces or newlines.  Commands that
can destroy significant amounts of nontrivial data generally kill.  The
commands' names and individual descriptions use the words @{b}kill@{ub} and
@{b}delete@{ub} to say which they do.  If you do a kill or delete command by
mistake, you can use the @{b}C-x u@{ub} (@{b}undo@{ub}) command to undo it (see @{"Undo" Link "Undo"}).

Deletion
--------

@{b}C-d@{ub}
     Delete next character (@{b}delete-char@{ub}).

@{b}DEL@{ub}
     Delete previous character (@{b}delete-backward-char@{ub}).

@{b}M-\ @{ub}
     Delete spaces and tabs around point (@{b}delete-horizontal-space@{ub}).

@{b}M-SPC@{ub}
     Delete spaces and tabs around point, leaving one space
     (@{b}just-one-space@{ub}).

@{b}C-x C-o@{ub}
     Delete blank lines around the current line (@{b}delete-blank-lines@{ub}).

@{b}M-^@{ub}
     Join two lines by deleting the intervening newline, and any
     indentation following it (@{b}delete-indentation@{ub}).

   The most basic delete commands are @{b}C-d@{ub} (@{b}delete-char@{ub}) and DEL
(@{b}delete-backward-char@{ub}).  @{b}C-d@{ub} deletes the character after point, the
one the cursor is "on top of".  Point doesn't move.  DEL deletes the
character before the cursor, and moves point back.  Newlines can be
deleted like any other characters in the buffer; deleting a newline
joins two lines.  Actually, @{b}C-d@{ub} and DEL aren't always delete commands;
if given an argument, they kill instead, since they can erase more than
one character this way.

   The other delete commands are those which delete only formatting
characters: spaces, tabs and newlines.  @{b}M-\ @{ub} (@{b}delete-horizontal-space@{ub})
deletes all the spaces and tab characters before and after point.
@{b}M-SPC@{ub} (@{b}just-one-space@{ub}) does likewise but leaves a single space
after point, regardless of the number of spaces that existed previously
(even zero).

   @{b}C-x C-o@{ub} (@{b}delete-blank-lines@{ub}) deletes all blank lines after the
current line, and if the current line is blank deletes all blank lines
preceding the current line as well (leaving one blank line, the current
line).  @{b}M-^@{ub} (@{b}delete-indentation@{ub}) joins the current line and the
previous line, or the current line and the next line if given an
argument, by deleting a newline and all surrounding spaces, possibly
leaving a single space.  See @{"M-^" Link "Indentation"}.

Killing by Lines
----------------

@{b}C-k@{ub}
     Kill rest of line or one or more lines (@{b}kill-line@{ub}).

   The simplest kill command is @{b}C-k@{ub}.  If given at the beginning of a
line, it kills all the text on the line, leaving it blank.  If given on
a blank line, the blank line disappears.  As a consequence, if you go
to the front of a non-blank line and type @{b}C-k@{ub} twice, the line disappears
completely.

   More generally, @{b}C-k@{ub} kills from point up to the end of the line,
unless it is at the end of a line.  In that case it kills the newline
following the line, thus merging the next line into the current one.
Invisible spaces and tabs at the end of the line are ignored when
deciding which case applies, so if point appears to be at the end of
the line, you can be sure the newline will be killed.

   If @{b}C-k@{ub} is given a positive argument, it kills that many lines and
the newlines that follow them (however, text on the current line before
point is spared).  With a negative argument, it kills back to a number
of line beginnings.  An argument of -2 means kill back to the second
line beginning.  If point is at the beginning of a line, that line
beginning doesn't count, so @{b}C-u - 2 C-k@{ub} with point at the front of a
line kills the two previous lines.

   @{b}C-k@{ub} with an argument of zero kills all the text before point on the
current line.

Other Kill Commands
-------------------

@{b}C-w@{ub}
     Kill region (from point to the mark) (@{b}kill-region@{ub}).  See @{"Words" Link "Words"}.

@{b}M-d@{ub}
     Kill word (@{b}kill-word@{ub}).

@{b}M-DEL@{ub}
     Kill word backwards (@{b}backward-kill-word@{ub}).

@{b}C-x DEL@{ub}
     Kill back to beginning of sentence (@{b}backward-kill-sentence@{ub}).  See
     @{"Sentences" Link "Sentences"}.

@{b}M-k@{ub}
     Kill to end of sentence (@{b}kill-sentence@{ub}).

@{b}C-M-k@{ub}
     Kill sexp (@{b}kill-sexp@{ub}).  See @{"Lists" Link "Lists"}.

@{b}M-z @{i}char@{ui}@{ub}
     Kill up to next occurrence of @{i}char@{ui} (@{b}zap-to-char@{ub}).

   A kill command which is very general is @{b}C-w@{ub} (@{b}kill-region@{ub}), which
kills everything between point and the mark.  With this command, you
can kill any contiguous sequence of characters, if you first set the
mark at one end of them and go to the other end.

   A convenient way of killing is combined with searching: @{b}M-z@{ub}
(@{b}zap-to-char@{ub}) reads a character and kills from point up to (but not
including) the next occurrence of that character in the buffer.  If
there is no next occurrence, killing goes to the end of the buffer.  A
numeric argument acts as a repeat count.  A negative argument means to
search backward and kill text before point.

   Other syntactic units can be killed: words, with @{b}M-DEL@{ub} and @{b}M-d@{ub} (see
@{"Words" Link "Words"}); sexps, with @{b}C-M-k@{ub} (see @{"Lists" Link "Lists"}); and sentences, with @{b}C-x DEL@{ub} and
@{b}M-k@{ub} (see @{"Sentences" Link "Sentences"}).


@EndNode

@Node "Yanking" "emacs/Yanking"
@Next "Accumulating Text"
@Prev "Killing"
@Toc "Main"

Yanking
=======

   @{i}Yanking@{ui} is getting back text which was killed.  This is what some
systems call "pasting".  The usual way to move or copy text is to kill
it and then yank it one or more times.

@{b}C-y@{ub}
     Yank last killed text (@{b}yank@{ub}).

@{b}M-y@{ub}
     Replace re-inserted killed text with the previously killed text
     (@{b}yank-pop@{ub}).

@{b}M-w@{ub}
     Save region as last killed text without actually killing it
     (@{b}copy-region-as-kill@{ub}).

@{b}C-M-w@{ub}
     Append next kill to last batch of killed text (@{b}append-next-kill@{ub}).


 @{" Kill Ring " Link "Kill Ring"}        Where killed text is stored.  Basic yanking.
 @{" Appending Kills " Link "Appending Kills"}  Several kills in a row all yank together.
 @{" Earlier Kills " Link "Earlier Kills"}    Yanking something killed some time ago.


@EndNode

@Node "Kill Ring" "emacs/Kill Ring"
@Next "Appending Kills"
@Prev "Yanking"
@Toc "Yanking"

The Kill Ring
-------------

   All killed text is recorded in the @{i}kill ring@{ui}, a list of blocks of
text that have been killed.  There is only one kill ring, used in all
buffers, so you can kill text in one buffer and yank it in another
buffer.  This is the usual way to move text from one file to another.
(See @{"Accumulating Text" Link "Accumulating Text"}, for some other ways.)

   The command @{b}C-y@{ub} (@{b}yank@{ub}) reinserts the text of the most recent kill.
It leaves the cursor at the end of the text.  It sets the mark at the
beginning of the text.  See @{"Mark" Link "Mark"}.

   @{b}C-u C-y@{ub} leaves the cursor in front of the text, and sets the mark
after it.  This is only if the argument is specified with just a @{b}C-u@{ub},
precisely.  Any other sort of argument, including @{b}C-u@{ub} and digits, has
an effect described below (under "Yanking Earlier Kills").

   If you wish to copy a block of text, you might want to use @{b}M-w@{ub}
(@{b}copy-region-as-kill@{ub}), which copies the region into the kill ring
without removing it from the buffer.  This is approximately equivalent
to @{b}C-w@{ub} followed by @{b}C-y@{ub}, except that @{b}M-w@{ub} does not mark the buffer as
"modified" and does not temporarily change the screen.


@EndNode

@Node "Appending Kills" "emacs/Appending Kills"
@Next "Earlier Kills"
@Prev "Kill Ring"
@Toc "Yanking"

Appending Kills
---------------

   Normally, each kill command pushes a new block onto the kill ring.
However, two or more kill commands in a row combine their text into a
single entry, so that a single @{b}C-y@{ub} gets it all back as it was before it
was killed.  This means that you don't have to kill all the text in one
command; you can keep killing line after line, or word after word, until
you have killed it all, and you can still get it all back at once.
(Thus we join television in leading people to kill thoughtlessly.)

   Commands that kill forward from point add onto the end of the
previous killed text.  Commands that kill backward from point add onto
the beginning.  This way, any sequence of mixed forward and backward
kill commands puts all the killed text into one entry without
rearrangement.  Numeric arguments do not break the sequence of
appending kills.  For example, suppose the buffer contains

     This is the first
     line of sample text
     and here is the third.

with point at the beginning of the second line.  If you type @{b}C-k C-u 2
M-DEL C-k@{ub}, the first @{b}C-k@{ub} kills the text @{b}line of sample text@{ub}, @{b}C-u 2
M-DEL@{ub} kills @{b}the first@{ub} with the newline that followed it, and the
second @{b}C-k@{ub} kills the newline after the second line.  The result is that
the buffer contains @{b}This is and here is the third.@{ub} and a single kill
entry contains @{b}the firstRETline of sample textRET@{ub}--all the killed text,
in its original order.

   If a kill command is separated from the last kill command by other
commands (not just numeric arguments), it starts a new entry on the kill
ring.  But you can force it to append by first typing the command @{b}C-M-w@{ub}
(@{b}append-next-kill@{ub}) in front of it.  The @{b}C-M-w@{ub} tells the following
command, if it is a kill command, to append the text it kills to the
last killed text, instead of starting a new entry.  With @{b}C-M-w@{ub}, you can
kill several separated pieces of text and accumulate them to be yanked
back in one place.


@EndNode

@Node "Earlier Kills" "emacs/Earlier Kills"
@Prev "Appending Kills"
@Toc "Yanking"

Yanking Earlier Kills
---------------------

   To recover killed text that is no longer the most recent kill, you
need the @{b}Meta-y@{ub} (@{b}yank-pop@{ub}) command.  @{b}M-y@{ub} can be used only after a @{b}C-y@{ub}
or another @{b}M-y@{ub}.  It takes the text previously yanked and replaces it
with the text from an earlier kill.  So, to recover the text of the
next-to-the-last kill, you first use @{b}C-y@{ub} to recover the last kill, and
then use @{b}M-y@{ub} to replace it with the previous kill.

   You can think in terms of a "last yank" pointer which points at an
item in the kill ring.  Each time you kill, the "last yank" pointer
moves to the newly made item at the front of the ring.  @{b}C-y@{ub} yanks the
item which the "last yank" pointer points to.  @{b}M-y@{ub} moves the "last
yank" pointer to a different item, and the text in the buffer changes to
match.  Enough @{b}M-y@{ub} commands can move the pointer to any item in the ring, so
you can get any item into the buffer.  Eventually the pointer reaches
the end of the ring; the next @{b}M-y@{ub} moves it to the first item again.

   Yanking moves the "last yank" pointer around the ring, but it does
not change the order of the entries in the ring, which always runs from
the most recent kill at the front to the oldest one still remembered.

   @{b}M-y@{ub} can take a numeric argument, which tells it how many items to
advance the "last yank" pointer by.  A negative argument moves the
pointer toward the front of the ring; from the front of the ring, it
moves to the last entry and starts moving forward from there.

   Once the text you are looking for is brought into the buffer, you can
stop doing @{b}M-y@{ub} commands and it will stay there.  It's just a copy of
the kill ring item, so editing it in the buffer does not change what's
in the ring.  As long as no new killing is done, the "last yank" pointer
remains at the same place in the kill ring, so repeating @{b}C-y@{ub} will yank
another copy of the same old kill.

   If you know how many @{b}M-y@{ub} commands it would take to find the text you
want, you can yank that text in one step using @{b}C-y@{ub} with a numeric
argument.  @{b}C-y@{ub} with an argument greater than one restores the text the
specified number of entries back in the kill ring.  Thus, @{b}C-u 2 C-y@{ub}
gets the next to the last block of killed text.  It is equivalent to
@{b}C-y M-y@{ub}.  @{b}C-y@{ub} with a numeric argument starts counting from the "last
yank" pointer, and sets the "last yank" pointer to the entry that it
yanks.

   The length of the kill ring is controlled by the variable
@{b}kill-ring-max@{ub}; no more than that many blocks of killed text are saved.


@EndNode

@Node "Accumulating Text" "emacs/Accumulating Text"
@Next "Rectangles"
@Prev "Yanking"
@Toc "Main"

Accumulating Text
=================

   Usually we copy or move text by killing it and yanking it, but there
are other ways that are useful for copying one block of text in many
places, or for copying many scattered blocks of text into one place.

   You can accumulate blocks of text from scattered locations either
into a buffer or into a file if you like.  These commands are described
here.  You can also use Emacs registers for storing and accumulating
text.  See @{"Registers" Link "Registers"}.

@{b}C-x a@{ub}
     Append region to contents of specified buffer (@{b}append-to-buffer@{ub}).

@{b}M-x prepend-to-buffer@{ub}
     Prepend region to contents of specified buffer.

@{b}M-x copy-to-buffer@{ub}
     Copy region into specified buffer, deleting that buffer's old
     contents.

@{b}M-x insert-buffer@{ub}
     Insert contents of specified buffer into current buffer at point.

@{b}M-x append-to-file@{ub}
     Append region to contents of specified file, at the end.

   To accumulate text into a buffer, use the command @{b}C-x a @{i}buffername@{ui}@{ub}
(@{b}append-to-buffer@{ub}), which inserts a copy of the region into the
buffer @{i}buffername@{ui}, at the location of point in that buffer.  If there
is no buffer with that name, one is created.  If you append text into a
buffer which has been used for editing, the copied text goes into the
middle of the text of the buffer, wherever point happens to be in it.

   Point in that buffer is left at the end of the copied text, so
successive uses of @{b}C-x a@{ub} accumulate the text in the specified buffer in
the same order as they were copied.  Strictly speaking, @{b}C-x a@{ub} does not
always append to the text already in the buffer; but if @{b}C-x a@{ub} is the
only command used to alter a buffer, it does always append to the
existing text because point is always at the end.

   @{b}M-x prepend-to-buffer@{ub} is just like @{b}C-x a@{ub} except that point in the
other buffer is left before the copied text, so successive prependings
add text in reverse order.  @{b}M-x copy-to-buffer@{ub} is similar except that
any existing text in the other buffer is deleted, so the buffer is left
containing just the text newly copied into it.

   You can retrieve the accumulated text from that buffer with @{b}M-x
insert-buffer@{ub}; this too takes @{i}buffername@{ui} as an argument.  It inserts a
copy of the text in buffer @{i}buffername@{ui} into the selected buffer.  You
could alternatively select the other buffer for editing, perhaps moving
text from it by killing or with @{b}C-x a@{ub}.  See @{"Buffers" Link "Buffers"}, for background
information on buffers.

   Instead of accumulating text within Emacs, in a buffer, you can
append text directly into a file with @{b}M-x append-to-file@{ub}, which takes
@{i}file-name@{ui} as an argument.  It adds the text of the region to the end of
the specified file.  The file is changed immediately on disk. This
command is normally used with files that are @{i}not@{ui} being visited in
Emacs.  Using it on a file that Emacs is visiting can produce confusing
results, because the text inside Emacs for that file will not change
while the file itself changes.


@EndNode

@Node "Rectangles" "emacs/Rectangles"
@Next "Registers"
@Prev "Accumulating Text"
@Toc "Main"

Rectangles
==========

   The rectangle commands affect rectangular areas of the text: all the
characters between a certain pair of columns, in a certain range of
lines.  Commands are provided to kill rectangles, yank killed
rectangles, clear them out, or delete them.  Rectangle commands are
useful with text in multicolumnar formats, such as perhaps code with
comments at the right, or for changing text into or out of such formats.

   When you must specify a rectangle for a command to work on, you do
it by putting the mark at one corner and point at the opposite corner.
The rectangle thus specified is called the @{i}region-rectangle@{ui} because it
is controlled about the same way the region is controlled.  But
remember that a given combination of point and mark values can be
interpreted either as specifying a region or as specifying a rectangle;
it is up to the command that uses them to choose the interpretation.

@{b}M-x delete-rectangle@{ub}
     Delete the text of the region-rectangle, moving any following text
     on each line leftward to the left edge of the region-rectangle.

@{b}M-x kill-rectangle@{ub}
     Similar, but also save the contents of the region-rectangle as the
     "last killed rectangle".

@{b}M-x yank-rectangle@{ub}
     Yank the last killed rectangle with its upper left corner at point.

@{b}M-x open-rectangle@{ub}
     Insert blank space to fill the space of the region-rectangle.  The
     previous contents of the region-rectangle are pushed rightward.

@{b}M-x clear-rectangle@{ub}
     Clear the region-rectangle by replacing its contents with spaces.

   The rectangle operations fall into two classes: commands deleting and
moving rectangles, and commands for blank rectangles.

   There are two ways to get rid of the text in a rectangle: you can
discard the text (delete it) or save it as the "last killed" rectangle.
The commands for these two ways are @{b}M-x delete-rectangle@{ub} and @{b}M-x
kill-rectangle@{ub}.  In either case, the portion of each line that falls
inside the rectangle's boundaries is deleted, causing following text
(if any) on the line to move left.

   Note that "killing" a rectangle is not killing in the usual sense;
the rectangle is not stored in the kill ring, but in a special place
that can only record the most recent rectangle killed.  This is because
yanking a rectangle is so different from yanking linear text that different
yank commands have to be used and yank-popping is hard to make sense of.

   Inserting a rectangle is the opposite of deleting one.  All you need
to specify is where to put the upper left corner; that is done by
putting point there.  The rectangle's first line is inserted there, the
rectangle's second line is inserted at a point one line vertically
down, and so on.  The number of lines affected is determined by the
height of the saved rectangle.

   To insert the last killed rectangle, type @{b}M-x yank-rectangle@{ub}.  This
can be used to convert single-column lists into double-column lists;
kill the second half of the list as a rectangle and then yank it beside
the first line of the list.

   There are two commands for working with blank rectangles: @{b}M-x
clear-rectangle@{ub} to blank out existing text, and @{b}M-x open-rectangle@{ub} to
insert a blank rectangle.  Clearing a rectangle is equivalent to
deleting it and then inserting as blank rectangle of the same size.

   Rectangles can also be copied into and out of registers.  See
@{"Rectangle Registers" Link "RegRect"}.


@EndNode

@Node "Registers" "emacs/Registers"
@Next "Display"
@Prev "Rectangles"
@Toc "Main"

Registers
*********

   Emacs @{i}registers@{ui} are places you can save text or positions for later
use.  Text saved in a register can be copied into the buffer once or
many times; a position saved in a register is used by moving point to
that position.  Rectangles can also be copied into and out of registers
(see @{"Rectangles" Link "Rectangles"}).

   Each register has a name, which is a single character.  A register
can store either a piece of text or a position or a rectangle, but only
one thing at any given time.  Whatever you store in a register remains
there until you store something else in that register.


 @{" RegPos " Link "RegPos"}     Saving positions in registers.
 @{" RegText " Link "RegText"}    Saving text in registers.
 @{" RegRect " Link "RegRect"}    Saving rectangles in registers.

@{b}M-x view-register RET @{i}r@{ui}@{ub}
     Display a description of what register @{i}r@{ui} contains.

   @{b}M-x view-register@{ub} reads a register name as an argument and then
displays the contents of the specified register.


@EndNode

@Node "RegPos" "emacs/RegPos"
@Next "RegText"
@Prev "Registers"
@Toc "Registers"

Saving Positions in Registers
=============================

   Saving a position records a spot in a buffer so that you can move
back there later.  Moving to a saved position reselects the buffer and
moves point to the spot.

@{b}C-x / @{i}r@{ui}@{ub}
     Save location of point in register @{i}r@{ui} (@{b}point-to-register@{ub}).

@{b}C-x j @{i}r@{ui}@{ub}
     Jump to the location saved in register @{i}r@{ui} (@{b}register-to-point@{ub}).

   To save the current location of point in a register, choose a name @{i}r@{ui}
and type @{b}C-x / @{i}r@{ui}@{ub}.  The register @{i}r@{ui} retains the location thus saved until
you store something else in that register.

   The command @{b}C-x j @{i}r@{ui}@{ub} moves point to the location recorded in register
@{i}r@{ui}.  The register is not affected; it continues to record the same
location.  You can jump to the same position using the same register
any number of times.


@EndNode

@Node "RegText" "emacs/RegText"
@Next "RegRect"
@Prev "RegPos"
@Toc "Registers"

Saving Text in Registers
========================

   When you want to insert a copy of the same piece of text frequently,
it may be impractical to use the kill ring, since each subsequent kill
moves the piece of text further down on the ring.  It becomes hard to
keep track of what argument is needed to retrieve the same text with
@{b}C-y@{ub}.  An alternative is to store the text in a register with @{b}C-x x@{ub}
(@{b}copy-to-register@{ub}) and then retrieve it with @{b}C-x g@{ub}
(@{b}insert-register@{ub}).

@{b}C-x x @{i}r@{ui}@{ub}
     Copy region into register @{i}r@{ui} (@{b}copy-to-register@{ub}).

@{b}C-x g @{i}r@{ui}@{ub}
     Insert text contents of register @{i}r@{ui} (@{b}insert-register@{ub}).

   @{b}C-x x @{i}r@{ui}@{ub} stores a copy of the text of the region into the register
named @{i}r@{ui}.  Given a numeric argument, @{b}C-x x@{ub} deletes the text from the
buffer as well.

   @{b}C-x g @{i}r@{ui}@{ub} inserts in the buffer the text from register @{i}r@{ui}.  Normally it
leaves point before the text and places the mark after, but with a
numeric argument it puts point after the text and the mark before.


@EndNode

@Node "RegRect" "emacs/RegRect"
@Prev "RegText"
@Toc "Registers"

Saving Rectangles in Registers
==============================

   A register can contain a rectangle instead of linear text.  The
rectangle is represented as a list of strings.  See @{"Rectangles" Link "Rectangles"}, for
basic information on rectangles and how rectangles in the buffer are
specified.

@{b}C-x r @{i}r@{ui}@{ub}
     Copy the region-rectangle into register @{i}r@{ui}
     (@{b}copy-region-to-rectangle@{ub}).  With numeric argument,
     delete it as well.

@{b}C-x g @{i}r@{ui}@{ub}
     Insert the rectangle stored in register @{i}r@{ui} (if it contains a
     rectangle) (@{b}insert-register@{ub}).

   The @{b}C-x g@{ub} command inserts linear text if the register contains that,
or inserts a rectangle if the register contains one.


@EndNode

@Node "Display" "emacs/Display"
@Next "Search"
@Prev "Registers"
@Toc "Main"

Controlling the Display
***********************

   Since only part of a large buffer fits in the window, Emacs tries to
show the part that is likely to be interesting.  The display control
commands allow you to specify which part of the text you want to see.

@{b}C-l@{ub}
     Clear screen and redisplay, scrolling the selected window to center
     point vertically within it (@{b}recenter@{ub}).

@{b}C-v@{ub}
     Scroll forward (a windowful or a specified number of lines)
     (@{b}scroll-up@{ub}).

@{b}M-v@{ub}
     Scroll backward (@{b}scroll-down@{ub}).

@{b}@{i}arg@{ui} C-l@{ub}
     Scroll so point is on line @{i}arg@{ui} (@{b}recenter@{ub}).

@{b}C-x <@{ub}
     Scroll text in current window to the left (@{b}scroll-left@{ub}).

@{b}C-x >@{ub}
     Scroll to the right (@{b}scroll-right@{ub}).

@{b}C-x $@{ub}
     Make deeply indented lines invisible (@{b}set-selective-display@{ub}).


 @{" Scrolling " Link "Scrolling"} 	           Moving text up and down in a window.
 @{" Horizontal Scrolling " Link "Horizontal Scrolling"}    Moving text left and right in a window.
 @{" Selective Display " Link "Selective Display"}       Hiding lines with lots of indentation.
 @{" Display Vars " Link "Display Vars"}            Information on variables for customizing display.


@EndNode

@Node "Scrolling" "emacs/Scrolling"
@Next "Horizontal Scrolling"
@Prev "Display"
@Toc "Display"

Scrolling
=========

   If a buffer contains text that is too large to fit entirely within a
window that is displaying the buffer, Emacs shows a contiguous section
of the text.  The section shown always contains point.

   @{i}Scrolling@{ui} means moving text up or down in the window so that
different parts of the text are visible.  Scrolling forward means that
text moves up, and new text appears at the bottom.  Scrolling backward
moves text down and new text appears at the top.

   Scrolling happens automatically if you move point past the bottom or
top of the window.  You can also explicitly request scrolling with the
commands in this section.

@{b}C-l@{ub}
     Clear screen and redisplay, scrolling the selected window to center
     point vertically within it (@{b}recenter@{ub}).

@{b}C-v@{ub}
     Scroll forward (a windowful or a specified number of lines)
     (@{b}scroll-up@{ub}).

@{b}M-v@{ub}
     Scroll backward (@{b}scroll-down@{ub}).

@{b}@{i}arg@{ui} C-l@{ub}
     Scroll so point is on line @{i}arg@{ui} (@{b}recenter@{ub}).

   The most basic scrolling command is @{b}C-l@{ub} (@{b}recenter@{ub}) with no argument.
It clears the entire screen and redisplays all windows.  In addition,
the selected window is scrolled so that point is halfway down from the
top of the window.

   The scrolling commands @{b}C-v@{ub} and @{b}M-v@{ub} let you move all the text in the
window up or down a few lines.  @{b}C-v@{ub} (@{b}scroll-up@{ub}) with an argument shows
you that many more lines at the bottom of the window, moving the text
and point up together as @{b}C-l@{ub} might.  @{b}C-v@{ub} with a negative argument shows
you more lines at the top of the window.  @{b}Meta-v@{ub} (@{b}scroll-down@{ub}) is like
@{b}C-v@{ub}, but moves in the opposite direction.

   To read the buffer a windowful at a time, use @{b}C-v@{ub} with no argument.
It takes the last two lines at the bottom of the window and puts them at
the top, followed by nearly a whole windowful of lines not previously
visible.  If point was in the text scrolled off the top, it moves to the
new top of the window.  @{b}M-v@{ub} with no argument moves backward with
overlap similarly.  The number of lines of overlap across a @{b}C-v@{ub} or @{b}M-v@{ub}
is controlled by the variable @{b}next-screen-context-lines@{ub}; by default, it
is two.

   Another way to do scrolling is with @{b}C-l@{ub} with a numeric argument.
@{b}C-l@{ub} does not clear the screen when given an argument; it only
scrolls the selected window.  With a positive argument @{i}n@{ui}, it
repositions text to put point @{i}n@{ui} lines down from the top.  An argument
of zero puts point on the very top line.  Point does not move with
respect to the text; rather, the text and point move rigidly on the
screen.  @{b}C-l@{ub} with a negative argument puts point that many lines from
the bottom of the window.  For example, @{b}C-u - 1 C-l@{ub} puts point on the
bottom line, and @{b}C-u - 5 C-l@{ub} puts it five lines from the bottom.  Just
@{b}C-u@{ub} as argument, as in @{b}C-u C-l@{ub}, scrolls point to the center of the
screen.

   Scrolling happens automatically if point has moved out of the visible
portion of the text when it is time to display.  Usually the scrolling
is done so as to put point vertically centered within the window.
However, if the variable @{b}scroll-step@{ub} has a nonzero value, an attempt is
made to scroll the buffer by that many lines; if that is enough to
bring point back into visibility, that is what is done.


@EndNode

@Node "Horizontal Scrolling" "emacs/Horizontal Scrolling"
@Prev "Scrolling"
@Toc "Display"

Horizontal Scrolling
====================

@{b}C-x <@{ub}
     Scroll text in current window to the left (@{b}scroll-left@{ub}).

@{b}C-x >@{ub}
     Scroll to the right (@{b}scroll-right@{ub}).

   The text in a window can also be scrolled horizontally.  This means
that each line of text is shifted sideways in the window, and one or
more characters at the beginning of each line are not displayed at all.
When a window has been scrolled horizontally in this way, text lines
are truncated rather than continued (see @{"Continuation Lines" Link "Continuation Lines"}), with a @{b}$@{ub}
appearing in the first column when there is text truncated to the left,
and in the last column when there is text truncated to the right.

   The command @{b}C-x <@{ub} (@{b}scroll-left@{ub}) scrolls the selected window to the
left by @{i}n@{ui} columns with argument @{i}n@{ui}.  With no argument, it scrolls by
almost the full width of the window (two columns less, to be precise).
@{b}C-x >@{ub} (@{b}scroll-right@{ub}) scrolls similarly to the right.  The window cannot
be scrolled any farther to the right once it is displaying normally
(with each line starting at the window's left margin); attempting to do
so has no effect.


@EndNode

@Node "Selective Display" "emacs/Selective Display"
@Next "Display Vars"
@Prev "Display"
@Toc "Display"

Selective Display
=================

   Emacs has the ability to hide lines indented more than a certain
number of columns (you specify how many columns).  You can use this to
get an overview of a part of a program.

   To hide lines, type @{b}C-x $@{ub} (@{b}set-selective-display@{ub}) with a numeric
argument @{i}n@{ui}.  (See @{"Arguments" Link "Arguments"}, for how to give the argument.)  Then lines
with at least @{i}n@{ui} columns of indentation disappear from the screen.  The
only indication of their presence is that three dots (@{b}...@{ub}) appear at
the end of each visible line that is followed by one or more invisible
ones.

   The invisible lines are still present in the buffer, and most editing
commands see them as usual, so it is very easy to put point in the
middle of invisible text.  When this happens, the cursor appears at the
end of the previous line, after the three dots.  If point is at the end
of the visible line, before the newline that ends it, the cursor
appears before the three dots.

   The commands @{b}C-n@{ub} and @{b}C-p@{ub} move across the invisible lines as if they
were not there.

   To make everything visible again, type @{b}C-x $@{ub} with no argument.


@EndNode

@Node "Display Vars" "emacs/Display Vars"
@Prev "Selective Display"
@Toc "Display"

Variables Controlling Display
=============================

   This section contains information for customization only.  Beginning
users should skip it.

   The variable @{b}mode-line-inverse-video@{ub} controls whether the mode line
is displayed in inverse video (assuming the terminal supports it); @{b}nil@{ub}
means don't do so.  See @{"Mode Line" Link "Mode Line"}.

   If the variable @{b}inverse-video@{ub} is non-@{b}nil@{ub}, Emacs attempts to invert
all the lines of the display from what they normally are.

   If the variable @{b}visible-bell@{ub} is non-@{b}nil@{ub}, Emacs attempts to make the
whole screen blink when it would normally make an audible bell sound.
This variable has no effect if your terminal does not have a way to
make the screen blink.

   When you reenter Emacs after suspending, Emacs normally clears the
screen and redraws the entire display.  On some terminals with more
than one page of memory, it is possible to arrange the termcap entry so
that the @{b}ti@{ub} and @{b}te@{ub} strings (output to the terminal when Emacs is
entered and exited, respectively) switch between pages of memory so as
to use one page for Emacs and another page for other output.  Then you
might want to set the variable @{b}no-redraw-on-reenter@{ub} non-@{b}nil@{ub} so that
Emacs will assume, when resumed, that the screen page it is using still
contains what Emacs last wrote there.

   The variable @{b}echo-keystrokes@{ub} controls the echoing of multi-character
keys; its value is the number of seconds of pause required to cause
echoing to start, or zero meaning don't echo at all.  See @{"Echo Area" Link "Echo Area"}.

   If the variable @{b}ctl-arrow@{ub} is @{b}nil@{ub}, control characters in the buffer
are displayed with octal escape sequences, all except newline and tab.
Altering the value of @{b}ctl-arrow@{ub} makes it local to the current buffer;
until that time, the default value is in effect.  The default is
initially @{b}t@{ub}.  See @{"Locals" Link "Locals"}.

   Normally, a tab character in the buffer is displayed as whitespace
which extends to the next display tab stop position, and display tab
stops come at intervals equal to eight spaces.  The number of spaces
per tab is controlled by the variable @{b}tab-width@{ub}, which is made local by
changing it, just like @{b}ctl-arrow@{ub}.  Note that how the tab character in
the buffer is displayed has nothing to do with the definition of TAB as
a command.

   If you set the variable @{b}selective-display-ellipses@{ub} to @{b}nil@{ub}, the three
dots do not appear at the end of a line that precedes invisible lines.
Then there is no visible indication of the invisible lines.  This
variable too becomes local automatically when set.


@EndNode

@Node "Search" "emacs/Search"
@Next "Fixit"
@Prev "Display"
@Toc "Main"

Searching and Replacement
*************************

   Like other editors, Emacs has commands for searching for occurrences
of a string.  The principal search command is unusual in that it is
@{i}incremental@{ui}; it begins to search before you have finished typing the
search string.  There are also nonincremental search commands more like
those of other editors.

   Besides the usual @{b}replace-string@{ub} command that finds all occurrences
of one string and replaces them with another, Emacs has a fancy
replacement command called @{b}query-replace@{ub} which asks interactively which
occurrences to replace.


 @{" Incremental Search " Link "Incremental Search"}      Search happens as you type the string.
 @{" Nonincremental Search " Link "Nonincremental Search"}   Specify entire string and then search.
 @{" Word Search " Link "Word Search"}             Search for sequence of words.
 @{" Regexp Search " Link "Regexp Search"}           Search for match for a regexp.
 @{" Regexps " Link "Regexps"}                 Syntax of regular expressions.
 @{" Search Case " Link "Search Case"}             To ignore case while searching, or not.
 @{" Replace " Link "Replace"}                 Search, and replace some or all matches.
 @{" Other Repeating Search " Link "Other Repeating Search"}  Operating on all matches for some regexp.


@EndNode

@Node "Incremental Search" "emacs/Incremental Search"
@Next "Nonincremental Search"
@Prev "Search"
@Toc "Search"

Incremental Search
==================

   An incremental search begins searching as soon as you type the first
character of the search string.  As you type in the search string, Emacs
shows you where the string (as you have typed it so far) would be found.
When you have typed enough characters to identify the place you want,
you can stop.  Depending on what you will do next, you may or may not
need to terminate the search explicitly with an ESC first.

@{b}C-s@{ub}
     Incremental search forward (@{b}isearch-forward@{ub}).

@{b}C-r@{ub}
     Incremental search backward (@{b}isearch-backward@{ub}).

   @{b}C-s@{ub} starts an incremental search.  @{b}C-s@{ub} reads characters from the
keyboard and positions the cursor at the first occurrence of the
characters that you have typed.  If you type @{b}C-s@{ub} and then @{b}F@{ub}, the cursor
moves right after the first @{b}F@{ub}.  Type an @{b}O@{ub}, and see the cursor move to
after the first @{b}FO@{ub}.  After another @{b}O@{ub}, the cursor is after the first @{b}FOO@{ub}
after the place where you started the search.  Meanwhile, the search
string @{b}FOO@{ub} has been echoed in the echo area.

   The echo area display ends with three dots when actual searching is
going on.  When search is waiting for more input, the three dots are
removed.  (On slow terminals, the three dots are not displayed.)

   If you make a mistake in typing the search string, you can erase
characters with DEL.  Each DEL cancels the last character of search
string.  This does not happen until Emacs is ready to read another
input character; first it must either find, or fail to find, the
character you want to erase.  If you do not want to wait for this to
happen, use @{b}C-g@{ub} as described below.

   When you are satisfied with the place you have reached, you can type
ESC, which stops searching, leaving the cursor where the search brought
it.  Also, any command not specially meaningful in searches stops the
searching and is then executed.  Thus, typing @{b}C-a@{ub} would exit the search
and then move to the beginning of the line.  ESC is necessary only if
the next command you want to type is a printing character, DEL, ESC, or
another control character that is special within searches (@{b}C-q@{ub}, @{b}C-w@{ub},
@{b}C-r@{ub}, @{b}C-s@{ub} or @{b}C-y@{ub}).

   Sometimes you search for @{b}FOO@{ub} and find it, but not the one you
expected to find.  There was a second @{b}FOO@{ub} that you forgot about, before
the one you were looking for.  In this event, type another @{b}C-s@{ub} to move
to the next occurrence of the search string.  This can be done any
number of times.  If you overshoot, you can cancel some @{b}C-s@{ub} characters
with DEL.

   After you exit a search, you can search for the same string again by
typing just @{b}C-s C-s@{ub}: the first @{b}C-s@{ub} is the key that invokes incremental
search, and the second @{b}C-s@{ub} means "search again".

   If your string is not found at all, the echo area says @{b}Failing
I-Search@{ub}.  The cursor is after the place where Emacs found as much of
your string as it could.  Thus, if you search for @{b}FOOT@{ub}, and there is no
@{b}FOOT@{ub}, you might see the cursor after the @{b}FOO@{ub} in @{b}FOOL@{ub}.  At this point
there are several things you can do.  If your string was mistyped, you
can rub some of it out and correct it.  If you like the place you have
found, you can type ESC or some other Emacs command to "accept what the
search offered".  Or you can type @{b}C-g@{ub}, which removes from the search
string the characters that could not be found (the @{b}T@{ub} in @{b}FOOT@{ub}), leaving
those that were found (the @{b}FOO@{ub} in @{b}FOOT@{ub}).  A second @{b}C-g@{ub} at that point
cancels the search entirely, returning point to where it was when the
search started.

   If a search is failing and you ask to repeat it by typing another
@{b}C-s@{ub}, it starts again from the beginning of the buffer.  Repeating a
failing reverse search with @{b}C-r@{ub} starts again from the end.  This is
called @{i}wrapping around@{ui}.  @{b}Wrapped@{ub} appears in the search prompt once this
has happened.

   The @{b}C-g@{ub} "quit" character does special things during searches; just
what it does depends on the status of the search.  If the search has
found what you specified and is waiting for input, @{b}C-g@{ub} cancels the
entire search.  The cursor moves back to where you started the search.
If @{b}C-g@{ub} is typed when there are characters in the search string that have
not been found--because Emacs is still searching for them, or because it
has failed to find them--then the search string characters which have
not been found are discarded from the search string.  With them gone,
the search is now successful and waiting for more input, so a second @{b}C-g@{ub}
will cancel the entire search.

   To search for a control character such as @{b}C-s@{ub} or DEL or ESC, you
must quote it by typing @{b}C-q@{ub} first.  This function of @{b}C-q@{ub} is analogous
to its meaning as an Emacs command: it causes the following character
to be treated the way a graphic character would normally be treated in
the same context.  You can also specify a quoted character in octal
while searching, just as you can for insertion.  See @{"Basic" Link "Basic"}.

   You can change to searching backwards with @{b}C-r@{ub}.  If a search fails
because the place you started was too late in the file, you should do
this.  Repeated @{b}C-r@{ub} keeps looking for more occurrences backwards.  A
@{b}C-s@{ub} starts going forwards again.  @{b}C-r@{ub} in a search can be cancelled
with DEL.

   If you know initially that you want to search backwards, you can use
@{b}C-r@{ub} instead of @{b}C-s@{ub} to start the search, because @{b}C-r@{ub} is also a key
running a command (@{b}isearch-backward@{ub}) to search backward.

   The characters @{b}C-y@{ub} and @{b}C-w@{ub} can be used in incremental search to grab
text from the buffer into the search string.  This makes it convenient
to search for another occurrence of text at point.  @{b}C-w@{ub} copies the word
after point as part of the search string, advancing point over that
word.  Another @{b}C-s@{ub} to repeat the search will then search for a string
including that word.  @{b}C-y@{ub} is similar to @{b}C-w@{ub} but copies all the rest of
the current line into the search string.

   All the characters special in incremental search can be changed by
setting the following variables:

@{b}search-delete-char@{ub}
     Character to delete from incremental search string (normally DEL).

@{b}search-exit-char@{ub}
     Character to exit incremental search (normally ESC).

@{b}search-quote-char@{ub}
     Character to quote special characters for incremental search
     (normally @{b}C-q@{ub}).

@{b}search-repeat-char@{ub}
     Character to repeat incremental search forwards (normally @{b}C-s@{ub}).

@{b}search-reverse-char@{ub}
     Character to repeat incremental search backwards (normally @{b}C-r@{ub}).

@{b}search-yank-line-char@{ub}
     Character to pull rest of line from buffer into search string
     (normally @{b}C-y@{ub}).

@{b}search-yank-word-char@{ub}
     Character to pull next word from buffer into search string
     (normally @{b}C-w@{ub}).

Slow Terminal Incremental Search
--------------------------------

   Incremental search on a slow terminal uses a modified style of
display that is designed to take less time.  Instead of redisplaying
the buffer at each place the search gets to, it creates a new
single-line window and uses that to display the line that the search
has found.  The single-line window comes into play as soon as point
gets outside of the text that is already on the screen.

   When the search is terminated, the single-line window is removed.
Only at this time is the window in which the search was done
redisplayed to show its new value of point.

   The three dots at the end of the search string, normally used to
indicate that searching is going on, are not displayed in slow style
display.

   The slow terminal style of display is used when the terminal baud
rate is less than or equal to the value of the variable
@{b}search-slow-speed@{ub}, initially 1200.

   The number of lines to use in slow terminal search display is
controlled by the variable @{b}search-slow-window-lines@{ub}.  1 is its normal
value.


@EndNode

@Node "Nonincremental Search" "emacs/Nonincremental Search"
@Next "Word Search"
@Prev "Incremental Search"
@Toc "Search"

Nonincremental Search
=====================

   Emacs also has conventional nonincremental search commands, which
require you to type the entire search string before searching begins.

@{b}C-s ESC @{i}string@{ui} RET@{ub}
     Search for @{i}string@{ui}.

@{b}C-r ESC @{i}string@{ui} RET@{ub}
     Search backward for @{i}string@{ui}.

   To do a nonincremental search, first type @{b}C-s ESC@{ub}.  This enters the
minibuffer to read the search string; terminate the string with RET,
and then the search is done.  If the string is not found the search
command gets an error.

   The way @{b}C-s ESC@{ub} works is that the @{b}C-s@{ub} invokes incremental search,
which is specially programmed to invoke nonincremental search if the
argument you give it is empty.  (Such an empty argument would otherwise
be useless.)  @{b}C-r ESC@{ub} also works this way.

   Forward and backward nonincremental searches are implemented by the
commands @{b}search-forward@{ub} and @{b}search-backward@{ub}.  These commands may be
bound to keys in the usual manner.  The reason that incremental search
is programmed to invoke them as well is that @{b}C-s ESC@{ub} is the traditional
sequence of characters used in Emacs to invoke nonincremental search.

   However, nonincremental searches performed using @{b}C-s ESC@{ub} do not call
@{b}search-forward@{ub} right away.  The first thing done is to see if the next
character is @{b}C-w@{ub}, which requests a word search.  See @{"Word Search" Link "Word Search"}.


@EndNode

@Node "Word Search" "emacs/Word Search"
@Next "Regexp Search"
@Prev "Nonincremental Search"
@Toc "Search"

Word Search
===========

   Word search searches for a sequence of words without regard to how
the words are separated.  More precisely, you type a string of many
words, using single spaces to separate them, and the string can be
found even if there are multiple spaces, newlines or other punctuation
between the words.

   Word search is useful in editing documents formatted by text
formatters.  If you edit while looking at the printed, formatted
version, you can't tell where the line breaks are in the source file.
With word search, you can search without having to know them.

@{b}C-s ESC C-w @{i}words@{ui} RET@{ub}
     Search for @{i}words@{ui}, ignoring differences in punctuation.

@{b}C-r ESC C-w @{i}words@{ui} RET@{ub}
     Search backward for @{i}words@{ui}, ignoring differences in punctuation.

   Word search is a special case of nonincremental search and is invoked
with @{b}C-s ESC C-w@{ub}.  This is followed by the search string, which must
always be terminated with RET.  Being nonincremental, this search does
not start until the argument is terminated.  It works by constructing a
regular expression and searching for that.  See @{"Regexp Search" Link "Regexp Search"}.

   A backward word search can be done by @{b}C-r ESC C-w@{ub}.

   Forward and backward word searches are implemented by the commands
@{b}word-search-forward@{ub} and @{b}word-search-backward@{ub}.  These commands may be
bound to keys in the usual manner.  The reason that incremental search
is programmed to invoke them as well is that @{b}C-s ESC C-w@{ub} is the
traditional Emacs sequence of keys for word search.


@EndNode

@Node "Regexp Search" "emacs/Regexp Search"
@Next "Regexps"
@Prev "Word Search"
@Toc "Search"

Regular Expression Search
=========================

   A @{i}regular expression@{ui} (@{i}regexp@{ui}, for short) is a pattern that denotes a
set of strings, possibly an infinite set.  Searching for matches for a
regexp is a very powerful operation that editors on Unix systems have
traditionally offered.  In GNU Emacs, you can search for the next match
for a regexp either incrementally or not.

   Incremental search for a regexp is done by typing @{b}C-M-s@{ub}
(@{b}isearch-forward-regexp@{ub}).  This command reads a search string
incrementally just like @{b}C-s@{ub}, but it treats the search string as a
regexp rather than looking for an exact match against the text in the
buffer.  Each time you add text to the search string, you make the
regexp longer, and the new regexp is searched for.  A reverse regexp
search command, @{b}isearch-backward-regexp@{ub}, also exists but no key runs it.

   All of the control characters that do special things within an
ordinary incremental search have the same function in incremental
regexp search.  Typing @{b}C-s@{ub} or @{b}C-r@{ub} immediately after starting the search
retrieves the last incremental search regexp used; that is to say,
incremental regexp and non-regexp searches have independent defaults.

   Note that adding characters to the regexp in an incremental regexp
search does not make the cursor move back and start again.  Perhaps it
ought to; I am not sure.  As it stands, if you have searched for @{b}foo@{ub}
and you add @{b}\|bar@{ub}, the search will not check for a @{b}bar@{ub} in the buffer
before the @{b}foo@{ub}.

   Nonincremental search for a regexp is done by the functions
@{b}re-search-forward@{ub} and @{b}re-search-backward@{ub}.  You can invoke these with
@{b}M-x@{ub}, or bind them to keys.  Also, you can call @{b}re-search-forward@{ub} by
way of incremental regexp search with @{b}C-M-s ESC@{ub}.


@EndNode

@Node "Regexps" "emacs/Regexps"
@Next "Search Case"
@Prev "Regexp Search"
@Toc "Search"

Syntax of Regular Expressions
=============================

   Regular expressions have a syntax in which a few characters are
special constructs and the rest are @{i}ordinary@{ui}.  An ordinary character is
a simple regular expression which matches that character and nothing
else.  The special characters are @{b}$@{ub}, @{b}^@{ub}, @{b}.@{ub}, @{b}*@{ub}, @{b}+@{ub}, @{b}?@{ub}, @{b}[@{ub}, @{b}]@{ub} and @{b}\ @{ub}; no new
special characters will be defined.  Any other character appearing in a
regular expression is ordinary, unless a @{b}\ @{ub} precedes it.

   For example, @{b}f@{ub} is not a special character, so it is ordinary, and
therefore @{b}f@{ub} is a regular expression that matches the string @{b}f@{ub} and no
other string.  (It does @{i}not@{ui} match the string @{b}ff@{ub}.)  Likewise, @{b}o@{ub} is a
regular expression that matches only @{b}o@{ub}.

   Any two regular expressions @{i}a@{ui} and @{i}b@{ui} can be concatenated.  The result
is a regular expression which matches a string if @{i}a@{ui} matches some amount
of the beginning of that string and @{i}b@{ui} matches the rest of the string.

   As a simple example, we can concatenate the regular expressions @{b}f@{ub}
and @{b}o@{ub} to get the regular expression @{b}fo@{ub}, which matches only the string
@{b}fo@{ub}.  Still trivial.  To do something nontrivial, you need to use
one of the special characters.  Here is a list of them.

@{b} . (Period)@{ub}
     is a special character that matches any single character except a
     newline.  Using concatenation, we can make regular expressions
     like @{b}a.b@{ub} which matches any three-character string which begins
     with @{b}a@{ub} and ends with @{b}b@{ub}.

@{b}*@{ub}
     is not a construct by itself; it is a suffix, which means the
     preceding regular expression is to be repeated as many times as
     possible.  In @{b}fo*@{ub}, the @{b}*@{ub} applies to the @{b}o@{ub}, so @{b}fo*@{ub} matches one @{b}f@{ub}
     followed by any number of @{b}o@{ub}s.  The case of zero @{b}o@{ub}s is allowed: @{b}fo*@{ub}
     does match @{b}f@{ub}.

     @{b}*@{ub} always applies to the @{i}smallest@{ui} possible preceding expression.
     Thus, @{b}fo*@{ub} has a repeating @{b}o@{ub}, not a repeating @{b}fo@{ub}.

     The matcher processes a @{b}*@{ub} construct by matching, immediately, as
     many repetitions as can be found.  Then it continues with the rest
     of the pattern.  If that fails, backtracking occurs, discarding
     some of the matches of the @{b}*@{ub}-modified construct in case that makes
     it possible to match the rest of the pattern.  For example,
     matching @{b}ca*ar@{ub} against the string @{b}caaar@{ub}, the @{b}a*@{ub} first tries to
     match all three @{b}a@{ub}s; but the rest of the pattern is @{b}ar@{ub} and there is
     only @{b}r@{ub} left to match, so this try fails.  The next alternative is
     for @{b}a*@{ub} to match only two @{b}a@{ub}s.  With this choice, the rest of the
     regexp matches successfully.

@{b}+@{ub}
     Is a suffix character similar to @{b}*@{ub} except that it requires that
     the preceding expression be matched at least once.  So, for
     example, @{b}ca+r@{ub} will match the strings @{b}car@{ub} and @{b}caaaar@{ub} but not the
     string @{b}cr@{ub}, whereas @{b}ca*r@{ub} would match all three strings.

@{b}?@{ub}
     Is a suffix character similar to @{b}*@{ub} except that it can match the
     preceding expression either once or not at all.  For example, @{b}ca?r@{ub}
     will match @{b}car@{ub} or @{b}cr@{ub}; nothing else.

@{b}[ ... ]@{ub}
     @{b}[@{ub} begins a @{i}character set@{ui}, which is terminated by a @{b}]@{ub}.  In the
     simplest case, the characters between the two form the set.  Thus,
     @{b}[ad]@{ub} matches either one @{b}a@{ub} or one @{b}d@{ub}, and @{b}[ad]*@{ub} matches any string
     composed of just @{b}a@{ub}s and @{b}d@{ub}s (including the empty string), from
     which it follows that @{b}c[ad]*r@{ub} matches @{b}cr@{ub}, @{b}car@{ub}, @{b}cdr@{ub}, @{b}caddaar@{ub}, etc.

     Character ranges can also be included in a character set, by
     writing two characters with a @{b}-@{ub} between them.  Thus, @{b}[a-z]@{ub} matches
     any lower-case letter.  Ranges may be intermixed freely with
     individual characters, as in @{b}[a-z$%.]@{ub}, which matches any lower
     case letter or @{b}$@{ub}, @{b}%@{ub} or period.

     Note that the usual special characters are not special any more
     inside a character set.  A completely different set of special
     characters exists inside character sets: @{b}]@{ub}, @{b}-@{ub} and @{b}^@{ub}.

     To include a @{b}]@{ub} in a character set, you must make it the first
     character.  For example, @{b}[]a]@{ub} matches @{b}]@{ub} or @{b}a@{ub}.  To include a @{b}-@{ub},
     write @{b}--@{ub}, which is a range containing only @{b}-@{ub}.  To include @{b}^@{ub}, make
     it other than the first character in the set.

@{b}[^ ... ]@{ub}
     @{b}[^@{ub} begins a @{i}complement character set@{ui}, which matches any character
     except the ones specified.  Thus, @{b}[^a-z0-9A-Z]@{ub} matches all
     characters @{i}except@{ui} letters and digits.

     @{b}^@{ub} is not special in a character set unless it is the first
     character.  The character following the @{b}^@{ub} is treated as if it were
     first (@{b}-@{ub} and @{b}]@{ub} are not special there).

     Note that a complement character set can match a newline, unless
     newline is mentioned as one of the characters not to match.

@{b}^@{ub}
     is a special character that matches the empty string, but only if
     at the beginning of a line in the text being matched.  Otherwise
     it fails to match anything.  Thus, @{b}^foo@{ub} matches a @{b}foo@{ub} which occurs
     at the beginning of a line.

@{b}$@{ub}
     is similar to @{b}^@{ub} but matches only at the end of a line.  Thus, @{b}xx*$@{ub}
     matches a string of one @{b}x@{ub} or more at the end of a line.

@{b}\ @{ub}
     has two functions: it quotes the special characters (including @{b}\
     @{ub}), and it introduces additional special constructs.

     Because @{b}\ @{ub} quotes special characters, @{b}\$@{ub} is a regular expression
     which matches only @{b}$@{ub}, and @{b}\[@{ub} is a regular expression which matches
     only @{b}[@{ub}, and so on.

   Note: for historical compatibility, special characters are treated as
ordinary ones if they are in contexts where their special meanings make
no sense.  For example, @{b}*foo@{ub} treats @{b}*@{ub} as ordinary since there is no
preceding expression on which the @{b}*@{ub} can act.  It is poor practice to
depend on this behavior; better to quote the special character anyway,
regardless of where is appears.

   For the most part, @{b}\ @{ub} followed by any character matches only that
character.  However, there are several exceptions: characters which,
when preceded by @{b}\ @{ub}, are special constructs.  Such characters are
always ordinary when encountered on their own.  Here is a table of @{b}\ @{ub}
constructs.

@{b}\|@{ub}
     specifies an alternative.  Two regular expressions @{i}a@{ui} and @{i}b@{ui} with @{b}\|@{ub}
     in between form an expression that matches anything that either @{i}a@{ui}
     or @{i}b@{ui} will match.

     Thus, @{b}foo\|bar@{ub} matches either @{b}foo@{ub} or @{b}bar@{ub} but no other string.

     @{b}\|@{ub} applies to the largest possible surrounding expressions.  Only a
     surrounding @{b}\( ... \)@{ub} grouping can limit the grouping power of @{b}\|@{ub}.

     Full backtracking capability exists to handle multiple uses of @{b}\|@{ub}.

@{b}\( ... \)@{ub}
     is a grouping construct that serves three purposes:

       1. To enclose a set of @{b}\|@{ub} alternatives for other operations.
          Thus, @{b}\(foo\|bar\)x@{ub} matches either @{b}foox@{ub} or @{b}barx@{ub}.

       2. To enclose a complicated expression for the postfix @{b}*@{ub} to
          operate on.  Thus, @{b}ba\(na\)*@{ub} matches @{b}bananana@{ub}, etc., with any
          (zero or more) number of @{b}na@{ub} strings.

       3. To mark a matched substring for future reference.


     This last application is not a consequence of the idea of a
     parenthetical grouping; it is a separate feature which happens to
     be assigned as a second meaning to the same @{b}\( ... \)@{ub} construct
     because there is no conflict in practice between the two meanings.
     Here is an explanation of this feature:

@{b} \@{i}digit@{ui}@{ub}
     after the end of a @{b}\( ... \)@{ub} construct, the matcher remembers the
     beginning and end of the text matched by that construct.  Then,
     later on in the regular expression, you can use @{b}\ @{ub} followed by
     @{i}digit@{ui} to mean "match the same text matched the @{i}digit@{ui}'th time by the
     @{b}\( ... \)@{ub} construct."

     The strings matching the first nine @{b}\( ... \)@{ub} constructs appearing
     in a regular expression are assigned numbers 1 through 9 in order
     that the open-parentheses appear in the regular expression.  @{b}\1@{ub}
     through @{b}\9@{ub} may be used to refer to the text matched by the
     corresponding @{b}\( ... \)@{ub} construct.

     For example, @{b}\(.*\)\1@{ub} matches any newline-free string that is
     composed of two identical halves.  The @{b}\(.*\)@{ub} matches the first
     half, which may be anything, but the @{b}\1@{ub} that follows must match
     the same exact text.

@{b}\`@{ub}
     matches the empty string, provided it is at the beginning of the
     buffer.

@{b}\'@{ub}
     matches the empty string, provided it is at the end of the buffer.

@{b}\b@{ub}
     matches the empty string, provided it is at the beginning or end
     of a word.  Thus, @{b}\bfoo\b@{ub} matches any occurrence of @{b}foo@{ub} as a
     separate word.  @{b}\bballs?\b@{ub} matches @{b}ball@{ub} or @{b}balls@{ub} as a separate
     word.

@{b}\B@{ub}
     matches the empty string, provided it is @{i}not@{ui} at the beginning or
     end of a word.

@{b}\<@{ub}
     matches the empty string, provided it is at the beginning of a
     word.

@{b}\>@{ub}
     matches the empty string, provided it is at the end of a word.

@{b}\w@{ub}
     matches any word-constituent character.  The editor syntax table
     determines which characters these are.

@{b}\W@{ub}
     matches any character that is not a word-constituent.

@{b}\s@{i}code@{ui}@{ub}
     matches any character whose syntax is @{i}code@{ui}.  @{i}code@{ui} is a character
     which represents a syntax code: thus, @{b}w@{ub} for word constituent, @{b}-@{ub}
     for whitespace, @{b}(@{ub} for open-parenthesis, etc.  See @{"Syntax" Link "Syntax"}.

@{b}\S@{i}code@{ui}@{ub}
     matches any character whose syntax is not @{i}code@{ui}.

   Here is a complicated regexp, used by Emacs to recognize the end of a
sentence together with any whitespace that follows.  It is given in Lisp
syntax to enable you to distinguish the spaces from the tab characters.
In Lisp syntax, the string constant begins and ends with a
double-quote.  @{b}\"@{ub} stands for a double-quote as part of the regexp, @{b}\\ @{ub}
for a backslash as part of the regexp, @{b}\t@{ub} for a tab and @{b}\n@{ub} for a
newline.

     "[.?!][]\"')]*\\($\\|\t\\|  \\)[ \t\n]*"

This contains four parts in succession: a character set matching period,
@{b}?@{ub} or @{b}!@{ub}; a character set matching close-brackets, quotes or parentheses,
repeated any number of times; an alternative in backslash-parentheses
that matches end-of-line, a tab or two spaces; and a character set
matching whitespace characters, repeated any number of times.

   Note that the above example shows how to write this regexp when
entering it as part of an Emacs Lisp program. To enter the same regexp
in an interactive command such as @{b}re-search-forward@{ub} you must spell it
differently:

     [.?!][]"')]*\($\|^Q^I\| \)[ ^Q^I^Q^J]*


@EndNode

@Node "Search Case" "emacs/Search Case"
@Next "Replace"
@Prev "Regexps"
@Toc "Search"

Searching and Case
==================

   All sorts of searches in Emacs normally ignore the case of the text
they are searching through; if you specify searching for @{b}FOO@{ub}, then @{b}Foo@{ub}
and @{b}foo@{ub} are also considered a match.  Regexps, and in particular
character sets, are included: @{b}[aB]@{ub} would match @{b}a@{ub} or @{b}A@{ub} or @{b}b@{ub} or @{b}B@{ub}.

   If you do not want this feature, set the variable @{b}case-fold-search@{ub}
to @{b}nil@{ub}.  Then all letters must match exactly, including case.  This is
a per-buffer variable; altering the variable affects only the current
buffer, but there is a default value which you can change as well.  See
@{"Locals" Link "Locals"}.


@EndNode

@Node "Replace" "emacs/Replace"
@Next "Other Repeating Search"
@Prev "Search Case"
@Toc "Search"

Replacement Commands
====================

   Global search-and-replace operations are not needed as often in
Emacs as they are in other editors, but they are available.  In
addition to the simple @{b}replace-string@{ub} command which is like that found
in most editors, there is a @{b}query-replace@{ub} command which asks you, for
each occurrence of the pattern, whether to replace it.

   The replace commands all replace one string (or regexp) with one
replacement string.  It is possible to perform several replacements in
parallel using the command @{b}expand-region-abbrevs@{ub}.  See
@{"Expanding Abbrevs" Link "Expanding Abbrevs"}.


 @{" Unconditional Replace " Link "Unconditional Replace"}   Replacing all matches for a string.
 @{" Regexp Replace " Link "Regexp Replace"}          Replacing all matches for a regexp.
 @{" Replacement and Case " Link "Replacement and Case"}    How replacements preserve case of letters.
 @{" Query Replace " Link "Query Replace"}           How to use querying.


@EndNode

@Node "Unconditional Replace" "emacs/Unconditional Replace"
@Next "Regexp Replace"
@Prev "Replace"
@Toc "Replace"

Unconditional Replacement
-------------------------

@{b}M-x replace-string RET @{i}string@{ui} RET @{i}newstring@{ui} RET@{ub}
     Replace every occurrence of @{i}string@{ui} with @{i}newstring@{ui}.

@{b}M-x replace-regexp RET @{i}regexp@{ui} RET @{i}newstring@{ui} RET@{ub}
     Replace every match for @{i}regexp@{ui} with @{i}newstring@{ui}.

   To replace every instance of @{b}foo@{ub} after point with @{b}bar@{ub}, use the
command @{b}M-x replace-string@{ub} with the two arguments @{b}foo@{ub} and @{b}bar@{ub}.
Replacement occurs only after point, so if you want to cover the whole
buffer you must go to the beginning first.  All occurrences up to the
end of the buffer are replaced; to limit replacement to part of the
buffer, narrow to that part of the buffer before doing the replacement
(see @{"Narrowing" Link "Narrowing"}).

   When @{b}replace-string@{ub} exits, point is left at the last occurrence
replaced.  The value of point when the @{b}replace-string@{ub} command was
issued is remembered on the mark ring; @{b}C-u C-SPC@{ub} moves back there.

   A numeric argument restricts replacement to matches that are
surrounded by word boundaries.


@EndNode

@Node "Regexp Replace" "emacs/Regexp Replace"
@Next "Replacement and Case"
@Prev "Unconditional Replace"
@Toc "Replace"

Regexp Replacement
------------------

   @{b}replace-string@{ub} replaces exact matches for a single string.  The
similar command @{b}replace-regexp@{ub} replaces any match for a specified
pattern.

   In @{b}replace-regexp@{ub}, the @{i}newstring@{ui} need not be constant.  It can refer
to all or part of what is matched by the @{i}regexp@{ui}.  @{b}\&@{ub} in @{i}newstring@{ui}
stands for the entire text being replaced.  @{b} \@{i}d@{ui}@{ub} in @{i}newstring@{ui}, where @{i}d@{ui}
is a digit, stands for whatever matched the @{i}d@{ui}'th parenthesized grouping
in @{i}regexp@{ui}.  For example,

     M-x replace-regexp RET c[ad]+r RET \&-safe RET

would replace (for example) @{b}cadr@{ub} with @{b}cadr-safe@{ub} and @{b}cddr@{ub} with @{b}cddr-safe@{ub}.

     M-x replace-regexp RET \(c[ad]+r\)-safe RET \1 RET

would perform exactly the opposite replacements.  To include a @{b}\ @{ub} in
the text to replace with, you must give @{b}\\ @{ub}.


@EndNode

@Node "Replacement and Case" "emacs/Replacement and Case"
@Next "Query Replace"
@Prev "Regexp Replace"
@Toc "Replace"

Replace Commands and Case
-------------------------

   If the arguments to a replace command are in lower case, it preserves
case when it makes a replacement.  Thus, the command

     M-x replace-string RET foo RET bar RET

replaces a lower case @{b}foo@{ub} with a lower case @{b}bar@{ub}, @{b}FOO@{ub} with @{b}BAR@{ub}, and @{b}Foo@{ub}
with @{b}Bar@{ub}.  If upper case letters are used in the second argument, they
remain upper case every time that argument is inserted.  If upper case
letters are used in the first argument, the second argument is always
substituted exactly as given, with no case conversion.  Likewise, if
the variable @{b}case-replace@{ub} is set to @{b}nil@{ub}, replacement is done without
case conversion.  If @{b}case-fold-search@{ub} is set to @{b}nil@{ub}, case is
significant in matching occurrences of @{b}foo@{ub} to replace; also, case
conversion of the replacement string is not done.


@EndNode

@Node "Query Replace" "emacs/Query Replace"
@Prev "Replacement and Case"
@Toc "Replace"

Query Replace
-------------

@{b}M-% @{i}string@{ui} RET @{i}newstring@{ui} RET@{ub}
@{b}M-x query-replace RET @{i}string@{ui} RET @{i}newstring@{ui} RET@{ub}
     Replace some occurrences of @{i}string@{ui} with @{i}newstring@{ui}.

@{b}M-x query-replace-regexp RET @{i}regexp@{ui} RET @{i}newstring@{ui} RET@{ub}
     Replace some matches for @{i}regexp@{ui} with @{i}newstring@{ui}.

   If you want to change only some of the occurrences of @{b}foo@{ub} to @{b}bar@{ub},
not all of them, then you cannot use an ordinary @{b}replace-string@{ub}.
Instead, use @{b}M-%@{ub} (@{b}query-replace@{ub}).  This command finds occurrences of
@{b}foo@{ub} one by one, displays each occurrence and asks you whether to
replace it.  A numeric argument to @{b}query-replace@{ub} tells it to consider
only occurrences that are bounded by word-delimiter characters.

   Aside from querying, @{b}query-replace@{ub} works just like @{b}replace-string@{ub},
and @{b}query-replace-regexp@{ub} works just like @{b}replace-regexp@{ub}.

   The things you can type when you are shown an occurrence of @{i}string@{ui}
or a match for @{i}regexp@{ui} are:

@{b}SPC@{ub}
     to replace the occurrence with @{i}newstring@{ui}.  This preserves case,
     just like @{b}replace-string@{ub}, provided @{b}case-replace@{ub} is non-@{b}nil@{ub}, as it
     normally is.

@{b}DEL@{ub}
     to skip to the next occurrence without replacing this one.

@{b}, (Comma)@{ub}
     to replace this occurrence and display the result.  You are then
     asked for another input character, except that since the
     replacement has already been made, DEL and SPC are equivalent.
     You could type @{b}C-r@{ub} at this point (see below) to alter the replaced
     text.  You could also type @{b}C-x u@{ub} to undo the replacement; this
     exits the @{b}query-replace@{ub}, so if you want to do further replacement
     you must use @{b}C-x ESC@{ub} to restart (see @{"Repetition" Link "Repetition"}).

@{b}ESC@{ub}
     to exit without doing any more replacements.

@{b} . (Period)@{ub}
     to replace this occurrence and then exit.

@{b}!@{ub}
     to replace all remaining occurrences without asking again.

@{b}^@{ub}
     to go back to the location of the previous occurrence (or what
     used to be an occurrence), in case you changed it by mistake.
     This works by popping the mark ring.  Only one @{b}^@{ub} in a row is
     allowed, because only one previous replacement location is kept
     during @{b}query-replace@{ub}.

@{b}C-r@{ub}
     to enter a recursive editing level, in case the occurrence needs
     to be edited rather than just replaced with @{i}newstring@{ui}.  When you
     are done, exit the recursive editing level with @{b}C-M-c@{ub} and the next
     occurrence will be displayed.  See @{"Recursive Edit" Link "Recursive Edit"}.

@{b}C-w@{ub}
     to delete the occurrence, and then enter a recursive editing level
     as in @{b}C-r@{ub}.  Use the recursive edit to insert text to replace the
     deleted occurrence of @{i}string@{ui}.  When done, exit the recursive
     editing level with @{b}C-M-c@{ub} and the next occurrence will be displayed.

@{b}C-l@{ub}
     to redisplay the screen and then give another answer.

@{b}C-h@{ub}
     to display a message summarizing these options, then give another
     answer.

   If you type any other character, the @{b}query-replace@{ub} is exited, and
the character executed as a command.  To restart the @{b}query-replace@{ub}, use
@{b}C-x ESC@{ub}, which repeats the @{b}query-replace@{ub} because it used the minibuffer
to read its arguments.  See @{"C-x ESC" Link "Repetition"}.

   To replace every occurrence, you can start @{b}query-replace@{ub} at the
beginning of the buffer and type @{b}!@{ub}, or you can use the @{b}replace-string@{ub}
command at the beginning of the buffer.  To replace every occurrence in
a part of the buffer, narrow to that part and then run @{b}replace-string@{ub}
or @{b}query-replace@{ub} at the beginning of it.  See @{"Narrowing" Link "Narrowing"}.


@EndNode

@Node "Other Repeating Search" "emacs/Other Repeating Search"
@Prev "Replace"
@Toc "Search"

Other Search-and-Loop Commands
==============================

   Here are some other commands that find matches for a regular
expression.  They all operate from point to the end of the buffer.

@{b}M-x occur@{ub}
     Print each line that follows point and contains a match for the
     specified regexp.  A numeric argument specifies the number of
     context lines to print before and after each matching line; the
     default is none.

     The buffer @{b}*Occur*@{ub} containing the output serves as a menu for
     finding the occurrences in their original context.  Find an
     occurrence as listed in @{b}*Occur*@{ub}, position point there and type @{b}C-c
     C-c@{ub}; this switches to the buffer that was searched and moves point
     to the original of the same occurrence.

@{b}M-x list-matching-lines@{ub}
     Synonym for @{b}M-x occur@{ub}.

@{b}M-x count-matches@{ub}
     Print the number of matches following point for the specified
     regexp.

@{b}M-x delete-non-matching-lines@{ub}
     Delete each line that follows point and does not contain a match
     for the specified regexp.

@{b}M-x delete-matching-lines@{ub}
     Delete each line that follows point and contains a match for the
     specified regexp.


@EndNode

@Node "Fixit" "emacs/Fixit"
@Next "Files"
@Prev "Search"
@Toc "Main"

Commands for Fixing Typos
*************************

   In this chapter we describe the commands that are especially useful
for the times when you catch a mistake in your text just after you have
made it, or change your mind while composing text on line.


 @{" Kill Errors " Link "Kill Errors"}  Commands to kill a batch of recently entered text.
 @{" Transpose " Link "Transpose"}    Exchanging two characters, words, lines, lists...
 @{" Fixing Case " Link "Fixing Case"}  Correcting case of last word entered.
 @{" Spelling " Link "Spelling"}     Apply spelling checker to a word, or a whole file.


@EndNode

@Node "Kill Errors" "emacs/Kill Errors"
@Next "Transpose"
@Prev "Fixit"
@Toc "Fixit"

Killing Your Mistakes
=====================

@{b}DEL@{ub}
     Delete last character (@{b}delete-backward-char@{ub}).

@{b}M-DEL@{ub}
     Kill last word (@{b}backward-kill-word@{ub}).

@{b}C-x DEL@{ub}
     Kill to beginning of sentence (@{b}backward-kill-sentence@{ub}).

   The DEL character (@{b}delete-backward-char@{ub}) is the most important
correction command.  When used among graphic (self-inserting)
characters, it can be thought of as canceling the last character typed.

   When your mistake is longer than a couple of characters, it might be
more convenient to use @{b}M-DEL@{ub} or @{b}C-x DEL@{ub}.  @{b}M-DEL@{ub} kills back to the start
of the last word, and @{b}C-x DEL@{ub} kills back to the start of the last
sentence.  @{b}C-x DEL@{ub} is particularly useful when you are thinking of what
to write as you type it, in case you change your mind about phrasing.
@{b}M-DEL@{ub} and @{b}C-x DEL@{ub} save the killed text for @{b}C-y@{ub} and @{b}M-y@{ub} to retrieve.
See @{"Yanking" Link "Yanking"}.

   @{b}M-DEL@{ub} is often useful even when you have typed only a few characters
wrong, if you know you are confused in your typing and aren't sure
exactly what you typed.  At such a time, you cannot correct with DEL
except by looking at the screen to see what you did.  It requires less
thought to kill the whole word and start over again.


@EndNode

@Node "Transpose" "emacs/Transpose"
@Next "Fixing Case"
@Prev "Kill Errors"
@Toc "Fixit"

Transposing Text
================

@{b}C-t@{ub}
     Transpose two characters (@{b}transpose-chars@{ub}).

@{b}M-t@{ub}
     Transpose two words (@{b}transpose-words@{ub}).

@{b}C-M-t@{ub}
     Transpose two balanced expressions (@{b}transpose-sexps@{ub}).

@{b}C-x C-t@{ub}
     Transpose two lines (@{b}transpose-lines@{ub}).

   The common error of transposing two characters can be fixed, when
they are adjacent, with the @{b}C-t@{ub} command (@{b}transpose-chars@{ub}).  Normally,
@{b}C-t@{ub} transposes the two characters on either side of point.  When given
at the end of a line, rather than transposing the last character of the
line with the newline, which would be useless, @{b}C-t@{ub} transposes the last
two characters on the line.  So, if you catch your transposition error
right away, you can fix it with just a @{b}C-t@{ub}.  If you don't catch it so
fast, you must move the cursor back to between the two transposed
characters.  If you transposed a space with the last character of the
word before it, the word motion commands are a good way of getting
there.  Otherwise, a reverse search (@{b}C-r@{ub}) is often the best way.  See
@{"Search" Link "Search"}.

   @{b}Meta-t@{ub} (@{b}transpose-words@{ub}) transposes the word before point with the
word after point.  It moves point forward over a word, dragging the
word preceding or containing point forward as well.  The punctuation
characters between the words do not move.  For example, @{b}FOO, BAR@{ub}
transposes into @{b}BAR, FOO@{ub} rather than @{b}BAR FOO,@{ub}.

   @{b}C-M-t@{ub} (@{b}transpose-sexps@{ub}) is a similar command for transposing two
expressions (see @{"Lists" Link "Lists"}), and @{b}C-x C-t@{ub} (@{b}transpose-lines@{ub}) exchanges lines.
They work like @{b}M-t@{ub} except in determining the division of the text into
syntactic units.

   A numeric argument to a transpose command serves as a repeat count:
it tells the transpose command to move the character (word, sexp, line)
before or containing point across several other characters (words,
sexps, lines).  For example, @{b}C-u 3 C-t@{ub} moves the character before point
forward across three other characters.  This is equivalent to repeating
@{b}C-t@{ub} three times.  @{b}C-u - 4 M-t@{ub} moves the word before point backward
across four words.  @{b}C-u - C-M-t@{ub} would cancel the effect of plain @{b}C-M-t@{ub}.

   A numeric argument of zero is assigned a special meaning (because
otherwise a command with a repeat count of zero would do nothing): to
transpose the character (word, sexp, line) ending after point with the
one ending after the mark.


@EndNode

@Node "Fixing Case" "emacs/Fixing Case"
@Next "Spelling"
@Prev "Transpose"
@Toc "Fixit"

Case Conversion
===============

@{b}M- M-l@{ub}
     Convert last word to lower case.  Note @{b}Meta-@{ub} is Meta-minus.

@{b}M- M-u@{ub}
     Convert last word to all upper case.

@{b}M- M-c@{ub}
     Convert last word to lower case with capital initial.

   A very common error is to type words in the wrong case.  Because of
this, the word case-conversion commands @{b}M-l@{ub}, @{b}M-u@{ub} and @{b}M-c@{ub} have a special
feature when used with a negative argument: they do not move the
cursor.  As soon as you see you have mistyped the last word, you can
simply case-convert it and go on typing.  See @{"Case" Link "Case"}.


@EndNode

@Node "Spelling" "emacs/Spelling"
@Prev "Fixing Case"
@Toc "Fixit"

Checking and Correcting Spelling
================================

@{b}M-$@{ub}
     Check and correct spelling of word (@{b}spell-word@{ub}).

@{b}M-x spell-buffer@{ub}
     Check and correct spelling of each word in the buffer.

@{b}M-x spell-region@{ub}
     Check and correct spelling of each word in the region.

@{b}M-x spell-string@{ub}
     Check spelling of specified word.

   To check the spelling of the word before point, and optionally
correct it as well, use the command @{b}M-$@{ub} (@{b}spell-word@{ub}).  This command runs
an inferior process containing the @{b}spell@{ub} program to see whether the
word is correct English.  If it is not, it asks you to edit the word (in
the minibuffer) into a corrected spelling, and then does a @{b}query-replace@{ub}
to substitute the corrected spelling for the old one throughout the
buffer.

   If you exit the minibuffer without altering the original spelling, it
means you do not want to do anything to that word.  Then the
@{b}query-replace@{ub} is not done.

   @{b}M-x spell-buffer@{ub} checks each word in the buffer the same way that
@{b}spell-word@{ub} does, doing a @{b}query-replace@{ub} if appropriate for every
incorrect word.

   @{b}M-x spell-region@{ub} is similar but operates only on the region, not the
entire buffer.

   @{b}M-x spell-string@{ub} reads a string as an argument and checks whether
that is a correctly spelled English word.  It prints in the echo area a
message giving the answer.


@EndNode

@Node "Files" "emacs/Files"
@Next "Buffers"
@Prev "Fixit"
@Toc "Main"

File Handling
*************

   The basic unit of stored data in Unix is the @{i}file@{ui}.  To edit a file,
you must tell Emacs to examine the file and prepare a buffer containing
a copy of the file's text.  This is called @{i}visiting@{ui} the file.  Editing
commands apply directly to text in the buffer; that is, to the copy
inside Emacs.  Your changes appear in the file itself only when you
@{i}save@{ui} the buffer back into the file.

   In addition to visiting and saving files, Emacs can delete, copy,
rename, and append to files, and operate on file directories.


 @{" File Names " Link "File Names"}    How to type and edit file name arguments.
 @{" Visiting " Link "Visiting"}      Visiting a file prepares Emacs to edit the file.
 @{" Saving " Link "Saving"}        Saving makes your changes permanent.
 @{" Reverting " Link "Reverting"}     Reverting cancels all the changes not saved.
 @{" Auto Save " Link "Auto Save"}     Auto Save periodically protects against loss of data.
 @{" ListDir " Link "ListDir"}       Listing the contents of a file directory.
 @{" Dired " Link "Dired"}         "Editing" a directory to delete, rename, etc.
                  the files in it.
 @{" Misc File Ops " Link "Misc File Ops"}  Other things you can do on files.


@EndNode

@Node "File Names" "emacs/File Names"
@Next "Visiting"
@Prev "Files"
@Toc "Files"

File Names
==========

   Most Emacs commands that operate on a file require you to specify the
file name.  (Saving and reverting are exceptions; the buffer knows which
file name to use for them.)  File names are specified using the
minibuffer (see @{"Minibuffer" Link "Minibuffer"}).  @{i}Completion@{ui} is available, to make it
easier to specify long file names.  See @{"Completion" Link "Completion"}.

   There is always a @{i}default file name@{ui} which will be used if you type
just RET, entering an empty argument.  Normally the default file name
is the name of the file visited in the current buffer; this makes it
easy to operate on that file with any of the Emacs file commands.

   Each buffer has a default directory, normally the same as the
directory of the file visited in that buffer.  When Emacs reads a file
name, if you do not specify a directory, the default directory is used.
If you specify a directory in a relative fashion, with a name that
does not start with a slash, it is interpreted with respect to the
default directory.  The default directory is kept in the variable
@{b}default-directory@{ub}, which has a separate value in every buffer.

   For example, if the default file name is @{b}/u/rms/gnu/gnu.tasks@{ub} then
the default directory is @{b}/u/rms/gnu/@{ub}.  If you type just @{b}foo@{ub}, which does
not specify a directory, it is short for @{b}/u/rms/gnu/foo@{ub}.  @{b}../.login@{ub}
would stand for @{b}/u/rms/.login@{ub}.  @{b}new/foo@{ub} would stand for the filename
@{b}/u/rms/gnu/new/foo@{ub}.

   The command @{b}M-x pwd@{ub} prints the current buffer's default directory,
and the command @{b}M-x cd@{ub} sets it (to a value read using the minibuffer).
A buffer's default directory changes only when the @{b}cd@{ub} command is used.
A file-visiting buffer's default directory is initialized to the
directory of the file that is visited there.  If a buffer is made
randomly with @{b}C-x b@{ub}, its default directory is copied from that of the
buffer that was current at the time.

   The default directory actually appears in the minibuffer when the
minibuffer becomes active to read a file name.  This serves two
purposes: it shows you what the default is, so that you can type a
relative file name and know with certainty what it will mean, and it
allows you to edit the default to specify a different directory.  This
insertion of the default directory is inhibited if the variable
@{b}insert-default-directory@{ub} is set to @{b}nil@{ub}.

   Note that it is legitimate to type an absolute file name after you
enter the minibuffer, ignoring the presence of the default directory
name as part of the text.  The final minibuffer contents may look
invalid, but that is not so.  See @{"Minibuffer File" Link "Minibuffer File"}.

   @{b}$@{ub} in a file name is used to substitute environment variables.  For
example, if you have used the C shell command @{b}setenv FOO rms/hacks@{ub} to
set up an environment variable named @{b}FOO@{ub}, then you can use
@{b}/u/$FOO/test.c@{ub} or @{b}/u/${FOO}/test.c@{ub} as an abbreviation for
@{b}/u/rms/hacks/test.c@{ub}.  (In the Bourne-Again shell, write @{b}export
FOO=rms/hacks@{ub} to define @{b}FOO@{ub}.)  The environment variable name consists
of all the alphanumeric characters after the @{b}$@{ub}; alternatively, it may
be enclosed in braces after the @{b}$@{ub}.  Note that the @{b}setenv@{ub} command
affects Emacs only if done before Emacs is started.

   To access a file with @{b}$@{ub} in its name, type @{b}$$@{ub}.  This pair is
converted to a single @{b}$@{ub} at the same time as variable substitution is
performed for single @{b}$@{ub}.  The Lisp function that performs the
substitution is called @{b}substitute-in-file-name@{ub}.  The substitution is
performed only on filenames read as such using the minibuffer.


@EndNode

@Node "Visiting" "emacs/Visiting"
@Next "Saving"
@Prev "File Names"
@Toc "Files"

Visiting Files
==============

@{b}C-x C-f@{ub}
     Visit a file (@{b}find-file@{ub}).

@{b}C-x C-v@{ub}
     Visit a different file instead of the one visited last
     (@{b}find-alternate-file@{ub}).

@{b}C-x 4 C-f@{ub}
     Visit a file, in another window (@{b}find-file-other-window@{ub}).  Don't
     change this window.

   @{i}Visiting@{ui} a file means copying its contents into Emacs where you can
edit them.  Emacs makes a new buffer for each file that you visit.  We
say that the buffer is visiting the file that it was created to hold.
Emacs constructs the buffer name from the file name by throwing away the
directory, keeping just the name proper.  For example, a file named
@{b}/usr/rms/emacs.tex@{ub} would get a buffer named @{b}emacs.tex@{ub}.  If there is
already a buffer with that name, a unique name is constructed by
appending @{b}<2>@{ub}, @{b}<3>@{ub}, or so on, using the lowest number that makes a name
that is not already in use.

   Each window's mode line shows the name of the buffer that is being
displayed in that window, so you can always tell what buffer you are
editing.

   The changes you make with Emacs are made in the Emacs buffer.  They
do not take effect in the file that you visited, or any place
permanent, until you @{i}save@{ui} the buffer.  Saving the buffer means that
Emacs writes the current contents of the buffer into its visited file.
See @{"Saving" Link "Saving"}.

   If a buffer contains changes that have not been saved, the buffer is
said to be @{i}modified@{ui}.  This is important because it implies that some
changes will be lost if the buffer is not saved.  The mode line displays
two stars near the left margin if the buffer is modified.

   To visit a file, use the command @{b}C-x C-f@{ub} (@{b}find-file@{ub}).  Follow the
command with the name of the file you wish to visit, terminated by a
RET.

   The file name is read using the minibuffer (see @{"Minibuffer" Link "Minibuffer"}), with
defaulting and completion in the standard manner (see @{"File Names" Link "File Names"}).
While in the minibuffer, you can abort @{b}C-x C-f@{ub} by typing @{b}C-g@{ub}.

   Your confirmation that @{b}C-x C-f@{ub} has completed successfully is the
appearance of new text on the screen and a new buffer name in the mode
line.  If the specified file does not exist and could not be created, or
cannot be read, then an error results.  The error message is printed in the
echo area, and includes the file name which Emacs was trying to visit.

   If you visit a file that is already in Emacs, @{b}C-x C-f@{ub} does not make
another copy.  It selects the existing buffer containing that file.
However, before doing so, it checks that the file itself has not changed
since you visited or saved it last.  If the file has changed, a warning
message is printed.  See @{"Simultaneous Editing" Link "Interlocking"}.

   What if you want to create a file?  Just visit it.  Emacs prints
@{b}(New File)@{ub} in the echo area, but in other respects behaves as if you
had visited an existing empty file.  If you make any changes and save
them, the file is created.

   If you visit a nonexistent file unintentionally (because you typed
the wrong file name), use the @{b}C-x C-v@{ub} (@{b}find-alternate-file@{ub}) command to
visit the file you wanted.  @{b}C-x C-v@{ub} is similar to @{b}C-x C-f@{ub}, but it kills
the current buffer (after first offering to save it if it is modified).
@{b}C-x C-v@{ub} is allowed even if the current buffer is not visiting a file.

   If the file you specify is actually a directory, Dired is called on
that directory (see @{"Dired" Link "Dired"}).  This can be inhibited by setting the
variable @{b}find-file-run-dired@{ub} to @{b}nil@{ub}; then it is an error to try to
visit a directory.

   @{b}C-x 4 f@{ub} (@{b}find-file-other-window@{ub}) is like @{b}C-x C-f@{ub} except that the
buffer containing the specified file is selected in another window.
The window that was selected before @{b}C-x 4 f@{ub} continues to show the same
buffer it was already showing.  If this command is used when only one
window is being displayed, that window is split in two, with one window
showing the same before as before, and the other one showing the newly
requested file.  See @{"Windows" Link "Windows"}.

   There are two hook variables that allow extensions to modify the
operation of visiting files.  Visiting a file that does not exist runs
the functions in the list @{b}find-file-not-found-hooks@{ub}; the value of this
variable is expected to be a list of functions, and the functions are
called one by one until one of them returns non-@{b}nil@{ub}.  Any visiting of a
file, whether extant or not, expects @{b}find-file-hooks@{ub} to contain a list
of functions and calls them all, one by one.  In both cases the
functions receive no arguments.  Visiting a nonexistent file runs the
@{b}find-file-not-found-hooks@{ub} first.

   You can put a local variable specification at the end of a file which
specifies values for Emacs local variables whenever you visit the file.
See @{"File Variables" Link "File Variables"}.


@EndNode

@Node "Saving" "emacs/Saving"
@Next "Reverting"
@Prev "Visiting"
@Toc "Files"

Saving Files
============

   @{i}Saving@{ui} a buffer in Emacs means writing its contents back into the
file that was visited in the buffer.

@{b}C-x C-s@{ub}
     Save the current buffer in its visited file (@{b}save-buffer@{ub}).

@{b}C-x s@{ub}
     Save any or all buffers in their visited files (@{b}save-some-buffers@{ub}).

@{b}M-~@{ub}
     Forget that the current buffer has been changed
     (@{b}not-modified@{ub}).

@{b}C-x C-w@{ub}
     Save the current buffer in a specified file, and record that file
     as the one visited in the buffer (@{b}write-file@{ub}).

@{b}M-x set-visited-file-name@{ub}
     Change file the name under which the current buffer will be saved.

   When you wish to save the file and make your changes permanent, type
@{b}C-x C-s@{ub} (@{b}save-buffer@{ub}).  After saving is finished, @{b}C-x C-s@{ub} prints a
message such as

     Wrote /u/rms/gnu/gnu.tasks

If the selected buffer is not modified (no changes have been made in it
since the buffer was created or last saved), saving is not really done,
because it would have no effect.  Instead, @{b}C-x C-s@{ub} prints a message in
the echo area saying

     (No changes need to be written)

   The command @{b}C-x s@{ub} (@{b}save-some-buffers@{ub}) can save any or all modified
buffers.  First it asks, for each modified buffer, whether to save it.
These questions should be answered with @{b}y@{ub} or @{b}n@{ub}.  @{b}C-x C-c@{ub}, the key that
kills Emacs, invokes @{b}save-some-buffers@{ub} and therefore asks the same
questions.

   If you have changed a buffer and do not want the changes to be
saved, you should take some action to prevent it.  Otherwise, each time
you use @{b}save-some-buffers@{ub} you are liable to save it by mistake.  One
thing you can do is type @{b}M-~@{ub} (@{b}not-modified@{ub}), which clears out the
indication that the buffer is modified.  If you do this, none of the
save commands will believe that the buffer needs to be saved.  (@{b}~@{ub} is
often used as a mathematical symbol for `not'; thus @{b}Meta-~@{ub} is `not',
metafied.) You could also use @{b}set-visited-file-name@{ub} (see below) to mark
the buffer as visiting a different file name, one which is not in use
for anything important.  Alternatively, you can undo all the changes
made since the file was visited or saved, by reading the text from the
file again.  This is called @{i}reverting@{ui}.  See @{"Reverting" Link "Reverting"}.  You could also
undo all the changes by repeating the undo command @{b}C-x u@{ub} until you have
undone all the changes; but this only works if you have not made more
changes than the undo mechanism can remember.

   @{b}M-x set-visited-file-name@{ub} alters the name of the file that the
current buffer is visiting.  It reads the new file name using the
minibuffer.  It can be used on a buffer that is not visiting a file,
too.  The buffer's name is changed to correspond to the file it is now
visiting in the usual fashion (unless the new name is in use already
for some other buffer; in that case, the buffer name is not changed).
@{b}set-visited-file-name@{ub} does not save the buffer in the newly visited
file; it just alters the records inside Emacs so that, if you save the
buffer, it will be saved in that file.  It also marks the buffer as
"modified" so that @{b}C-x C-s@{ub} @{i}will@{ui} save.

   If you wish to mark the buffer as visiting a different file and save
it right away, use @{b}C-x C-w@{ub} (@{b}write-file@{ub}).  It is precisely equivalent to
@{b}set-visited-file-name@{ub} followed by @{b}C-x C-s@{ub}.  @{b}C-x C-s@{ub} used on a buffer
that is not visiting with a file has the same effect as @{b}C-x C-w@{ub}; that
is, it reads a file name, marks the buffer as visiting that file, and
saves it there.  The default file name in a buffer that is not visiting
a file is made by combining the buffer name with the buffer's default
directory.

   If Emacs is about to save a file and sees that the date of the latest
version on disk does not match what Emacs last read or wrote, Emacs
notifies you of this fact, because it probably indicates a problem
caused by simultaneous editing and requires your immediate attention.
See @{"Simultaneous Editing" Link "Interlocking"}.

   If the variable @{b}require-final-newline@{ub} is non-@{b}nil@{ub}, Emacs puts a
newline at the end of any file that doesn't already end in one, every
time a file is saved or written.

   You can implement other ways to write files, and other things to be
done before writing them, using the hook variable @{b}write-file-hooks@{ub}.  The
value of this variable should be a list of Lisp functions.  When a file
is to be written, the functions in the list are called, one by one,
with no arguments.  If one of them returns a non-@{b}nil@{ub} value, Emacs takes
this to mean that the file has been written in some suitable fashion;
the rest of the functions are not called, and normal writing is not
done.


 @{" Backup " Link "Backup"}        How Emacs saves the old version of your file.
 @{" Interlocking " Link "Interlocking"}  How Emacs protects against simultaneous editing
                  of one file by two users.


@EndNode

@Node "Backup" "emacs/Backup"
@Next "Interlocking"
@Prev "Saving"
@Toc "Saving"

Backup Files
------------

   Because Unix does not provide version numbers in file names,
rewriting a file in Unix automatically destroys all record of what the
file used to contain.  Thus, saving a file from Emacs throws away the
old contents of the file--or it would, except that Emacs carefully
copies the old contents to another file, called the @{i}backup@{ui} file, before
actually saving (provided the variable @{b}make-backup-files@{ub} is non-@{b}nil@{ub};
backup files are not written if this variable is @{b}nil@{ub}).

   At your option, Emacs can keep either a single backup file or a
series of numbered backup files for each file that you edit.

   Emacs makes a backup for a file only the first time the file is saved
from one buffer.  No matter how many times you save a file, its backup
file continues to contain the contents from before the file was visited.
Normally this means that the backup file contains the contents from
before the current editing session; however, if you kill the buffer and
then visit the file again, a new backup file will be made by the next
save.


 @{" Names " Link "Backup Names"}              		How backup files are named;
				Choosing single or numbered backup files.
 @{" Deletion " Link "Backup Deletion"}                 	Emacs deletes excess numbered backups.
 @{" Copying " Link "Backup Copying"}                	Backups can be made by copying or renaming.


@EndNode

@Node "Backup Names" "emacs/Backup Names"
@Next "Backup Deletion"
@Prev "Backup"
@Toc "Backup"

Single or Numbered Backups
..........................

   If you choose to have a single backup file (this is the default),
the backup file's name is constructed by appending @{b}~@{ub} to the file name
being edited; thus, the backup file for @{b}eval.c@{ub} would be @{b}eval.c~@{ub}.

   If you choose to have a series of numbered backup files, backup file
names are made by appending @{b}.~@{ub}, the number, and another @{b}~@{ub} to the
original file name.  Thus, the backup files of @{b}eval.c@{ub} would be called
@{b}eval.c.~1~@{ub}, @{b}eval.c.~2~@{ub}, and so on, through names like @{b}eval.c.~259~@{ub} and
beyond.

   If protection stops you from writing backup files under the usual
names, the backup file is written as @{b}%backup%~@{ub} in your home directory.
Only one such file can exist, so only the most recently made such
backup is available.

   The choice of single backup or numbered backups is controlled by the
variable @{b}version-control@{ub}.  Its possible values are

@{b}t@{ub}
     Make numbered backups.

@{b}nil@{ub}
     Make numbered backups for files that have numbered backups already.
     Otherwise, make single backups.

@{b}never@{ub}
     Do not in any case make numbered backups; always make single
     backups.

@{b}version-control@{ub} may be set locally in an individual buffer to control
the making of backups for that buffer's file.  For example, Rmail mode
locally sets @{b}version-control@{ub} to @{b}never@{ub} to make sure that there is only
one backup for an Rmail file.  See @{"Locals" Link "Locals"}.


@EndNode

@Node "Backup Deletion" "emacs/Backup Deletion"
@Next "Backup Copying"
@Prev "Backup Names"
@Toc "Backup"

Automatic Deletion of Backups
.............................

   To prevent unlimited consumption of disk space, Emacs can delete
numbered backup versions automatically.  Generally Emacs keeps the
first few backups and the latest few backups, deleting any in between.
This happens every time a new backup is made.  The two variables that
control the deletion are @{b}kept-old-versions@{ub} and @{b}kept-new-versions@{ub}.
Their values are, respectively the number of oldest (lowest-numbered)
backups to keep and the number of newest (highest-numbered) ones to
keep, each time a new backup is made.  Recall that these values are
used just after a new backup version is made; that newly made backup is
included in the count in @{b}kept-new-versions@{ub}.  By default, both variables
are 2.

   If @{b}trim-versions-without-asking@{ub} is non-@{b}nil@{ub}, the excess middle
versions are deleted without a murmur.  If it is @{b}nil@{ub}, the default, then
you are asked whether the excess middle versions should really be
deleted.

   Dired's @{b}.@{ub} (Period) command can also be used to delete old versions.
See @{"Dired" Link "Dired"}.


@EndNode

@Node "Backup Copying" "emacs/Backup Copying"
@Prev "Backup Deletion"
@Toc "Backup"

Copying vs. Renaming
....................

   Backup files can be made by copying the old file or by renaming it.
This makes a difference when the old file has multiple names.  If the
old file is renamed into the backup file, then the alternate names
become names for the backup file.  If the old file is copied instead,
then the alternate names remain names for the file that you are
editing, and the contents accessed by those names will be the new
contents.

   The method of making a backup file may also affect the file's owner
and group.  If copying is used, these do not change.  If renaming is
used, you become the file's owner, and the file's group becomes the
default (different operating systems have different defaults for the
group).

   Having the owner change is usually a good idea, because then the
owner always shows who last edited the file.  Also, the owners of the
backups show who produced those versions.  Occasionally there is a file
whose owner should not change; it is a good idea for such files to
contain local variable lists to set @{b}backup-by-copying-when-mismatch@{ub} for
them alone (see @{"File Variables" Link "File Variables"}).

   The choice of renaming or copying is controlled by three variables.
Normally, renaming is done.  If the variable @{b}backup-by-copying@{ub} is
non-@{b}nil@{ub}, copying is used.  Otherwise, if the variable
@{b}backup-by-copying-when-linked@{ub} is non-@{b}nil@{ub}, then copying is done for
files that have multiple names, but renaming may still done when the
file being edited has only one name.  If the variable
@{b}backup-by-copying-when-mismatch@{ub} is non-@{b}nil@{ub}, then copying is done if
renaming would cause the file's owner or group to change.


@EndNode

@Node "Interlocking" "emacs/Interlocking"
@Prev "Backup"
@Toc "Saving"

Protection against Simultaneous Editing
---------------------------------------

   Simultaneous editing occurs when two users visit the same file, both
make changes, and then both save them.  If nobody were informed that
this was happening, whichever user saved first would later find that
his changes were lost.  On some systems, Emacs notices immediately when
the second user starts to change the file, and issues an immediate
warning.  When this is not possible, or if the second user has gone on
to change the file despite the warning, Emacs checks later when the
file is saved, and issues a second warning when a user is about to
overwrite a file containing another user's changes.  If the editing
user takes the proper corrective action at this point, he can prevent
actual loss of work.

   When you make the first modification in an Emacs buffer that is
visiting a file, Emacs records that you have locked the file.  (It does
this by writing another file in a directory reserved for this purpose.)
The lock is removed when you save the changes.  The idea is that the
file is locked whenever the buffer is modified.  If you begin to modify
the buffer while the visited file is locked by someone else, this
constitutes a collision, and Emacs asks you what to do.  It does this
by calling the Lisp function @{b}ask-user-about-lock@{ub}, which you can
redefine for the sake of customization.  The standard definition of
this function asks you a question and accepts three possible answers:

@{b}s@{ub}
     Steal the lock.  Whoever was already changing the file loses the
     lock, and you gain the lock.

@{b}p@{ub}
     Proceed.  Go ahead and edit the file despite its being locked by
     someone else.

@{b}q@{ub}
     Quit.  This causes an error (@{b}file-locked@{ub}) and the modification you
     were trying to make in the buffer does not actually take place.

   Note that locking works on the basis of a file name; if a file has
multiple names, Emacs does not realize that the two names are the same
file and cannot prevent two user from editing it simultaneously under
different names.  However, basing locking on names means that Emacs can
interlock the editing of new files that will not really exist until
they are saved.

   Some systems are not configured to allow Emacs to make locks.  On
these systems, Emacs cannot detect trouble in advance, but it still can
detect it in time to prevent you from overwriting someone else's
changes.

   Every time Emacs saves a buffer, it first checks the
last-modification date of the existing file on disk to see that it has
not changed since the file was last visited or saved.  If the date does
not match, it implies that changes were made in the file in some other
way, and these changes are about to be lost if Emacs actually does
save.  To prevent this, Emacs prints a warning message and asks for
confirmation before saving.  Occasionally you will know why the file
was changed and know that it does not matter; then you can answer @{b}yes@{ub}
and proceed.  Otherwise, you should cancel the save with @{b}C-g@{ub} and
investigate the situation.

   The first thing you should do when notified that simultaneous
editing has already taken place is to list the directory with @{b}C-u C-x
C-d@{ub} (see @{"Directory Listing" Link "ListDir"}).  This will show the file's current author.
You should attempt to contact that person to warn him or her not to
continue editing.  Often the next step is to save the contents of your
Emacs buffer under a different name, and use @{b}diff@{ub} to compare the two
files.

   Simultaneous editing checks are also made when you visit with @{b}C-x
C-f@{ub} a file that is already visited and when you start to modify a
file.  This is not strictly necessary, but it can cause you to find out
about the problem earlier, when perhaps correction takes less work.


@EndNode

@Node "Reverting" "emacs/Reverting"
@Next "Auto Save"
@Prev "Saving"
@Toc "Files"

Reverting a Buffer
==================

   If you have made extensive changes to a file and then change your
mind about them, you can get rid of them by reading in the previous
version of the file.  To do this, use @{b}M-x revert-buffer@{ub}, which operates
on the current buffer.  Since this is a very dangerous thing to do, you
must confirm it with @{b}yes@{ub}.

   If the current buffer has been auto-saved more recently than it has
been saved for real, @{b}revert-buffer@{ub} offers to read the auto save file
instead of the visited file (see @{"Auto Save" Link "Auto Save"}).  This question comes
before the usual request for confirmation, and demands @{b}y@{ub} or @{b}n@{ub} as an
answer.  If you have started to type @{b}yes@{ub} for confirmation without
realizing that the other question was going to be asked, the @{b}y@{ub} will
answer that question, but the @{b}es@{ub} will not be valid confirmation.  So
you will have a chance to cancel the operation with @{b}C-g@{ub} and try it
again with the answers that you really intend.

   @{b}revert-buffer@{ub} keeps point at the same distance (measured in
characters) from the beginning of the file.  If the file was edited only
slightly, you will be at approximately the same piece of text after
reverting as before.  If you have made drastic changes, the same value
of point in the old file may address a totally different piece of text.

   A buffer reverted from its visited file is marked "not modified"
until another change is made.

   Some kinds of buffers whose contents reflect data bases other than
files, such as Dired buffers, can also be reverted.  For them,
reverting means recalculating their contents from the appropriate data
base.  Buffers created randomly with @{b}C-x b@{ub} cannot be reverted;
@{b}revert-buffer@{ub} reports an error when asked to do so.


@EndNode

@Node "Auto Save" "emacs/Auto Save"
@Next "ListDir"
@Prev "Reverting"
@Toc "Files"

Auto-Saving: Protection Against Disasters
=========================================

   Emacs saves all the visited files from time to time (based on
counting your keystrokes) without being asked.  This is called
@{i}auto-saving@{ui}.  It prevents you from losing more than a limited amount of
work if the system crashes.

   When Emacs determines that it is time for auto-saving, each buffer is
considered, and is auto-saved if auto-saving is turned on for it and it
has been changed since the last time it was auto-saved.  If any
auto-saving is done, the message @{b}Auto-saving...@{ub} is displayed in the
echo area until auto-saving is finished.  Errors occurring during
auto-saving are caught so that they do not interfere with the execution
of commands you have been typing.


 @{" Files " Link "Auto Save Files"}                 
 @{" Control " Link "Auto Save Control"}                   
 @{" Recover " Link "Recover"} 		Recovering text from auto-save files.


@EndNode

@Node "Auto Save Files" "emacs/Auto Save Files"
@Next "Auto Save Control"
@Prev "Auto Save"
@Toc "Auto Save"

Auto-Save Files
---------------

   Auto-saving does not normally save in the files that you visited,
because it can be very undesirable to save a program that is in an
inconsistent state when you have made half of a planned change.
Instead, auto-saving is done in a different file called the @{i}auto-save
file@{ui}, and the visited file is changed only when you request saving
explicitly (such as with @{b}C-x C-s@{ub}).

   Normally, the auto-save file name is made by appending @{b}#@{ub} to the
front and rear of the visited file name.  Thus, a buffer visiting file
@{b}foo.c@{ub} would be auto-saved in a file @{b}#foo.c#@{ub}.  Most buffers that are not
visiting files are auto-saved only if you request it explicitly; when
they are auto-saved, the auto-save file name is made by appending @{b}#%@{ub} to
the front and @{b}#@{ub} to the rear of buffer name.  For example, the @{b}*mail*@{ub}
buffer in which you compose messages to be sent is auto-saved in a file
named @{b}#%*mail*#@{ub}.  Auto-save file names are made this way unless you
reprogram parts of Emacs to do something different (the functions
@{b}make-auto-save-file-name@{ub} and @{b}auto-save-file-name-p@{ub}).  The file name to
be used for auto-saving in a buffer is calculated when auto-saving is
turned on in that buffer.

   If you want auto-saving to be done in the visited file, set the
variable @{b}auto-save-visited-file-name@{ub} to be non-@{b}nil@{ub}.  In this mode,
there is really no difference between auto-saving and explicit saving.

   A buffer's auto-save file is deleted when you save the buffer in its
visited file.  To inhibit this, set the variable @{b}delete-auto-save-files@{ub}
to @{b}nil@{ub}.  Changing the visited file name with @{b}C-x C-w@{ub} or
@{b}set-visited-file-name@{ub} renames any auto-save file to go with the new
visited name.


@EndNode

@Node "Auto Save Control" "emacs/Auto Save Control"
@Next "Recover"
@Prev "Auto Save Files"
@Toc "Auto Save"

Controlling Auto-Saving
-----------------------

   Each time you visit a file, auto-saving is turned on for that file's
buffer if the variable @{b}auto-save-default@{ub} is non-@{b}nil@{ub} (but not in batch
mode; see @{"Entering Emacs" Link "Entering Emacs"}).  The default for this variable is @{b}t@{ub}, so
auto-saving is the usual practice for file-visiting buffers.
Auto-saving can be turned on or off for any existing buffer with the
command @{b}M-x auto-save-mode@{ub}.  Like other minor mode commands, @{b}M-x
auto-save-mode@{ub} turns auto-saving on with a positive argument, off with a
zero or negative argument; with no argument, it toggles.

   Emacs does auto-saving periodically based on counting how many
characters you have typed since the last time auto-saving was done.
The variable @{b}auto-save-interval@{ub} specifies how many characters there are
between auto-saves.  By default, it is 300.  Emacs also auto-saves
whenever you call the function @{b}do-auto-save@{ub}.

   Emacs also does auto-saving whenever it gets a fatal error.  This
includes killing the Emacs job with a shell command such as @{b}kill
%emacs@{ub}, or disconnecting a phone line or network connection.


@EndNode

@Node "Recover" "emacs/Recover"
@Prev "Auto Save Control"
@Toc "Auto Save"

Recovering Data from Auto-Saves
-------------------------------

   The way to use the contents of an auto-save file to recover from a
loss of data is with the command @{b}M-x recover-file RET @{i}file@{ui} RET@{ub}.  This
visits @{i}file@{ui} and then (after your confirmation) restores the contents
from its auto-save file @{b} #@{i}file@{ui}#@{ub}.  You can then save with @{b}C-x C-s@{ub} to put
the recovered text into @{i}file@{ui} itself.  For example, to recover file
@{b}foo.c@{ub} from its auto-save file @{b}#foo.c#@{ub}, do:

     M-x recover-file RET foo.c RET
     C-x C-s

   Before asking for confirmation, @{b}M-x recover-file@{ub} displays a
directory listing describing the specified file and the auto-save file,
so you can compare their sizes and dates.  If the auto-save file is
older, @{b}M-x recover-file@{ub} does not offer to read it.

   Auto-saving is disabled by @{b}M-x recover-file@{ub} because using this
command implies that the auto-save file contains valuable data from a
past session.  If you save the data in the visited file and then go on
to make new changes, you should turn auto-saving back on with @{b}M-x
auto-save-mode@{ub}.


@EndNode

@Node "ListDir" "emacs/ListDir"
@Next "Dired"
@Prev "Auto Save"
@Toc "Files"

Listing a File Directory
========================

   Files are classified by Unix into @{i}directories@{ui}.  A @{i}directory listing@{ui}
is a list of all the files in a directory.  Emacs provides directory
listings in brief format (file names only) and verbose format (sizes,
dates, and authors included).

@{b}C-x C-d @{i}dir-or-pattern@{ui}@{ub}
     Print a brief directory listing (@{b}list-directory@{ub}).

@{b}C-u C-x C-d @{i}dir-or-pattern@{ui}@{ub}
     Print a verbose directory listing.

   The command to print a directory listing is @{b}C-x C-d@{ub} (@{b}list-directory@{ub}).
It reads using the minibuffer a file name which is either a directory
to be listed or a wildcard-containing pattern for the files to be
listed.  For example,

     C-x C-d /u2/emacs/etc RET

lists all the files in directory @{b}/u2/emacs/etc@{ub}.  An example of
specifying a file name pattern is

     C-x C-d /u2/emacs/src/*.c RET

   Normally, @{b}C-x C-d@{ub} prints a brief directory listing containing just
file names.  A numeric argument (regardless of value) tells it to print
a verbose listing (like @{b}ls -l@{ub}).

   The text of a directory listing is obtained by running @{b}ls@{ub} in an
inferior process.  Two Emacs variables control the switches passed to
@{b}ls@{ub}: @{b}list-directory-brief-switches@{ub} is a string giving the switches
to use in brief listings (@{b}"-CF"@{ub} by default), and
@{b}list-directory-verbose-switches@{ub} is a string giving the switches to use
in a verbose listing (@{b}"-l"@{ub} by default).


@EndNode

@Node "Dired" "emacs/Dired"
@Next "Misc File Ops"
@Prev "ListDir"
@Toc "Files"

Dired, the Directory Editor
===========================

   Dired makes it easy to delete or visit many of the files in a single
directory at once.  It makes an Emacs buffer containing a listing of the
directory.  You can use the normal Emacs commands to move around in this
buffer, and special Dired commands to operate on the files.


 @{" Enter " Link "Dired Enter"}                      How to invoke Dired.
 @{" Edit " Link "Dired Edit"}                       Editing the Dired buffer.
 @{" Deletion " Link "Dired Deletion"}                   Deleting files with Dired.
 @{" Immed " Link "Dired Immed"}                      Other file operations through Dired.


@EndNode

@Node "Dired Enter" "emacs/Dired Enter"
@Next "Dired Edit"
@Prev "Dired"
@Toc "Dired"

Entering Dired
--------------

   To invoke dired, do @{b}C-x d@{ub} or @{b}M-x dired@{ub}.  The command reads a
directory name or wildcard file name pattern as a minibuffer argument
just like the @{b}list-directory@{ub} command, @{b}C-x C-d@{ub}.  Where @{b}dired@{ub} differs
from @{b}list-directory@{ub} is in naming the buffer after the directory name or
the wildcard pattern used for the listing, and putting the buffer into
Dired mode so that the special commands of Dired are available in it.
The variable @{b}dired-listing-switches@{ub} is a string used as an argument to
@{b}ls@{ub} in making the directory; this string @{i}must@{ui} contain @{b}-l@{ub}.

   To display the Dired buffer in another window rather than in the
selected window, use @{b}C-x 4 d@{ub} (@{b}dired-other-window)@{ub} instead of @{b}C-x d@{ub}.


@EndNode

@Node "Dired Edit" "emacs/Dired Edit"
@Next "Dired Deletion"
@Prev "Dired Enter"
@Toc "Dired"

Editing in Dired
----------------

   Once the Dired buffer exists, you can switch freely between it and
other Emacs buffers.  Whenever the Dired buffer is selected, certain
special commands are provided that operate on files that are listed.
The Dired buffer is "read-only", and inserting text in it is not
useful, so ordinary printing characters such as @{b}d@{ub} and @{b}x@{ub} are used for
Dired commands.  Most Dired commands operate on the file described by
the line that point is on.  Some commands perform operations
immediately; others "flag" the file to be operated on later.

   Most Dired commands that operate on the current line's file also
treat a numeric argument as a repeat count, meaning to act on the files
of the next few lines.  A negative argument means to operate on the
files of the preceding lines, and leave point on the first of those
lines.

   All the usual Emacs cursor motion commands are available in Dired
buffers.  Some special purpose commands are also provided.  The keys
@{b}C-n@{ub} and @{b}C-p@{ub} are redefined so that they try to position the cursor
at the beginning of the filename on the line, rather than at the
beginning of the line.

   For extra convenience, SPC and @{b}n@{ub} in Dired are equivalent to @{b}C-n@{ub}.  @{b}p@{ub}
is equivalent to @{b}C-p@{ub}.  Moving by lines is done so often in Dired that
it deserves to be easy to type.  DEL (move up and unflag) is often
useful simply for moving up.

   The @{b}g@{ub} command in Dired runs @{b}revert-buffer@{ub} to reinitialize the buffer
from the actual disk directory and show any changes made in the
directory by programs other than Dired.  All deletion flags in the Dired
buffer are lost when this is done.


@EndNode

@Node "Dired Deletion" "emacs/Dired Deletion"
@Next "Dired Immed"
@Prev "Dired Edit"
@Toc "Dired"

Deleting Files with Dired
-------------------------

   The primary use of Dired is to flag files for deletion and then
delete them.

@{b}d@{ub}
     Flag this file for deletion.

@{b}u@{ub}
     Remove deletion-flag on this line.

@{b}DEL@{ub}
     Remove deletion-flag on previous line, moving point to that line.

@{b}x@{ub}
     Delete the files that are flagged for deletion.

@{b}#@{ub}
     Flag all auto-save files (files whose names start and end with @{b}#@{ub})
     for deletion (see @{"Auto Save" Link "Auto Save"}).

@{b}~@{ub}
     Flag all backup files (files whose names end with @{b}~@{ub}) for deletion
     (see @{"Backup" Link "Backup"}).

@{b} . (Period)@{ub}
     Flag excess numeric backup files for deletion.  The oldest and
     newest few backup files of any one file are exempt; the middle
     ones are flagged.

   You can flag a file for deletion by moving to the line describing the
file and typing @{b}d@{ub} or @{b}C-d@{ub}.  The deletion flag is visible as a @{b}D@{ub} at the
beginning of the line.  Point is moved to the beginning of the next
line, so that repeated @{b}d@{ub} commands flag successive files.

   The files are flagged for deletion rather than deleted immediately to
avoid the danger of deleting a file accidentally.  Until you direct
Dired to delete the flagged files, you can remove deletion flags using
the commands @{b}u@{ub} and DEL.  @{b}u@{ub} works just like @{b}d@{ub}, but removes flags rather
than making flags.  DEL moves upward, removing flags; it is like @{b}u@{ub} with
numeric argument automatically negated.

   To delete the flagged files, type @{b}x@{ub}.  This command first displays a
list of all the file names flagged for deletion, and requests
confirmation with @{b}yes@{ub}.  Once you confirm, all the flagged files are
deleted, and their lines are deleted from the text of the Dired buffer.
The shortened Dired buffer remains selected.  If you answer @{b}no@{ub} or quit
with @{b}C-g@{ub}, you return immediately to Dired, with the deletion flags
still present and no files actually deleted.

   The @{b}#@{ub}, @{b}~@{ub} and @{b}.@{ub} commands flag many files for deletion, based on their
names.  These commands are useful precisely because they do not
actually delete any files; you can remove the deletion flags from any
flagged files that you really wish to keep.

   @{b}#@{ub} flags for deletion all files that appear to have been made by
auto-saving (that is, files whose names begin and end with @{b}#@{ub}).  @{b}~@{ub} flags
for deletion all files that appear to have been made as backups for
files that were edited (that is, files whose names end with @{b}~@{ub}).

   @{b}.@{ub} (Period) flags just some of the backup files for deletion: only
numeric backups that are not among the oldest few nor the newest few
backups of any one file.  Normally @{b}dired-kept-versions@{ub} (not
@{b}kept-new-versions@{ub}; that applies only when saving) specifies the number
of newest versions of each file to keep, and @{b}kept-old-versions@{ub}
specifies the number of oldest versions to keep.  Period with a
positive numeric argument, as in @{b}C-u 3 .@{ub}, specifies the number of
newest versions to keep, overriding @{b}dired-kept-versions@{ub}.  A negative
numeric argument overrides @{b}kept-old-versions@{ub}, using minus the value of
the argument to specify the number of oldest versions of each file to
keep.


@EndNode

@Node "Dired Immed" "emacs/Dired Immed"
@Prev "Dired Deletion"
@Toc "Dired"

Immediate File Operations in Dired
----------------------------------

   Some file operations in Dired take place immediately when they are
requested.

@{b}c@{ub}
     Copies the file described on the current line.  You must supply a
     file name to copy to, using the minibuffer.

@{b}f@{ub}
     Visits the file described on the current line.  It is just like
     typing @{b}C-x C-f@{ub} and supplying that file name.  If the file on this
     line is a subdirectory, @{b}f@{ub} actually causes Dired to be invoked on
     that subdirectory.  See @{"Visiting" Link "Visiting"}.

@{b}o@{ub}
     Like @{b}f@{ub}, but uses another window to display the file's buffer.  The
     Dired buffer remains visible in the first window.  This is like
     using @{b}C-x 4 C-f@{ub} to visit the file.  See @{"Windows" Link "Windows"}.

@{b}r@{ub}
     Renames the file described on the current line.  You must supply a
     file name to rename to, using the minibuffer.

@{b}v@{ub}
     Views the file described on this line using @{b}M-x view-file@{ub}.
     Viewing a file is like visiting it, but is slanted toward moving
     around in the file conveniently and does not allow changing the
     file.  See @{"View File" Link "Misc File Ops"}.  Viewing a file that is a directory runs
     Dired on that directory.


@EndNode

@Node "Misc File Ops" "emacs/Misc File Ops"
@Prev "Dired"
@Toc "Files"

Miscellaneous File Operations
=============================

   Emacs has commands for performing many other operations on files.
All operate on one file; they do not accept wild card file names.

   @{b}M-x view-file@{ub} allows you to scan or read a file by sequential
screenfuls.  It reads a file name argument using the minibuffer.  After
reading the file into an Emacs buffer, @{b}view-file@{ub} reads and displays one
windowful.  You can then type SPC to scroll forward one windowful, or
DEL to scroll backward.  Various other commands are provided for moving
around in the file, but none for changing it; type @{b}C-h@{ub} while viewing
for a list of them.  They are mostly the same as normal Emacs cursor
motion commands.  To exit from viewing, type @{b}C-c@{ub}.

   @{b}M-x insert-file@{ub} inserts a copy of the contents of the specified file
into the current buffer at point, leaving point unchanged before the
contents and the mark after them.  See @{"Mark" Link "Mark"}.

   @{b}M-x write-region@{ub} is the inverse of @{b}M-x insert-file@{ub}; it copies the
contents of the region into the specified file.  @{b}M-x append-to-file@{ub}
adds the text of the region to the end of the specified file.

   @{b}M-x delete-file@{ub} deletes the specified file, like the @{b}rm@{ub} command in
the shell.  If you are deleting many files in one directory, it may be
more convenient to use Dired (see @{"Dired" Link "Dired"}).

   @{b}M-x rename-file@{ub} reads two file names @{i}old@{ui} and @{i}new@{ui} using the
minibuffer, then renames file @{i}old@{ui} as @{i}new@{ui}.  If a file named @{i}new@{ui} already
exists, you must confirm with @{b}yes@{ub} or renaming is not done; this is
because renaming causes the old meaning of the name @{i}new@{ui} to be lost.  If
@{i}old@{ui} and @{i}new@{ui} are on different file systems, the file @{i}old@{ui} is copied and
deleted.

   The similar command @{b}M-x add-name-to-file@{ub} is used to add an
additional name to an existing file without removing its old name.  The
new name must belong on the same file system that the file is on.

   @{b}M-x copy-file@{ub} reads the file @{i}old@{ui} and writes a new file named @{i}new@{ui}
with the same contents.  Confirmation is required if a file named @{i}new@{ui}
already exists, because copying has the consequence of overwriting the
old contents of the file @{i}new@{ui}.

   @{b}M-x make-symbolic-link@{ub} reads two file names @{i}old@{ui} and @{i}linkname@{ui}, and
then creates a symbolic link named @{i}linkname@{ui} and pointing at @{i}old@{ui}.  The
effect is that future attempts to open file @{i}linkname@{ui} will refer to
whatever file is named @{i}old@{ui} at the time the opening is done, or will get
an error if the name @{i}old@{ui} is not in use at that time.  Confirmation is
required when creating the link if @{i}linkname@{ui} is in use.  Note that not
all systems support symbolic links.


@EndNode

@Node "Buffers" "emacs/Buffers"
@Next "Windows"
@Prev "Files"
@Toc "Main"

Using Multiple Buffers
**********************

   The text you are editing in Emacs resides in an object called a
@{i}buffer@{ui}.  Each time you visit a file, a buffer is created to hold the
file's text.  Each time you invoke Dired, a buffer is created to hold
the directory listing.  If you send a message with @{b}C-x m@{ub}, a buffer named
@{b}*mail*@{ub} is used to hold the text of the message.  When you ask for a
command's documentation, that appears in a buffer called @{b}*Help*@{ub}.

   At any time, one and only one buffer is @{i}selected@{ui}.  It is also called
the @{i}current buffer@{ui}.  Often we say that a command operates on "the
buffer" as if there were only one; but really this means that the
command operates on the selected buffer (most commands do).

   When Emacs makes multiple windows, each window has a chosen buffer
which is displayed there, but at any time only one of the windows is
selected and its chosen buffer is the selected buffer.  Each window's
mode line displays the name of the buffer that the window is displaying
(see @{"Windows" Link "Windows"}).

   Each buffer has a name, which can be of any length, and you can
select any buffer by giving its name.  Most buffers are made by
visiting files, and their names are derived from the files' names.  But
you can also create an empty buffer with any name you want.  A newly
started Emacs has a buffer named @{b}*scratch*@{ub} which can be used for
evaluating Lisp expressions in Emacs.  The distinction between upper
and lower case matters in buffer names.

   Each buffer records individually what file it is visiting, whether
it is modified, and what major mode and minor modes are in effect in it
(see @{"Major Modes" Link "Major Modes"}).  Any Emacs variable can be made @{i}local to@{ui} a
particular buffer, meaning its value in that buffer can be different
from the value in other buffers.  See @{"Locals" Link "Locals"}.


 @{" Select Buffer " Link "Select Buffer"}    Creating a new buffer or reselecting an old one.
 @{" List Buffers " Link "List Buffers"}     Getting a list of buffers that exist.
 @{" Misc Buffer " Link "Misc Buffer"}      Renaming; changing read-onliness; copying text.
 @{" Kill Buffer " Link "Kill Buffer"}      Killing buffers you no longer need.
 @{" Several Buffers " Link "Several Buffers"}  How to go through the list of all buffers
                     and operate variously on several of them.


@EndNode

@Node "Select Buffer" "emacs/Select Buffer"
@Next "List Buffers"
@Prev "Buffers"
@Toc "Buffers"

Creating and Selecting Buffers
==============================

@{b}C-x b @{i}buffer@{ui} RET@{ub}
     Select or create a buffer named @{i}buffer@{ui} (@{b}switch-to-buffer@{ub}).

@{b}C-x 4 b @{i}buffer@{ui} RET@{ub}
     Similar, but select a buffer named @{i}buffer@{ui} in another window
     (@{b}switch-to-buffer-other-window@{ub}).

   To select the buffer named @{i}bufname@{ui}, type @{b}C-x b @{i}bufname@{ui} RET@{ub}.  This is
the command @{b}switch-to-buffer@{ub} with argument @{i}bufname@{ui}.  You can use
completion on an abbreviation for the buffer name you want (see
@{"Completion" Link "Completion"}).  An empty argument to @{b}C-x b@{ub} specifies the most recently
selected buffer that is not displayed in any window.

   Most buffers are created by visiting files, or by Emacs commands that
want to display some text, but you can also create a buffer explicitly
by typing @{b}C-x b @{i}bufname@{ui} RET@{ub}.  This makes a new, empty buffer which is
not visiting any file, and selects it for editing.  Such buffers are
used for making notes to yourself.  If you try to save one, you are
asked for the file name to use.  The new buffer's major mode is
determined by the value of @{b}default-major-mode@{ub} (see @{"Major Modes" Link "Major Modes"}).

   Note that @{b}C-x C-f@{ub}, and any other command for visiting a file, can
also be used to switch buffers.  See @{"Visiting" Link "Visiting"}.


@EndNode

@Node "List Buffers" "emacs/List Buffers"
@Next "Misc Buffer"
@Prev "Select Buffer"
@Toc "Buffers"

Listing Existing Buffers
========================

@{b}C-x C-b@{ub}
     List the existing buffers (@{b}list-buffers@{ub}).

   To print a list of all the buffers that exist, type @{b}C-x C-b@{ub}.  Each
line in the list shows one buffer's name, major mode and visited file.
@{b}*@{ub} at the beginning of a line indicates the buffer is "modified".  If
several buffers are modified, it may be time to save some with @{b}C-x s@{ub}
(see @{"Saving" Link "Saving"}).  @{b}%@{ub} indicates a read-only buffer.  @{b}.@{ub} marks the selected
buffer.  Here is an example of a buffer list:

      MR Buffer         Size  Mode           File
      -- ------         ----  ----           ----
     .*  emacs.tex      383402 Texinfo       /u2/emacs/man/emacs.tex
         *Help*         1287  Fundamental
         files.el       23076 Emacs-Lisp     /u2/emacs/lisp/files.el
       % RMAIL          64042 RMAIL          /u/rms/RMAIL
      *% man            747   Dired
         net.emacs      343885 Fundamental   /u/rms/net.emacs
         fileio.c       27691 C              /u2/emacs/src/fileio.c
         NEWS           67340 Text           /u2/emacs/etc/NEWS
         *scratch*	   0	 Lisp Interaction

Note that the buffer @{b}*Help*@{ub} was made by a help request; it is not
visiting any file.  The buffer @{b}man@{ub} was made by Dired on the directory
@{b}/u2/emacs/man/@{ub}.


@EndNode

@Node "Misc Buffer" "emacs/Misc Buffer"
@Next "Kill Buffer"
@Prev "List Buffers"
@Toc "Buffers"

Miscellaneous Buffer Operations
===============================

@{b}C-x C-q@{ub}
     Toggle read-only status of buffer (@{b}toggle-read-only@{ub}).

@{b}M-x rename-buffer@{ub}
     Change the name of the current buffer.

@{b}M-x view-buffer@{ub}
     Scroll through a buffer.

   A buffer can be @{i}read-only@{ui}, which means that commands to change its
text are not allowed.  Normally, read-only buffers are made by
subsystems such as Dired and Rmail that have special commands to
operate on the text; a read-only buffer is also made if you visit a
file that is protected so you cannot write it.  If you wish to make
changes in a read-only buffer, use the command @{b}C-x C-q@{ub}
(@{b}toggle-read-only@{ub}).  It makes a read-only buffer writable, and
makes a writable buffer read-only.  This works by setting the variable
@{b}buffer-read-only@{ub}, which has a local value in each buffer and makes the
buffer read-only if its value is non-@{b}nil@{ub}.

   @{b}M-x rename-buffer@{ub} changes the name of the current buffer.  Specify
the new name as a minibuffer argument.  There is no default.  If you
specify a name that is in use for some other buffer, an error happens
and no renaming is done.

   @{b}M-x view-buffer@{ub} is much like @{b}M-x view-file@{ub} (see @{"Misc File Ops" Link "Misc File Ops"})
except that it examines an already existing Emacs buffer.  View mode
provides commands for scrolling through the buffer conveniently but not
for changing it. When you exit View mode, the value of point that
resulted from your perusal remains in effect.

   The commands @{b}C-x a@{ub} (@{b}append-to-buffer@{ub}) and @{b}M-x insert-buffer@{ub} can be
used to copy text from one buffer to another.  See @{"Accumulating Text" Link "Accumulating Text"}.


@EndNode

@Node "Kill Buffer" "emacs/Kill Buffer"
@Next "Several Buffers"
@Prev "Misc Buffer"
@Toc "Buffers"

Killing Buffers
===============

   After you use Emacs for a while, you may accumulate a large number of
buffers.  You may then find it convenient to eliminate the ones you no
longer need.  There are several commands provided for doing this.

@{b}C-x k@{ub}
     Kill a buffer, specified by name (@{b}kill-buffer@{ub}).

@{b}M-x kill-some-buffers@{ub}
     Offer to kill each buffer, one by one.

   @{b}C-x k@{ub} (@{b}kill-buffer@{ub}) kills one buffer, whose name you specify in the
minibuffer.  The default, used if you type just RET in the minibuffer,
is to kill the current buffer.  If the current buffer is killed,
another buffer is selected; a buffer that has been selected recently
but does not appear in any window now is chosen to be selected.  If the
buffer being killed is modified (has unsaved editing) then you are
asked to confirm with @{b}yes@{ub} before the buffer is killed.

   The command @{b}M-x kill-some-buffers@{ub} asks about each buffer, one by
one.  An answer of @{b}y@{ub} means to kill the buffer.  Killing the current
buffer or a buffer containing unsaved changes selects a new buffer or
asks for confirmation just like @{b}kill-buffer@{ub}.


@EndNode

@Node "Several Buffers" "emacs/Several Buffers"
@Prev "Kill Buffer"
@Toc "Buffers"

Operating on Several Buffers
============================

   The @{i}buffer-menu@{ui} facility is like a "Dired for buffers"; it allows
you to request operations on various Emacs buffers by editing an Emacs
buffer containing a list of them.  You can save buffers, kill them
(here called @{i}deleting@{ui} them, for consistency with Dired), or display
them.

@{b}M-x buffer-menu@{ub}
     Begin editing a buffer listing all Emacs buffers.

   The command @{b}buffer-menu@{ub} writes a list of all Emacs buffers into the
buffer @{b}*Buffer List*@{ub}, and selects that buffer in Buffer Menu mode.  The
buffer is read-only, and can only be changed through the special
commands described in this section.  Most of these commands are graphic
characters.  The usual Emacs cursor motion commands can be used in the
@{b}*Buffer List*@{ub} buffer.  The following special commands apply to the
buffer described on the current line.

@{b}d@{ub}
     Request to delete (kill) the buffer, then move down.  The request
     shows as a @{b}D@{ub} on the line, before the buffer name.  Requested
     deletions take place when the @{b}x@{ub} command is used.

@{b}k@{ub}
     Synonym for @{b}d@{ub}.

@{b}C-d@{ub}
     Like @{b}d@{ub} but move up afterwards instead of down.

@{b}s@{ub}
     Request to save the buffer.  The request shows as an @{b}S@{ub} on the
     line.  Requested saves take place when the @{b}x@{ub} command is used.  You
     may request both saving and deletion for the same buffer.

@{b}~@{ub}
     Mark buffer "unmodified".  The command @{b}~@{ub} does this immediately
     when typed.

@{b}x@{ub}
     Perform previously requested deletions and saves.

@{b}u@{ub}
     Remove any request made for the current line, and move down.

@{b}DEL@{ub}
     Move to previous line and remove any request made for that line.

   All the commands that put in or remove flags to request later
operations also move down a line, and accept a numeric argument as a
repeat count, unless otherwise specified.

   There are also special commands to use the buffer list to select
another buffer, and to specify one or more other buffers for display in
additional windows.

@{b}1@{ub}
     Select the buffer in a full-screen window.  This command takes
     effect immediately.

@{b}2@{ub}
     Immediately set up two windows, with this buffer in one, and the
     previously selected buffer (aside from the buffer @{b}*Buffer List*@{ub})
     in the other.

@{b}f@{ub}
     Immediately select the buffer in place of the @{b}*Buffer List*@{ub} buffer.

@{b}o@{ub}
     Immediately select the buffer in another window as if by @{b}C-x 4 b@{ub},
     leaving @{b}*Buffer List*@{ub} visible.

@{b}q@{ub}
     Immediately select this buffer, and also display in other windows
     any buffers previously flagged with the @{b}m@{ub} command.  If there are no
     such buffers, this command is equivalent to @{b}1@{ub}.

@{b}m@{ub}
     Flag this buffer to be displayed in another window if the @{b}q@{ub}
     command is used.  The request shows as a @{b}>@{ub} at the beginning of the
     line.  The same buffer may not have both a delete request and a
     display request.

   All that @{b}buffer-menu@{ub} does directly is create and select a suitable
buffer, and turn on Buffer Menu mode.  Everything else described above
is implemented by the special commands provided in Buffer Menu mode.
One consequence of this is that you can switch from the @{b}*Buffer List*@{ub}
buffer to another Emacs buffer, and edit there.  You can reselect the
@{b}buffer-menu@{ub} buffer later, to perform the operations already requested,
or you can kill it, or pay no further attention to it.

   The only difference between @{b}buffer-menu@{ub} and @{b}list-buffers@{ub} is that
@{b}buffer-menu@{ub} selects the @{b}*Buffer List*@{ub} buffer and @{b}list-buffers@{ub} does not.
If you run @{b}list-buffers@{ub} (that is, type @{b}C-x C-b@{ub}) and select the buffer
list manually, you can use all of the commands described here.


@EndNode

@Node "Windows" "emacs/Windows"
@Next "Major Modes"
@Prev "Buffers"
@Toc "Main"

Multiple Windows
****************

   Emacs can split the screen into two or many windows, which can
display parts of different buffers, or different parts of one buffer.


 @{" Basic Window " Link "Basic Window"}      Introduction to Emacs windows.
 @{" Split Window " Link "Split Window"}      New windows are made by splitting existing windows.
 @{" Other Window " Link "Other Window"}      Moving to another window or doing something to it.
 @{" Pop Up Window " Link "Pop Up Window"}     Finding a file or buffer in another window.
 @{" Change Window " Link "Change Window"}     Deleting windows and changing their sizes.


@EndNode

@Node "Basic Window" "emacs/Basic Window"
@Next "Split Window"
@Prev "Windows"
@Toc "Windows"

Concepts of Emacs Windows
=========================

   When multiple windows are being displayed, each window has an Emacs
buffer designated for display in it.  The same buffer may appear in more
than one window; if it does, any changes in its text are displayed in
all the windows where it appears.  But the windows showing the same
buffer can show different parts of it, because each window has its own
value of point.

   At any time, one of the windows is the @{i}selected window@{ui}; the buffer
this window is displaying is the current buffer.  The terminal's cursor
shows the location of point in this window.  Each other window has a
location of point as well, but since the terminal has only one cursor
there is no way to show where those locations are.

   Commands to move point affect the value of point for the selected
Emacs window only.  They do not change the value of point in any other
Emacs window, even one showing the same buffer.  The same is true for
commands such as @{b}C-x b@{ub} to change the selected buffer in the selected
window; they do not affect other windows at all.  However, there are
other commands such as @{b}C-x 4 b@{ub} that select a different window and
switch buffers in it.  Also, all commands that display information in a
window, including (for example) @{b}C-h f@{ub} (@{b}describe-function@{ub}) and @{b}C-x C-b@{ub}
(@{b}list-buffers@{ub}), work by switching buffers in a nonselected window
without affecting the selected window.

   Each window has its own mode line, which displays the buffer name,
modification status and major and minor modes of the buffer that is
displayed in the window.  See @{"Mode Line" Link "Mode Line"}, for full details on the mode
line.


@EndNode

@Node "Split Window" "emacs/Split Window"
@Next "Other Window"
@Prev "Basic Window"
@Toc "Windows"

Splitting Windows
=================

@{b}C-x 2@{ub}
     Split the selected window into two windows, one above the other
     (@{b}split-window-vertically@{ub}).

@{b}C-x 5@{ub}
     Split the selected window into two windows positioned side by side
     (@{b}split-window-horizontally@{ub}).

   The command @{b}C-x 2@{ub} (@{b}split-window-vertically@{ub}) breaks the selected
window into two windows, one above the other.  Both windows start out
displaying the same buffer, with the same value of point.  By default
the two windows each get half the height of the window that was split; a
numeric argument specifies how many lines to give to the top window.

   @{b}C-x 5@{ub} (@{b}split-window-horizontally@{ub}) breaks the selected window into
two side-by-side windows.  A numeric argument specifies how many
columns to give the one on the left.  A line of vertical bars separates
the two windows.  Windows that are not the full width of the screen
have mode lines, but they are truncated; also, they do not always
appear in inverse video, because, the Emacs display routines have not
been taught how to display a region of inverse video that is only part
of a line on the screen.

   When a window is less than the full width, text lines too long to
fit are frequent.  Continuing all those lines might be confusing.  The
variable @{b}truncate-partial-width-windows@{ub} can be set non-@{b}nil@{ub} to force
truncation in all windows less than the full width of the screen,
independent of the buffer being displayed and its value for
@{b}truncate-lines@{ub}.  See @{"Continuation Lines" Link "Continuation Lines"}.

   Horizontal scrolling is often used in side-by-side windows.  See
@{"Display" Link "Display"}.


@EndNode

@Node "Other Window" "emacs/Other Window"
@Next "Pop Up Window"
@Prev "Split Window"
@Toc "Windows"

Using Other Windows
===================

@{b}C-x o@{ub}
     Select another window (@{b}other-window@{ub}).  That is @{b}o@{ub}, not zero.

@{b}C-M-v@{ub}
     Scroll the next window (@{b}scroll-other-window@{ub}).

@{b}M-x compare-windows@{ub}
     Find next place where the text in the selected window does not
     match the text in the next window.

   To select a different window, use @{b}C-x o@{ub} (@{b}other-window@{ub}).  That is an
@{b}o@{ub}, for `other', not a zero.  When there are more than two windows,
this command moves through all the windows in a cyclic order, generally
top to bottom and left to right.  From the rightmost and bottommost
window, it goes back to the one at the upper left corner.  A numeric
argument means to move several steps in the cyclic order of windows.  A
negative argument moves around the cycle in the opposite order.  When
the minibuffer is active, the minibuffer is the last window in the
cycle; you can switch from the minibuffer window to one of the other
windows, and later switch back and finish supplying the minibuffer
argument that is requested.  See @{"Minibuffer Edit" Link "Minibuffer Edit"}.

   The usual scrolling commands (see @{"Display" Link "Display"}) apply to the selected
window only, but there is one command to scroll the next window.  @{b}C-M-v@{ub}
(@{b}scroll-other-window@{ub}) scrolls the window that @{b}C-x o@{ub} would select.  It
takes arguments, positive and negative, like @{b}C-v@{ub}.

   The command @{b}M-x compare-windows@{ub} compares the text in the current
window with that in the next window.  Comparison starts at point in each
window.  Point moves forward in each window, a character at a time in
each window, until the next characters in the two windows are
different.  Then the command is finished.


@EndNode

@Node "Pop Up Window" "emacs/Pop Up Window"
@Next "Change Window"
@Prev "Other Window"
@Toc "Windows"

Displaying in Another Window
============================

   @{b}C-x 4@{ub} is a prefix key for commands that select another window
(splitting the window if there is only one) and select a buffer in that
window.  Different @{b}C-x 4@{ub} commands have different ways of finding the
buffer to select.

@{b}C-x 4 b @{i}bufname@{ui} RET@{ub}
     Select buffer @{i}bufname@{ui} in another window.  This runs
     @{b}switch-to-buffer-other-window@{ub}.

@{b}C-x 4 f @{i}filename@{ui} RET@{ub}
     Visit file @{i}filename@{ui} and select its buffer in another window.  This
     runs @{b}find-file-other-window@{ub}.  See @{"Visiting" Link "Visiting"}.

@{b}C-x 4 d @{i}directory@{ui} RET@{ub}
     Select a Dired buffer for directory @{i}directory@{ui} in another window.
     This runs @{b}dired-other-window@{ub}.  See @{"Dired" Link "Dired"}.

@{b}C-x 4 m@{ub}
     Start composing a mail message in another window.  This runs
     @{b}mail-other-window@{ub}, and its same-window version is @{b}C-x m@{ub} (see
     @{"Sending Mail" Link "Sending Mail"}).

@{b}C-x 4 .@{ub}
     Find a tag in the current tag table in another window.  This runs
     @{b}find-tag-other-window@{ub}, the multiple-window variant of @{b}M-.@{ub} (see
     @{"Tags" Link "Tags"}).


@EndNode

@Node "Change Window" "emacs/Change Window"
@Prev "Pop Up Window"
@Toc "Windows"

Deleting and Rearranging Windows
================================

@{b}C-x 0@{ub}
     Get rid of the selected window (@{b}kill-window@{ub}).  That is a zero.

@{b}C-x 1@{ub}
     Get rid of all windows except the selected one
     (@{b}delete-other-windows@{ub}).

@{b}C-x ^@{ub}
     Make the selected window taller, at the expense of the other(s)
     (@{b}enlarge-window@{ub}).

@{b}C-x }@{ub}
     Widen the selected window (@{b}enlarge-window-horizontally@{ub}).

   To delete a window, type @{b}C-x 0@{ub} (@{b}delete-window@{ub}).  (That is a zero.)
The space occupied by the deleted window is distributed among the other
active windows (but not the minibuffer window, even if that is active
at the time).  Once a window is deleted, its attributes are forgotten;
there is no automatic way to make another window of the same shape or
showing the same buffer.  But the buffer continues to exist, and you can
select it in any window with @{b}C-x b@{ub}.

   @{b}C-x 1@{ub} (@{b}delete-other-windows@{ub}) is more powerful than @{b}C-x 0@{ub}; it deletes
all the windows except the selected one (and the minibuffer); the
selected window expands to use the whole screen except for the echo
area.

   To readjust the division of space among existing windows, use @{b}C-x ^@{ub}
(@{b}enlarge-window@{ub}).  It makes the currently selected window get one
line bigger, or as many lines as is specified with a numeric argument.
With a negative argument, it makes the selected window smaller.  @{b}C-x }@{ub}
(@{b}enlarge-window-horizontally@{ub}) makes the selected window wider by
the specified number of columns.  The extra screen space given to a
window comes from one of its neighbors, if that is possible; otherwise,
all the competing windows are shrunk in the same proportion.  If this
makes any windows too small, those windows are deleted and their space
is divided up.  The minimum size is specified by the variables
@{b}window-min-height@{ub} and @{b}window-min-width@{ub}.


@EndNode

@Node "Major Modes" "emacs/Major Modes"
@Next "Indentation"
@Prev "Windows"
@Toc "Main"

Major Modes
***********

   Emacs has many different @{i}major modes@{ui}, each of which customizes Emacs
for editing text of a particular sort.  The major modes are mutually
exclusive, and each buffer has one major mode at any time.  The mode
line normally contains the name of the current major mode, in
parentheses.  See @{"Mode Line" Link "Mode Line"}.

   The least specialized major mode is called @{i}Fundamental mode@{ui}.  This
mode has no mode-specific redefinitions or variable settings, so that
each Emacs command behaves in its most general manner, and each option
is in its default state.  For editing any specific type of text, such
as Lisp code or English text, you should switch to the appropriate
major mode, such as Lisp mode or Text mode.

   Selecting a major mode changes the meanings of a few keys to become
more specifically adapted to the language being edited.  The ones which
are changed frequently are TAB, DEL, and LFD.  In addition, the
commands which handle comments use the mode to determine how comments
are to be delimited.  Many major modes redefine the syntactical
properties of characters appearing in the buffer.  See @{"Syntax" Link "Syntax"}.

   The major modes fall into three major groups.  Lisp mode (which has
several variants), C mode and Muddle mode are for specific programming
languages.  Text mode, Nroff mode, TeX mode and Outline mode are for
editing English text.  The remaining major modes are not intended for
use on users' files; they are used in buffers created for specific
purposes by Emacs, such as Dired mode for buffers made by Dired (see
@{"Dired" Link "Dired"}), and Mail mode for buffers made by @{b}C-x m@{ub} (see @{"Sending Mail" Link "Sending Mail"}), and
Shell mode for buffers used for communicating with an inferior shell
process (see @{"Interactive Shell" Link "Interactive Shell"}).

   Most programming language major modes specify that only blank lines
separate paragraphs.  This is so that the paragraph commands remain
useful.  See @{"Paragraphs" Link "Paragraphs"}.  They also cause Auto Fill mode to use the
definition of TAB to indent the new lines it creates.  This is because
most lines in a program are usually indented.  See @{"Indentation" Link "Indentation"}.


 @{" Choosing Modes " Link "Choosing Modes"}      How major modes are specified or chosen.


@EndNode

@Node "Choosing Modes" "emacs/Choosing Modes"
@Prev "Major Modes"
@Toc "Major Modes"

How Major Modes are Chosen
==========================

   You can select a major mode explicitly for the current buffer, but
most of the time Emacs determines which mode to use based on the file
name or some text in the file.

   Explicit selection of a new major mode is done with a @{b}M-x@{ub} command.
From the name of a major mode, add @{b}-mode@{ub} to get the name of a command
to select that mode.  Thus, you can enter Lisp mode by executing @{b}M-x
lisp-mode@{ub}.

   When you visit a file, Emacs usually chooses the right major mode
based on the file's name.  For example, files whose names end in @{b}.c@{ub} are
edited in C mode.  The correspondence between file names and major mode
is controlled by the variable @{b}auto-mode-alist@{ub}.  Its value is a list in
which each element has the form

     (@{i}regexp@{ui} . @{i}mode-function@{ui})

For example, one element normally found in the list has the form @{b}
(@{i}"\\.c$"@{ui} . c-mode)@{ub}, and it is responsible for selecting C mode for
files whose names end in @{b}.c@{ub}.  (Note that @{b}\\ @{ub} is needed in Lisp syntax
to include a @{b}\ @{ub} in the string, which is needed to suppress the special
meaning of @{b}.@{ub} in regexps.)  The only practical way to change this
variable is with Lisp code.

   You can specify which major mode should be used for editing a certain
file by a special sort of text in the first nonblank line of the file.
The mode name should appear in this line both preceded and followed by
@{b}-*-@{ub}.  Other text may appear on the line as well.  For example,

     ;-*-Lisp-*-

tells Emacs to use Lisp mode.  Note how the semicolon is used to make
Lisp treat this line as a comment.  Such an explicit specification
overrides any defaulting based on the file name.

   Another format of mode specification is

     -*-Mode: @{i}modename@{ui};-*-

which allows other things besides the major mode name to be specified.
However, Emacs does not look for anything except the mode name.

   The major mode can also be specified in a local variables list.  See
@{"File Variables" Link "File Variables"}.

   When a file is visited that does not specify a major mode to use, or
when a new buffer is created with @{b}C-x b@{ub}, the major mode used is that specified by the variable
@{b}default-major-mode@{ub}.  Normally this value is the symbol
@{b}fundamental-mode@{ub}, which specifies Fundamental mode.  If
@{b}default-major-mode@{ub} is @{b}nil@{ub}, the major mode is taken from the previously
selected buffer.

   The command @{b}M-x normal-mode@{ub} recalculates the major mode from the
visited file name and the contents of the buffer.


@EndNode

@Node "Indentation" "emacs/Indentation"
@Next "Text"
@Prev "Major Modes"
@Toc "Main"

Indentation
***********

@{b}TAB@{ub}
     Indent current line "appropriately" in a mode-dependent fashion.

@{b}LFD@{ub}
     Perform RET followed by TAB (@{b}newline-and-indent@{ub}).

@{b}M-^@{ub}
     Merge two lines (@{b}delete-indentation@{ub}).  This would cancel out the
     effect of LFD.

@{b}C-M-o@{ub}
     Split line at point; text on the line after point becomes a new
     line indented to the same column that it now starts in
     (@{b}split-line@{ub}).

@{b}M-m@{ub}
     Move (forward or back) to the first nonblank character on the
     current line (@{b}back-to-indentation@{ub}).

@{b}C-M-\ @{ub}
     Indent several lines to same column (@{b}indent-region@{ub}).

@{b}C-x TAB@{ub}
     Shift block of lines rigidly right or left (@{b}indent-rigidly@{ub}).

@{b}M-i@{ub}
     Indent from point to the next prespecified tab stop column
     (@{b}tab-to-tab-stop@{ub}).

@{b}M-x indent-relative@{ub}
     Indent from point to under an indentation point in the previous
     line.

   Most programming languages have some indentation convention.  For
Lisp code, lines are indented according to their nesting in
parentheses.  The same general idea is used for C code, though many
details are different.

   Whatever the language, to indent a line, use the TAB command.  Each
major mode defines this command to perform the sort of indentation
appropriate for the particular language.  In Lisp mode, TAB aligns the
line according to its depth in parentheses.  No matter where in the
line you are when you type TAB, it aligns the line as a whole.  In C
mode, TAB implements a subtle and sophisticated indentation style that
knows about many aspects of C syntax.

   In Text mode, TAB runs the command @{b}tab-to-tab-stop@{ub}, which indents to
the next tab stop column.  You can set the tab stops with @{b}M-x
edit-tab-stops@{ub}.


 @{" Indentation Commands " Link "Indentation Commands"}  Various commands and techniques for indentation.
 @{" Tab Stops " Link "Tab Stops"}             You can set arbitrary "tab stops" and then
                         indent to the next tab stop when you want to.
 @{" Just Spaces " Link "Just Spaces"}           You can request indentation using just spaces.


@EndNode

@Node "Indentation Commands" "emacs/Indentation Commands"
@Next "Tab Stops"
@Prev "Indentation"
@Toc "Indentation"

Indentation Commands and Techniques
===================================

   If you just want to insert a tab character in the buffer, you can
type @{b}C-q TAB@{ub}.

   To move over the indentation on a line, type @{b}Meta-m@{ub}.  This command,
given anywhere on a line, positions point at the first nonblank
character on the line (@{b}back-to-indentation@{ub}).

   To insert an indented line before the current line, do @{b}C-a C-o TAB@{ub}.
To make an indented line after the current line, use @{b}C-e LFD@{ub}.

   @{b}C-M-o@{ub} (@{b}split-line@{ub}) moves the text from point to the end of the line
vertically down, so that the current line becomes two lines.  @{b}C-M-o@{ub}
first moves point forward over any spaces and tabs.  Then it inserts
after point a newline and enough indentation to reach the same column
point is on.  Point remains before the inserted newline; in this
regard, @{b}C-M-o@{ub} resembles @{b}C-o@{ub}.

   To join two lines cleanly, use the @{b}Meta-^@{ub} (@{b}delete-indentation@{ub})
command to delete the indentation at the front of the current line, and
the line boundary as well.  They are replaced by a single space, or by
no space if point after joining is at the beginning of a line or before
a @{b})@{ub} or after a @{b}(@{ub}.  To delete just the indentation of a line, go to the
beginning of the line and use @{b}Meta-\ @{ub} (@{b}delete-horizontal-space@{ub}), which
deletes all spaces and tabs around the cursor.

   There are also commands for changing the indentation of several
lines at once.  @{b}Control-Meta-\ @{ub} (@{b}indent-region@{ub}) gives each line which
begins in the region the "usual" indentation by invoking TAB at the
beginning of the line.  A numeric argument specifies the column to
indent to, and each line is shifted left or right so that its first
nonblank character appears in that column.  @{b}C-x TAB@{ub} (@{b}indent-rigidly@{ub})
moves all of the lines in the region right by its argument (left, for
negative arguments).  The whole group of lines moves rigidly sideways,
which is how the command gets its name.

   @{b}M-x indent-relative@{ub} indents at point based on the previous line
(actually, the last nonempty line.)  It inserts whitespace at point,
moving point, until it is underneath an indentation point in the
previous line.  An indentation point is the end of a sequence of
whitespace or the end of the line.  If point is farther right than any
indentation point in the previous line, the whitespace before point is
deleted and the first indentation point then applicable is used.  If no
indentation point is applicable even then, @{b}tab-to-tab-stop@{ub} is run (see
next section).

   @{b}indent-relative@{ub} is the definition of TAB in Indented Text mode.  See
@{"Text" Link "Text"}.


@EndNode

@Node "Tab Stops" "emacs/Tab Stops"
@Next "Just Spaces"
@Prev "Indentation Commands"
@Toc "Indentation"

Tab Stops
=========

   For typing in tables, you can use Text mode's definition of TAB,
@{b}tab-to-tab-stop@{ub}.  This command inserts indentation before point, enough
to reach the next tab stop column.  If you are not in Text mode, this
function can be found on @{b}M-i@{ub} anyway.

   The tab stops used by @{b}M-i@{ub} can be set arbitrarily by the user.  They
are stored in a variable called @{b}tab-stop-list@{ub}, as a list of
column-numbers in increasing order.

   The convenient way to set the tab stops is using @{b}M-x edit-tab-stops@{ub},
which creates and selects a buffer containing a description of the tab
stop settings.  You can edit this buffer to specify different tab
stops, and then type @{b}C-c C-c@{ub} to make those new tab stops take effect.
In the tab stop buffer, @{b}C-c C-c@{ub} runs the function
@{b}edit-tab-stops-note-changes@{ub} rather than its usual definition
@{b}save-buffer@{ub}.  @{b}edit-tab-stops@{ub} records which buffer was current when
you invoked it, and stores the tab stops back in that buffer; normally
all buffers share the same tab stops and changing them in one buffer
affects all, but if you happen to make @{b}tab-stop-list@{ub} local in one
buffer then @{b}edit-tab-stops@{ub} in that buffer will edit the local settings.

   Here is what the text representing the tab stops looks like for
ordinary tab stops every eight columns.

             :       :       :       :       :       :
     0         1         2         3         4
     0123456789012345678901234567890123456789012345678
     To install changes, type C-c C-c

   The first line contains a colon at each tab stop.  The remaining
lines are present just to help you see where the colons are and know
what to do.

   Note that the tab stops that control @{b}tab-to-tab-stop@{ub} have nothing to
do with displaying tab characters in the buffer.  See @{"Display Vars" Link "Display Vars"}, for
more information on that.


@EndNode

@Node "Just Spaces" "emacs/Just Spaces"
@Prev "Tab Stops"
@Toc "Indentation"

Tabs vs. Spaces
===============

   Emacs normally uses both tabs and spaces to indent lines.  If you
prefer, all indentation can be made from spaces only.  To request this,
set @{b}indent-tabs-mode@{ub} to @{b}nil@{ub}.  This is a per-buffer variable; altering
the variable affects only the current buffer, but there is a default
value which you can change as well.  See @{"Locals" Link "Locals"}.

   There are also commands to convert tabs to spaces or vice versa,
always preserving the columns of all nonblank text.  @{b}M-x tabify@{ub} scans
the region for sequences of spaces, and converts sequences of at least
three spaces to tabs if that can be done without changing indentation.
@{b}M-x untabify@{ub} changes all tabs in the region to appropriate numbers of
spaces.


@EndNode

@Node "Text" "emacs/Text"
@Next "Programs"
@Prev "Indentation"
@Toc "Main"

Commands for Human Languages
****************************

   The term @{i}text@{ui} has two widespread meanings in our area of the
computer field.  One is data that is a sequence of characters.  Any file
that you edit with Emacs is text, in this sense of the word.  The other
meaning is more restrictive: a sequence of characters in a human
language for humans to read (possibly after processing by a text
formatter), as opposed to a program or commands for a program.

   Human languages have syntactic/stylistic conventions that can be
supported or used to advantage by editor commands: conventions involving
words, sentences, paragraphs, and capital letters.  This chapter
describes Emacs commands for all of these things.  There are also
commands for @{i}filling@{ui}, or rearranging paragraphs into lines of
approximately equal length.  The commands for moving over and killing
words, sentences and paragraphs, while intended primarily for editing
text, are also often useful for editing programs.

   Emacs has several major modes for editing human language text.  If
the file contains text pure and simple, use Text mode, which customizes
Emacs in small ways for the syntactic conventions of text.  For text
which contains embedded commands for text formatters, Emacs has other
major modes, each for a particular text formatter.  Thus, for input to
TeX, you would use TeX mode; for input to nroff, Nroff mode.


 @{" Text Mode " Link "Text Mode"}    The major modes for editing text files.
 @{" Nroff Mode " Link "Nroff Mode"}   The major mode for editing input to the formatter nroff.
 @{" TeX Mode " Link "TeX Mode"}     The major modes for editing input to the formatter TeX.
 @{" Outline Mode " Link "Outline Mode"} The major mode for editing outlines.
 @{" Words " Link "Words"}        Moving over and killing words.
 @{" Sentences " Link "Sentences"}    Moving over and killing sentences.
 @{" Paragraphs " Link "Paragraphs"} 	Moving over paragraphs.
 @{" Pages " Link "Pages"} 	Moving over pages.
 @{" Filling " Link "Filling"}      Filling or justifying text
 @{" Case " Link "Case"}         Changing the case of text


@EndNode

@Node "Text Mode" "emacs/Text Mode"
@Next "Words"
@Prev "Text"
@Toc "Text"

Text Mode
=========

   Editing files of text in a human language ought to be done using Text
mode rather than Lisp or Fundamental mode.  Invoke @{b}M-x text-mode@{ub} to
enter Text mode.  In Text mode, TAB runs the function @{b}tab-to-tab-stop@{ub},
which allows you to use arbitrary tab stops set with @{b}M-x edit-tab-stops@{ub}
(see @{"Tab Stops" Link "Tab Stops"}).  Features concerned with comments in programs are
turned off except when explicitly invoked.  The syntax table is changed
so that periods are not considered part of a word, while apostrophes,
backspaces and underlines are.

   A similar variant mode is Indented Text mode, intended for editing
text in which most lines are indented.  This mode defines TAB to run
@{b}indent-relative@{ub} (see @{"Indentation" Link "Indentation"}), and makes Auto Fill indent the lines
it creates.  The result is that normally a line made by Auto Filling,
or by LFD, is indented just like the previous line.  Use @{b}M-x
indented-text-mode@{ub} to select this mode.

   Entering Text mode or Indented Text mode calls with no arguments the
value of the variable @{b}text-mode-hook@{ub}, if that value exists and is not
@{b}nil@{ub}.  This value is also called when modes related to Text mode are
entered; this includes Nroff mode, TeX mode, Outline mode and Mail
mode.  Your hook can look at the value of @{b}major-mode@{ub} to see which of
these modes is actually being entered.


Three modes similar to Text mode are of use for editing text that is to
be passed through a text formatter before achieving the form in which
humans are to read it.

 @{" Nroff Mode " Link "Nroff Mode"}   The nroff formatter typesets text.
 @{" TeX Mode " Link "TeX Mode"}     The TeX formatter typesets text and mathematics.
 @{" Texinfo Mode " Link "Texinfo Mode"} Texinfo provides both on-line information and printed output
                 from the same source file.

  Another similar mode is used for editing outlines.  It allows you
to view the text at various levels of detail.  You can view either
the outline headings alone or both headings and text; you can also
hide some of the headings at lower levels from view to make the high
level structure more visible.

 @{" Outline Mode " Link "Outline Mode"} The major mode for editing outlines.


@EndNode

@Node "Nroff Mode" "emacs/Nroff Mode"
@Next "TeX Mode"
@Prev "Text Mode"
@Toc "Text Mode"

Nroff Mode
----------

   Nroff mode is a mode like Text mode but modified to handle nroff
commands present in the text.  Invoke @{b}M-x nroff-mode@{ub} to enter this
mode.  It differs from Text mode in only a few ways.  All nroff command
lines are considered paragraph separators, so that filling will never
garble the nroff commands.  Pages are separated by @{b}.bp@{ub} commands.
Comments start with backslash-doublequote.  Also, three special
commands are provided that are not in Text mode:

@{b}M-n@{ub}
     Move to the beginning of the next line that isn't an nroff command
     (@{b}forward-text-line@{ub}).  An argument is a repeat count.

@{b}M-p@{ub}
     Like @{b}M-n@{ub} but move up (@{b}backward-text-line@{ub}).

@{b}M-?@{ub}
     Prints in the echo area the number of text lines (lines that are
     not nroff commands) in the region (@{b}count-text-lines@{ub}).

   The other feature of Nroff mode is Electric Nroff newline mode.  This
is a minor mode that you can turn on or off with @{b}M-x
electric-nroff-mode@{ub} (see @{"Minor Modes" Link "Minor Modes"}).  When the mode is on, each
time you use RET to end a line that contains an nroff command that
opens a kind of grouping, it also inserts the matching nroff command to
close that grouping, on the following line.  For example, if you are at
the beginning of a line and type @{b} . ( b RET@{ub}, this inserts the matching
command @{b}.)b@{ub} on a new line following point.

   Entering Nroff mode calls with no arguments the value of the variable
@{b}text-mode-hook@{ub}, if that value exists and is not @{b}nil@{ub}; then it does the
same with the variable @{b}nroff-mode-hook@{ub}.


@EndNode

@Node "TeX Mode" "emacs/TeX Mode"
@Next "Texinfo Mode"
@Prev "Nroff Mode"
@Toc "Text Mode"

TeX Mode
--------

   TeX is a powerful text formatter written by Donald Knuth; it is also
free, like GNU Emacs.  LaTeX is a simplified input format for TeX,
implemented by TeX macros.  It comes with TeX.

   Emacs has a special TeX mode for editing TeX input files.  It
provides facilities for checking the balance of delimiters and for
invoking TeX on all or part of the file.

   TeX mode has two variants, Plain TeX mode and LaTeX mode (actually
two distinct major modes which differ only slightly).  They are
designed for editing the two different input formats.  The command @{b}M-x
tex-mode@{ub} looks at the contents of the buffer to determine whether the
contents appear to be LaTeX input or not; it then selects the
appropriate mode.  If it can't tell which is right (e.g., the buffer is
empty), the variable @{b}TeX-default-mode@{ub} controls which mode is used.

   The commands @{b}M-x plain-tex-mode@{ub} and @{b}M-x latex-mode@{ub} explicitly select
the two variants of TeX mode.  Use these commands when @{b}M-x tex-mode@{ub}
does not guess right.


 @{" Editing " Link "TeX Editing"}                Special commands for editing in TeX mode.
 @{" Printing " Link "TeX Print"}               Commands for printing part of a file with TeX.

   TeX for Unix systems can be obtained from the University of
Washington for a distribution fee.

   To order a full distribution, send $200.00 for a 1/2-inch 9-track
1600 bpi (@{b}tar@{ub} or @{b}cpio@{ub}) tape reel, or $210.00 for a 1/4-inch 4-track
QIC-24 (@{b}tar@{ub} or @{b}cpio@{ub}) cartridge, to:

     Northwest Computing Support Center
     DR-10, Thomson Hall 35
     University of Washington
     Seattle, Washington 98195

Please make checks payable to the University of Washington.

   Prepaid orders are preferred but purchase orders are acceptable;
however, purchase orders carry an extra charge of $10.00, to pay for
processing.

   Overseas sites: please add to the base cost $20.00 for shipment via
air parcel post, or $30.00 for shipment via courier.

   Please check with the Northwest Computing Support Center at the
University of Washington for current prices and formats:

     telephone:  (206) 543-6259
     email:      elisabet@u.washington.edu


@EndNode

@Node "TeX Editing" "emacs/TeX Editing"
@Next "TeX Print"
@Prev "TeX Mode"
@Toc "TeX Mode"

TeX Editing Commands
....................

   Here are the special commands provided in TeX mode for editing the
text of the file.

@{b}"@{ub}
     Insert, according to context, either @{b}``@{ub} or @{b}"@{ub} or @{b}''@{ub}
     (@{b}TeX-insert-quote@{ub}).

@{b}LFD@{ub}
     Insert a paragraph break (two newlines) and check the previous
     paragraph for unbalanced braces or dollar signs
     (@{b}TeX-terminate-paragraph@{ub}).

@{b}M-x validate-TeX-buffer@{ub}
     Check each paragraph in the buffer for unbalanced braces or dollar
     signs.

@{b}M-{@{ub}
     Insert @{b}{}@{ub} and position point between them (@{b}TeX-insert-braces@{ub}).

@{b}M-}@{ub}
     Move forward past the next unmatched close brace (@{b}up-list@{ub}).

@{b}C-c C-f@{ub}
     Close a block for LaTeX (@{b}TeX-close-LaTeX-block@{ub}).

   In TeX, the character @{b}"@{ub} is not normally used; use @{b}"@{ub} to start a
quotation and @{b}"@{ub} to end one.  TeX mode defines the key @{b}"@{ub} to insert @{b}"@{ub}
after whitespace or an open brace, @{b}"@{ub} after a backslash, or @{b}"@{ub} otherwise.
This is done by the command @{b}TeX-insert-quote@{ub}.  If you need the
character @{b}"@{ub} itself in unusual contexts, use @{b}C-q@{ub} to insert it.  Also, @{b}"@{ub}
with a numeric argument always inserts that number of @{b}"@{ub} characters.

   In TeX mode, @{b}$@{ub} has a special syntax code which attempts to
understand the way TeX math mode delimiters match.  When you insert a @{b}$@{ub}
that is meant to exit math mode, the position of the matching @{b}$@{ub} that entered
math mode is displayed for a second.  This is the same feature that
displays the open brace that matches a close brace that is inserted.
However, there is no way to tell whether a @{b}$@{ub} enters math mode or leaves
it; so when you insert a @{b}$@{ub} that enters math mode, the previous @{b}$@{ub}
position is shown as if it were a match, even though they are actually
unrelated.

   If you prefer to keep braces balanced at all times, you can use @{b}M-{@{ub}
(@{b}TeX-insert-braces@{ub}) to insert a pair of braces.  It leaves point
between the two braces so you can insert the text that belongs inside.
Afterward, use the command @{b}M-}@{ub} (@{b}up-list@{ub}) to move forward past the close
brace.

   There are two commands for checking the matching of braces.  LFD
(@{b}TeX-terminate-paragraph@{ub}) checks the paragraph before point, and
inserts two newlines to start a new paragraph.  It prints a message in
the echo area if any mismatch is found.  @{b}M-x validate-TeX-buffer@{ub} checks
the entire buffer, paragraph by paragraph.  When it finds a paragraph
that contains a mismatch, it displays point at the beginning of the
paragraph for a few seconds and pushes a mark at that spot.  Scanning
continues until the whole buffer has been checked or until you type
another key.  The positions of the last several paragraphs with
mismatches can be found in the mark ring (see @{"Mark Ring" Link "Mark Ring"}).

   Note that square brackets and parentheses are matched in TeX mode,
not just braces.  This is wrong for the purpose of checking TeX syntax.
However, parentheses and square brackets are likely to be used in text
as matching delimiters and it is useful for the various motion commands
and automatic match display to work with them.

   In LaTeX input, @{b}\begin@{ub} and @{b}\end@{ub} commands must balance.  After you
insert a @{b}\begin@{ub}, use @{b}C-c C-f@{ub} (@{b}TeX-close-LaTeX-block@{ub}) to insert
automatically a matching @{b}\end@{ub} (on a new line following the @{b}\begin@{ub}).  A
blank line is inserted between the two, and point is left there.


@EndNode

@Node "TeX Print" "emacs/TeX Print"
@Prev "TeX Editing"
@Toc "TeX Mode"

TeX Printing Commands
.....................

   You can invoke TeX as an inferior of Emacs on either the entire
contents of the buffer or just a region at a time.  Running TeX in this
way on just one chapter is a good way to see what your changes look
like without taking the time to format the entire file.

@{b}C-c C-r@{ub}
     Invoke TeX on the current region, plus the buffer's header
     (@{b}TeX-region@{ub}).

@{b}C-c C-b@{ub}
     Invoke TeX on the entire current buffer (@{b}TeX-buffer@{ub}).

@{b}C-c C-l@{ub}
     Recenter the window showing output from the inferior TeX so that
     the last line can be seen (@{b}TeX-recenter-output-buffer@{ub}).

@{b}C-c C-k@{ub}
     Kill the inferior TeX (@{b}TeX-kill-job@{ub}).

@{b}C-c C-p@{ub}
     Print the output from the last @{b}C-c C-r@{ub} or @{b}C-c C-b@{ub} command
     (@{b}TeX-print@{ub}).

@{b}C-c C-q@{ub}
     Show the printer queue (@{b}TeX-show-print-queue@{ub}).

   You can pass the current buffer through an inferior TeX by means of
@{b}C-c C-b@{ub} (@{b}TeX-buffer@{ub}).  The formatted output appears in a file in @{b}/tmp@{ub};
to print it, type @{b}C-c C-p@{ub} (@{b}TeX-print@{ub}).  Afterward use @{b}C-c C-q@{ub}
(@{b}TeX-show-print-queue@{ub}) to view the progress of your output towards
being printed.

   The console output from TeX, including any error messages, appears
in a buffer called @{b}*TeX-shell*@{ub}.  If TeX gets an error, you can switch
to this buffer and feed it input (this works as in Shell mode; see
@{"Interactive Shell" Link "Interactive Shell"}).  Without switching to this buffer you can scroll it
so that its last line is visible by typing @{b}C-c C-l@{ub}.

   Type @{b}C-c C-k@{ub} (@{b}TeX-kill-job@{ub}) to kill the TeX process if you see that
its output is no longer useful.  Using @{b}C-c C-b@{ub} or @{b}C-c C-r@{ub} also kills
any TeX process still running.

   You can also pass an arbitrary region through an inferior TeX by
typing @{b}C-c C-r@{ub} (@{b}TeX-region@{ub}).  This is tricky, however, because most
files of TeX input contain commands at the beginning to set parameters
and define macros, without which no later part of the file will format
correctly.  To solve this problem, @{b}C-c C-r@{ub} allows you to designate a
part of the file as containing essential commands; it is included before
the specified region as part of the input to TeX.  The designated part
of the file is called the @{i}header@{ui}.

   To indicate the bounds of the header in Plain TeX mode, you insert
two special strings in the file.  Insert @{b}%**start of header@{ub} before the
header, and @{b}%**end of header@{ub} after it.  Each string must appear
entirely on one line, but there may be other text on the line before or
after.  The lines containing the two strings are included in the header.
If @{b}%**start of header@{ub} does not appear within the first 100 lines of the
buffer, @{b}C-c C-r@{ub} assumes that there is no header.

   In LaTeX mode, the header begins with @{b}\documentstyle@{ub} and ends with
@{b}\begin{document}@{ub}.  These are commands that LaTeX requires you to use in
any case, so nothing special needs to be done to identify the header.

   Entering either kind of TeX mode calls with no arguments the value of
the variable @{b}text-mode-hook@{ub}, if that value exists and is not @{b}nil@{ub}; then
it does the same with the variable @{b}TeX-mode-hook@{ub}.  Finally it does the
same with either @{b}plain-TeX-mode-hook@{ub} or @{b}LaTeX-mode-hook@{ub}.


@EndNode

@Node "Texinfo Mode" "emacs/Texinfo Mode"
@Next "Outline Mode"
@Prev "TeX Mode"
@Toc "Text Mode"

Texinfo Mode
------------

   Texinfo is a documentation system that uses a single source file to
produce both on-line information and printed output.  This means that
instead of writing two different documents, one for the on-line help or
other on-line information and the other for a typeset manual or other
printed work, you need write only one document.  When the work is
revised, you need revise only one document.  (You can read the on-line
information, known as an @{i}Info file@{ui}, with an Info documentation-reading
program.  See @{"info" Link "info/Top"}, for more information about Info.)  Texinfo is the
format in which documentation for GNU utilities and libraries is
written.

   Texinfo mode provides special features for working with Texinfo files
including utilities to construct Info menus and pointers automatically,
keybindings to insert frequently used formatting commands, and
keybindings for commands to format both for Info and for printing.

   Texinfo mode is described in @{"Using Texinfo Mode" Link "texinfo/Texinfo Mode"}.


@EndNode

@Node "Outline Mode" "emacs/Outline Mode"
@Prev "Texinfo Mode"
@Toc "Text Mode"

Outline Mode
------------

   Outline mode is a major mode much like Text mode but intended for
editing outlines.  It allows you to make parts of the text temporarily
invisible so that you can see just the overall structure of the
outline.  Type @{b}M-x outline-mode@{ub} to turn on Outline mode in the current
buffer.

   Entering Outline mode calls with no arguments the value of the
variable @{b}text-mode-hook@{ub}, if that value exists and is not @{b}nil@{ub}; then it
does the same with the variable @{b}outline-mode-hook@{ub}.

   When a line is invisible in outline mode, it does not appear on the
screen.  The screen appears exactly as if the invisible line were
deleted, except that an ellipsis (three periods in a row) appears at
the end of the previous visible line (only one ellipsis no matter how
many invisible lines follow).

   All editing commands treat the text of the invisible line as part of
the previous visible line.  For example, @{b}C-n@{ub} moves onto the next visible
line.  Killing an entire visible line, including its terminating
newline, really kills all the following invisible lines along with it;
yanking it all back yanks the invisible lines and they remain invisible.


 @{" Format " Link "Outline Format"}                	  What the text of an outline looks like.
 @{" Motion " Link "Outline Motion"}                	  Special commands for moving through outlines.
 @{" Visibility " Link "Outline Visibility"}                     Commands to control what is visible.


@EndNode

@Node "Outline Format" "emacs/Outline Format"
@Next "Outline Motion"
@Prev "Outline Mode"
@Toc "Outline Mode"

Format of Outlines
..................

   Outline mode assumes that the lines in the buffer are of two types:
@{i}heading lines@{ui} and @{i}body lines@{ui}.  A heading line represents a topic in the
outline.  Heading lines start with one or more stars; the number of
stars determines the depth of the heading in the outline structure.
Thus, a heading line with one star is a major topic; all the heading
lines with two stars between it and the next one-star heading are its
subtopics; and so on.  Any line that is not a heading line is a body
line.  Body lines belong to the preceding heading line.  Here is an
example:

     * Food
     
     This is the body,
     which says something about the topic of food.
     
     ** Delicious Food
     
     This is the body of the second-level header.
     
     ** Distasteful Food
     
     This could have
     a body too, with
     several lines.
     
     *** Dormitory Food
     
     * Shelter
     
     A second first-level topic with its header line.

   A heading line together with all following body lines is called
collectively an @{i}entry@{ui}.  A heading line together with all following
deeper heading lines and their body lines is called a @{i}subtree@{ui}.

   You can customize the criterion for distinguishing heading lines by
setting the variable @{b}outline-regexp@{ub}.  Any line whose beginning has a
match for this regexp is considered a heading line.  Matches that start
within a line (not at the beginning) do not count.  The length of the
matching text determines the level of the heading; longer matches make
a more deeply nested level.  Thus, for example, if a text formatter has
commands @{b} @chapter@{ub}, @{b} @section@{ub} and @{b} @subsection@{ub} to divide the document
into chapters and sections, you could make those lines count as heading
lines by setting @{b}outline-regexp@{ub} to @{b} "@chap\\|@\\(sub\\)*section"@{ub}.  Note
the trick: the two words @{b}chapter@{ub} and @{b}section@{ub} are equally long, but by
defining the regexp to match only @{b}chap@{ub} we ensure that the length of the
text matched on a chapter heading is shorter, so that Outline mode will
know that sections are contained in chapters.  This works as long as no
other command starts with @{b} @chap@{ub}.

   Outline mode makes a line invisible by changing the newline before it
into an ASCII Control-M (code 015).  Most editing commands that work on
lines treat an invisible line as part of the previous line because,
strictly speaking, it @{i}is@{ui} part of that line, since there is no longer a
newline in between.  When you save the file in Outline mode, Control-M
characters are saved as newlines, so the invisible lines become ordinary
lines in the file.  But saving does not change the visibility status of
a line inside Emacs.


@EndNode

@Node "Outline Motion" "emacs/Outline Motion"
@Next "Outline Visibility"
@Prev "Outline Format"
@Toc "Outline Mode"

Outline Motion Commands
.......................

   There are some special motion commands in Outline mode that move
backward and forward to heading lines.

@{b}C-c C-n@{ub}
     Move point to the next visible heading line
     (@{b}outline-next-visible-heading@{ub}).

@{b}C-c C-p@{ub}
     Move point to the previous visible heading line
     (@{b}outline-previous-visible-heading@{ub}).

@{b}C-c C-f@{ub}
     Move point to the next visible heading line at the same level as
     the one point is on (@{b}outline-forward-same-level@{ub}).

@{b}C-c C-b@{ub}
     Move point to the previous visible heading line at the same level
     (@{b}outline-backward-same-level@{ub}).

@{b}C-c C-u@{ub}
     Move point up to a lower-level (more inclusive) visible heading
     line (@{b}outline-up-heading@{ub}).

   @{b}C-c C-n@{ub} (@{b}next-visible-heading@{ub}) moves down to the next heading line.
@{b}C-c C-p@{ub} (@{b}previous-visible-heading@{ub}) moves similarly backward.  Both
accept numeric arguments as repeat counts.  The names emphasize that
invisible headings are skipped, but this is not really a special
feature.  All editing commands that look for lines ignore the invisible
lines automatically.

   More advanced motion commands understand the levels of headings.
The two commands, @{b}C-c C-f@{ub} (@{b}outline-forward-same-level@{ub}) and @{b}C-c C-b@{ub}
(@{b}outline-backward-same-level@{ub}), move from one heading line to
another visible heading at the same depth in the outline.  @{b}C-c C-u@{ub}
(@{b}outline-up-heading@{ub}) moves backward to another heading that is less
deeply nested.


@EndNode

@Node "Outline Visibility" "emacs/Outline Visibility"
@Prev "Outline Motion"
@Toc "Outline Mode"

Outline Visibility Commands
...........................

   The other special commands of outline mode are used to make lines
visible or invisible.  Their names all start with @{b}hide@{ub} or @{b}show@{ub}.  Most
of them fall into pairs of opposites.  They are not undoable; instead,
you can undo right past them.  Making lines visible or invisible is
simply not recorded by the undo mechanism.

@{b}M-x hide-body@{ub}
     Make all body lines in the buffer invisible.

@{b}M-x show-all@{ub}
     Make all lines in the buffer visible.

@{b}C-c C-h@{ub}
     Make everything under this heading invisible, not including this
     heading itself (@{b}hide-subtree@{ub}).

@{b}C-c C-s@{ub}
     Make everything under this heading visible, including body,
     subheadings, and their bodies (@{b}show-subtree@{ub}).

@{b}M-x hide-leaves@{ub}
     Make the body of this heading line, and of all its subheadings,
     invisible.

@{b}M-x show-branches@{ub}
     Make all subheadings of this heading line, at all levels, visible.

@{b}C-c C-i@{ub}
     Make immediate subheadings (one level down) of this heading line
     visible (@{b}show-children@{ub}).

@{b}M-x hide-entry@{ub}
     Make this heading line's body invisible.

@{b}M-x show-entry@{ub}
     Make this heading line's body visible.

   Two commands that are exact opposites are @{b}M-x hide-entry@{ub} and @{b}M-x
show-entry@{ub}.  They are used with point on a heading line, and apply only
to the body lines of that heading.  The subtopics and their bodies are
not affected.

   Two more powerful opposites are @{b}C-c C-h@{ub} (@{b}hide-subtree@{ub}) and @{b}C-c C-s@{ub}
(@{b}show-subtree@{ub}).  Both expect to be used when point is on a heading
line, and both apply to all the lines of that heading's @{i}subtree@{ui}: its
body, all its subheadings, both direct and indirect, and all of their
bodies.  In other words, the subtree contains everything following this
heading line, up to and not including the next heading of the same or
higher rank.

   Intermediate between a visible subtree and an invisible one is having
all the subheadings visible but none of the body.  There are two
commands for doing this, depending on whether you want to hide the
bodies or make the subheadings visible.  They are @{b}M-x hide-leaves@{ub} and
@{b}M-x show-branches@{ub}.

   A little weaker than @{b}show-branches@{ub} is @{b}C-c C-i@{ub} (@{b}show-children@{ub}).  It
makes just the direct subheadings visible--those one level down.
Deeper subheadings remain invisible, if they were invisible.

   Two commands have a blanket effect on the whole file.  @{b}M-x hide-body@{ub}
makes all body lines invisible, so that you see just the outline
structure.  @{b}M-x show-all@{ub} makes all lines visible.  These commands can
be thought of as a pair of opposites even though @{b}M-x show-all@{ub} applies
to more than just body lines.

   The use of ellipses at the ends of visible lines can be turned off
by setting @{b}selective-display-ellipses@{ub} to @{b}nil@{ub}.  Then there is no visible
indication of the presence of invisible lines.


@EndNode

@Node "Words" "emacs/Words"
@Next "Sentences"
@Prev "Text Mode"
@Toc "Text"

Words
=====

   Emacs has commands for moving over or operating on words.  By
convention, the keys for them are all @{b}Meta-@{ub} characters.

@{b}M-f@{ub}
     Move forward over a word (@{b}forward-word@{ub}).

@{b}M-b@{ub}
     Move backward over a word (@{b}backward-word@{ub}).

@{b}M-d@{ub}
     Kill up to the end of a word (@{b}kill-word@{ub}).

@{b}M-DEL@{ub}
     Kill back to the beginning of a word (@{b}backward-kill-word@{ub}).

@{b}M-@@{ub}
     Mark the end of the next word (@{b}mark-word@{ub}).

@{b}M-t@{ub}
     Transpose two words;  drag a word forward or backward across other
     words (@{b}transpose-words@{ub}).

   Notice how these keys form a series that parallels the
character-based @{b}C-f@{ub}, @{b}C-b@{ub}, @{b}C-d@{ub}, @{b}C-t@{ub} and DEL.  @{b}M-@@{ub} is related to @{b}C-@@{ub},
which is an alias for @{b}C-SPC@{ub}.

   The commands @{b}Meta-f@{ub} (@{b}forward-word@{ub}) and @{b}Meta-b@{ub} (@{b}backward-word@{ub}) move
forward and backward over words.  They are thus analogous to @{b}Control-f@{ub}
and @{b}Control-b@{ub}, which move over single characters.  Like their @{b}Control-@{ub}
analogues, @{b}Meta-f@{ub} and @{b}Meta-b@{ub} move several words if given an argument.
@{b}Meta-f@{ub} with a negative argument moves backward, and @{b}Meta-b@{ub} with a
negative argument moves forward.  Forward motion stops right after the
last letter of the word, while backward motion stops right before the
first letter.

   @{b}Meta-d@{ub} (@{b}kill-word@{ub}) kills the word after point.  To be precise, it
kills everything from point to the place @{b}Meta-f@{ub} would move to.  Thus,
if point is in the middle of a word, @{b}Meta-d@{ub} kills just the part after
point.  If some punctuation comes between point and the next word, it
is killed along with the word.  (If you wish to kill only the next word
but not the punctuation before it, simply do @{b}Meta-f@{ub} to get the end, and
kill the word backwards with @{b}Meta-DEL@{ub}.) @{b}Meta-d@{ub} takes arguments just
like @{b}Meta-f@{ub}.

   @{b}Meta-DEL@{ub} (@{b}backward-kill-word@{ub}) kills the word before point.  It kills
everything from point back to where @{b}Meta-b@{ub} would move to.  If point is
after the space in @{b}FOO, BAR@{ub}, then @{b}FOO, @{ub} is killed.  (If you wish to
kill just @{b}FOO@{ub}, do @{b}Meta-b Meta-d@{ub} instead of @{b}Meta-DEL@{ub}.)

   @{b}Meta-t@{ub} (@{b}transpose-words@{ub}) exchanges the word before or containing
point with the following word.  The delimiter characters between the
words do not move.  For example, @{b}FOO, BAR@{ub} transposes into @{b}BAR, FOO@{ub}
rather than @{b}BAR FOO,@{ub}.  See @{"Transpose" Link "Transpose"}, for more on transposition and on
arguments to transposition commands.

   To operate on the next @{i}n@{ui} words with an operation which applies
between point and mark, you can either set the mark at point and then
move over the words, or you can use the command @{b}Meta-@@{ub} (@{b}mark-word@{ub})
which does not move point, but sets the mark where @{b}Meta-f@{ub} would move
to.  It can be given arguments just like @{b}Meta-f@{ub}.

   The word commands' understanding of syntax is completely controlled
by the syntax table.  Any character can, for example, be declared to be
a word delimiter.  See @{"Syntax" Link "Syntax"}.


@EndNode

@Node "Sentences" "emacs/Sentences"
@Next "Paragraphs"
@Prev "Words"
@Toc "Text"

Sentences
=========

   The Emacs commands for manipulating sentences and paragraphs are
mostly on @{b}Meta-@{ub} keys, so as to be like the word-handling commands.

@{b}M-a@{ub}
     Move back to the beginning of the sentence
     (@{b}backward-sentence@{ub}).

@{b}M-e@{ub}
     Move forward to the end of the sentence (@{b}forward-sentence@{ub}).

@{b}M-k@{ub}
     Kill forward to the end of the sentence (@{b}kill-sentence@{ub}).

@{b}C-x DEL@{ub}
     Kill back to the beginning of the sentence
     (@{b}backward-kill-sentence@{ub}).

   The commands @{b}Meta-a@{ub} and @{b}Meta-e@{ub} (@{b}backward-sentence@{ub} and
@{b}forward-sentence@{ub}) move to the beginning and end of the current
sentence, respectively.  They were chosen to resemble @{b}Control-a@{ub} and
@{b}Control-e@{ub}, which move to the beginning and end of a line.  Unlike them,
@{b}Meta-a@{ub} and @{b}Meta-e@{ub} if repeated or given numeric arguments move over
successive sentences.  Emacs assumes that the typist's convention is
followed, and thus considers a sentence to end wherever there is a @{b}.@{ub}, @{b}?@{ub}
or @{b}!@{ub} followed by the end of a line or two spaces, with any number of @{b})@{ub},
@{b}]@{ub}, @{b}'@{ub}, or @{b}"@{ub} characters allowed in between.  A sentence also begins or
ends wherever a paragraph begins or ends.

   Neither @{b}M-a@{ub} nor @{b}M-e@{ub} moves past the newline or spaces beyond the
sentence edge at which it is stopping.

   Just as @{b}C-a@{ub} and @{b}C-e@{ub} have a kill command, @{b}C-k@{ub}, to go with them, so
@{b}M-a@{ub} and @{b}M-e@{ub} have a corresponding kill command @{b}M-k@{ub} (@{b}kill-sentence@{ub})
which kills from point to the end of the sentence.  With minus one as
an argument it kills back to the beginning of the sentence.  Larger
arguments serve as a repeat count.

   There is a special command, @{b}C-x DEL@{ub} (@{b}backward-kill-sentence@{ub}) for
killing back to the beginning of a sentence, because this is useful
when you change your mind in the middle of composing text.

   The variable @{b}sentence-end@{ub} controls recognition of the end of a
sentence.  It is a regexp that matches the last few characters of a
sentence, together with the whitespace following the sentence.  Its
normal value is

     "[.?!][]\"')]*\\($\\|\t\\|  \\)[ \t\n]*"

This example is explained in the section on regexps.  See @{"Regexps" Link "Regexps"}.


@EndNode

@Node "Paragraphs" "emacs/Paragraphs"
@Next "Pages"
@Prev "Sentences"
@Toc "Text"

Paragraphs
==========

   The Emacs commands for manipulating paragraphs are also @{b}Meta-@{ub} keys.

@{b}M-[@{ub}
     Move back to previous paragraph beginning
     (@{b}backward-paragraph@{ub}).

@{b}M-]@{ub}
     Move forward to next paragraph end (@{b}forward-paragraph@{ub}).

@{b}M-h@{ub}
     Put point and mark around this or next paragraph (@{b}mark-paragraph@{ub}).

   @{b}Meta-[@{ub} moves to the beginning of the current or previous paragraph,
while @{b}Meta-]@{ub} moves to the end of the current or next paragraph.  Blank
lines and text formatter command lines separate paragraphs and are not
part of any paragraph.  Also, an indented line starts a new paragraph.

   In major modes for programs (as opposed to Text mode), paragraphs
begin and end only at blank lines.  This makes the paragraph commands
continue to be useful even though there are no paragraphs per se.

   When there is a fill prefix, then paragraphs are delimited by all
lines which don't start with the fill prefix.  See @{"Filling" Link "Filling"}.

   When you wish to operate on a paragraph, you can use the command
@{b}Meta-h@{ub} (@{b}mark-paragraph@{ub}) to set the region around it.  This command puts
point at the beginning and mark at the end of the paragraph point was
in.  If point is between paragraphs (in a run of blank lines, or at a
boundary), the paragraph following point is surrounded by point and
mark.  If there are blank lines preceding the first line of the
paragraph, one of these blank lines is included in the region.  Thus,
for example, @{b}M-h C-w@{ub} kills the paragraph around or after point.

   The precise definition of a paragraph boundary is controlled by the
two variables @{b}paragraph-separate@{ub} and @{b}paragraph-start@{ub}.  The value of
@{b}paragraph-start@{ub} is a regexp that should match any line that either
starts or separates paragraphs.  The value of @{b}paragraph-separate@{ub} is
another regexp that should match only lines that separate paragraphs
without being part of any paragraph.  Lines that start a new paragraph
and are contained in it must match both regexps.  For example, normally
@{b}paragraph-start@{ub} is @{b}"^[ @{i}\ @{ui}t@{i}\ @{ui}n@{i}\ @{ui}f]"@{ub} and @{b}paragraph-separate@{ub} is
@{b}"^[ @{i}\ @{ui}t@{i}\ @{ui}f]*$"@{ub}.

   Normally it is desirable for page boundaries to separate paragraphs.
The default values of these variables recognize the usual separator for
pages.


@EndNode

@Node "Pages" "emacs/Pages"
@Next "Filling"
@Prev "Paragraphs"
@Toc "Text"

Pages
=====

   Files are often thought of as divided into @{i}pages@{ui} by the @{i}formfeed@{ui}
character (ASCII Control-L, octal code 014).  For example, if a file is
printed on a line printer, each page of the file, in this sense, will
start on a new page of paper.  Emacs treats a page-separator character
just like any other character.  It can be inserted with @{b}C-q C-l@{ub}, or
deleted with DEL.  Thus, you are free to paginate your file or not.
However, since pages are often meaningful divisions of the file,
commands are provided to move over them and operate on them.

@{b}C-x [@{ub}
     Move point to previous page boundary (@{b}backward-page@{ub}).

@{b}C-x ]@{ub}
     Move point to next page boundary (@{b}forward-page@{ub}).

@{b}C-x C-p@{ub}
     Put point and mark around this page (or another page) (@{b}mark-page@{ub}).

@{b}C-x l@{ub}
     Count the lines in this page (@{b}count-lines-page@{ub}).

   The @{b}C-x [@{ub} (@{b}backward-page@{ub}) command moves point to immediately after
the previous page delimiter.  If point is already right after a page
delimiter, it skips that one and stops at the previous one.  A numeric
argument serves as a repeat count.  The @{b}C-x ]@{ub} (@{b}forward-page@{ub}) command
moves forward past the next page delimiter.

   The @{b}C-x C-p@{ub} command (@{b}mark-page@{ub}) puts point at the beginning of the
current page and the mark at the end.  The page delimiter at the end is
included (the mark follows it).  The page delimiter at the front is
excluded (point follows it).  This command can be followed by @{b}C-w@{ub} to
kill a page which is to be moved elsewhere.  If it is inserted after a
page delimiter, at a place where @{b}C-x ]@{ub} or @{b}C-x [@{ub} would take you, then
the page will be properly delimited before and after once again.

   A numeric argument to @{b}C-x C-p@{ub} is used to specify which page to go
to, relative to the current one.  Zero means the current page.  One
means the next page, and -1 means the previous one.

   The @{b}C-x l@{ub} command (@{b}count-lines-page@{ub}) is good for deciding where to
break a page in two.  It prints in the echo area the total number of
lines in the current page, and then divides it up into those preceding
the current line and those following, as in

     Page has 96 (72+25) lines

Notice that the sum is off by one; this is correct if point is not at
the beginning of a line.

   The variable @{b}page-delimiter@{ub} should have as its value a regexp that
matches the beginning of a line that separates pages.  This is what
defines where pages begin.  The normal value of this variable is @{b}"^@{i}\ @{ui}f"@{ub},
which matches a formfeed character at the beginning of a line.


@EndNode

@Node "Filling" "emacs/Filling"
@Next "Case"
@Prev "Pages"
@Toc "Text"

Filling Text
============

   With Auto Fill mode, text can be @{i}filled@{ui} (broken up into lines that
fit in a specified width) as you insert it.  If you alter existing text
it may no longer be properly filled; then explicit commands for filling
can be used.  (Filling is sometimes called "wrapping" in the
terminology used for other text editors, but we don't use that term,
because it could just as well refer to the continuation of long lines
which happens in Emacs if you @{i}don't@{ui} fill them.)


 @{" Auto Fill " Link "Auto Fill"} 	  Auto Fill mode breaks long lines automatically.
 @{" Fill Commands " Link "Fill Commands"}  Commands to refill paragraphs and center lines.
 @{" Fill Prefix " Link "Fill Prefix"}    Filling when every line is indented or in a comment, etc.


@EndNode

@Node "Auto Fill" "emacs/Auto Fill"
@Next "Fill Commands"
@Prev "Filling"
@Toc "Filling"

Auto Fill Mode
--------------

   @{i}Auto Fill@{ui} mode is a minor mode in which lines are broken
automatically when they become too wide.  Breaking happens only when
you type a SPC or RET.

@{b}M-x auto-fill-mode@{ub}
     Enable or disable Auto Fill mode.

@{b}SPC@{ub}
@{b}RET@{ub}
     In Auto Fill mode, break lines when appropriate.

   @{b}M-x auto-fill-mode@{ub} turns Auto Fill mode on if it was off, or off if
it was on.  With a positive numeric argument it always turns Auto Fill
mode on, and with a negative argument always turns it off.  You can see
when Auto Fill mode is in effect by the presence of the word @{b}Fill@{ub} in the
mode line, inside the parentheses.  Auto Fill mode is a minor mode,
turned on or off for each buffer individually.  See @{"Minor Modes" Link "Minor Modes"}.

   In Auto Fill mode, lines are broken automatically at spaces when
they get longer than the desired width.  Line breaking and
rearrangement takes place only when you type SPC or RET.  If you wish
to insert a space or newline without permitting line-breaking, type @{b}C-q
SPC@{ub} or @{b}C-q LFD@{ub} (recall that a newline is really a linefeed).  Also, @{b}C-o@{ub}
inserts a newline without line breaking.

   Auto Fill mode works well with Lisp mode, because when it makes a new
line in Lisp mode it indents that line with TAB.  If a line ending in a
comment gets too long, the text of the comment is split into two
comment lines.  Optionally new comment delimiters are inserted at the
end of the first line and the beginning of the second so that each line
is a separate comment; the variable @{b}comment-multi-line@{ub} controls the
choice (see @{"Comments" Link "Comments"}).

   Auto Fill mode does not refill entire paragraphs.  It can break
lines but cannot merge lines.  So editing in the middle of a paragraph
can result in a paragraph that is not correctly filled.  The easiest
way to make the paragraph properly filled again is usually with the
explicit fill commands.

   Many users like Auto Fill mode and want to use it in all text files.
The section on init files says how to arrange this permanently for
yourself.  See @{"Init File" Link "Init File"}.


@EndNode

@Node "Fill Commands" "emacs/Fill Commands"
@Next "Fill Prefix"
@Prev "Auto Fill"
@Toc "Filling"

Explicit Fill Commands
----------------------

@{b}M-q@{ub}
     Fill current paragraph (@{b}fill-paragraph@{ub}).

@{b}M-g@{ub}
     Fill each paragraph in the region (@{b}fill-region@{ub}).

@{b}C-x f@{ub}
     Set the fill column (@{b}set-fill-column@{ub}).

@{b}M-x fill-region-as-paragraph.@{ub}
     Fill the region, considering it as one paragraph.

@{b}M-s@{ub}
     Center a line.

   To refill a paragraph, use the command @{b}Meta-q@{ub} (@{b}fill-paragraph@{ub}).  It
causes the paragraph that point is inside, or the one after point if
point is between paragraphs, to be refilled.  All the line-breaks are
removed, and then new ones are inserted where necessary.  @{b}M-q@{ub} can be
undone with @{b}C-_@{ub}.  See @{"Undo" Link "Undo"}.

   To refill many paragraphs, use @{b}M-g@{ub} (@{b}fill-region@{ub}), which divides the
region into paragraphs and fills each of them.

   @{b}Meta-q@{ub} and @{b}Meta-g@{ub} use the same criteria as @{b}Meta-h@{ub} for finding
paragraph boundaries (see @{"Paragraphs" Link "Paragraphs"}).  For more control, you can use
@{b}M-x fill-region-as-paragraph@{ub}, which refills everything between point
and mark.  This command recognizes no paragraph separators; it deletes
any blank lines found within the region to be filled.

   A numeric argument to @{b}M-g@{ub} or @{b}M-q@{ub} causes it to @{i}justify@{ui} the text as
well as filling it.  This means that extra spaces are inserted to make
the right margin line up exactly at the fill column.  To remove the
extra spaces, use @{b}M-q@{ub} or @{b}M-g@{ub} with no argument.

   The command @{b}Meta-s@{ub} (@{b}center-line@{ub}) centers the current line within the
current fill column.  With an argument, it centers several lines
individually and moves past them.

   The maximum line width for filling is in the variable @{b}fill-column@{ub}.
Altering the value of @{b}fill-column@{ub} makes it local to the current buffer;
until that time, the default value is in effect.  The default is
initially 70.  See @{"Locals" Link "Locals"}.

   The easiest way to set @{b}fill-column@{ub} is to use the command @{b}C-x f@{ub}
(@{b}set-fill-column@{ub}).  With no argument, it sets @{b}fill-column@{ub} to the
current horizontal position of point.  With a numeric argument, it uses
that as the new fill column.


@EndNode

@Node "Fill Prefix" "emacs/Fill Prefix"
@Prev "Fill Commands"
@Toc "Filling"

The Fill Prefix
---------------

   To fill a paragraph in which each line starts with a special marker
(which might be a few spaces, giving an indented paragraph), use the
@{i}fill prefix@{ui} feature.  The fill prefix is a string which Emacs expects
every line to start with, and which is not included in filling.

@{b}C-x .@{ub}
     Set the fill prefix (@{b}set-fill-prefix@{ub}).

@{b}M-q@{ub}
     Fill a paragraph using current fill prefix (@{b}fill-paragraph@{ub}).

@{b}M-x fill-individual-paragraphs@{ub}
     Fill the region, considering each change of indentation as
     starting a new paragraph.

   To specify a fill prefix, move to a line that starts with the desired
prefix, put point at the end of the prefix, and give the command @{b}C-x .@{ub}
(@{b}set-fill-prefix@{ub}).  That's a period after the @{b}C-x@{ub}.  To turn off the
fill prefix, specify an empty prefix: type @{b}C-x .@{ub} with point at the
beginning of a line.

   When a fill prefix is in effect, the fill commands remove the fill
prefix from each line before filling and insert it on each line after
filling.  The fill prefix is also inserted on new lines made
automatically by Auto Fill mode.  Lines that do not start with the fill
prefix are considered to start paragraphs, both in @{b}M-q@{ub} and the
paragraph commands; this is just right if you are using paragraphs with
hanging indentation (every line indented except the first one).  Lines
which are blank or indented once the prefix is removed also separate or
start paragraphs; this is what you want if you are writing
multi-paragraph comments with a comment delimiter on each line.

   The fill prefix is stored in the variable @{b}fill-prefix@{ub}.  Its value is
a string, or @{b}nil@{ub} when there is no fill prefix.  This is a per-buffer
variable; altering the variable affects only the current buffer, but
there is a default value which you can change as well.  See @{"Locals" Link "Locals"}.

   Another way to use fill prefixes is through @{b}M-x
fill-individual-paragraphs@{ub}.  This function divides the region into
groups of consecutive lines with the same amount and kind of
indentation and fills each group as a paragraph using its indentation
as a fill prefix.


@EndNode

@Node "Case" "emacs/Case"
@Prev "Filling"
@Toc "Text"

Case Conversion Commands
========================

   Emacs has commands for converting either a single word or any
arbitrary range of text to upper case or to lower case.

@{b}M-l@{ub}
     Convert following word to lower case (@{b}downcase-word@{ub}).

@{b}M-u@{ub}
     Convert following word to upper case (@{b}upcase-word@{ub}).

@{b}M-c@{ub}
     Capitalize the following word (@{b}capitalize-word@{ub}).

@{b}C-x C-l@{ub}
     Convert region to lower case (@{b}downcase-region@{ub}).

@{b}C-x C-u@{ub}
     Convert region to upper case (@{b}upcase-region@{ub}).

   The word conversion commands are the most useful.  @{b}Meta-l@{ub}
(@{b}downcase-word@{ub}) converts the word after point to lower case, moving
past it.  Thus, repeating @{b}Meta-l@{ub} converts successive words.  @{b}Meta-u@{ub}
(@{b}upcase-word@{ub}) converts to all capitals instead, while @{b}Meta-c@{ub}
(@{b}capitalize-word@{ub}) puts the letter following point into upper case
and the rest of the letters in the word into lower case.  All these
commands convert several words at once if given an argument.  They are
especially convenient for converting a large amount of text from all
upper case to mixed case, because you can move through the text using
@{b}M-l@{ub}, @{b}M-u@{ub} or @{b}M-c@{ub} on each word as appropriate, occasionally using @{b}M-f@{ub}
instead to skip a word.

   When given a negative argument, the word case conversion commands
apply to the appropriate number of words before point, but do not move
point.  This is convenient when you have just typed a word in the wrong
case: you can give the case conversion command and continue typing.

   If a word case conversion command is given in the middle of a word,
it applies only to the part of the word which follows point.  This is
just like what @{b}Meta-d@{ub} (@{b}kill-word@{ub}) does.  With a negative argument, case
conversion applies only to the part of the word before point.

   The other case conversion commands are @{b}C-x C-u@{ub} (@{b}upcase-region@{ub}) and
@{b}C-x C-l@{ub} (@{b}downcase-region@{ub}), which convert everything between point and
mark to the specified case.  Point and mark do not move.


@EndNode

@Node "Programs" "emacs/Programs"
@Next "Compiling-Testing"
@Prev "Text"
@Toc "Main"

Editing Programs
****************

   Emacs has many commands designed to understand the syntax of
programming languages such as Lisp and C.  These commands can

   @{b}*@{ub} Move over or kill balanced expressions or @{i}sexps@{ui} (see @{"Lists" Link "Lists"}).

   @{b}*@{ub} Move over or mark top-level balanced expressions (@{i}defuns@{ui}, in Lisp;
     functions, in C).

   @{b}*@{ub} Show how parentheses balance (see @{"Matching" Link "Matching"}).

   @{b}*@{ub} Insert, kill or align comments (see @{"Comments" Link "Comments"}).

   @{b}*@{ub} Follow the usual indentation conventions of the language (see
     @{"Grinding" Link "Grinding"}).

   The commands for words, sentences and paragraphs are very useful in
editing code even though their canonical application is for editing
human language text.  Most symbols contain words (see @{"Words" Link "Words"}); sentences
can be found in strings and comments (see @{"Sentences" Link "Sentences"}).  Paragraphs per se
are not present in code, but the paragraph commands are useful anyway,
because Lisp mode and C mode define paragraphs to begin and end at blank
lines (see @{"Paragraphs" Link "Paragraphs"}).  Judicious use of blank lines to make the
program clearer will also provide interesting chunks of text for the
paragraph commands to work on.

   The selective display feature is useful for looking at the overall
structure of a function (see @{"Selective Display" Link "Selective Display"}).  This feature causes
only the lines that are indented less than a specified amount to appear
on the screen.


 @{" Program Modes " Link "Program Modes"}        Major modes for editing programs.
 @{" Lists " Link "Lists"}                Expressions with balanced parentheses.
                         There are editing commands to operate on them.
 @{" Defuns " Link "Defuns"}               Each program is made up of separate functions.
                         There are editing commands to operate on them.
 @{" Grinding " Link "Grinding"}             Adjusting indentation to show the nesting.
 @{" Matching " Link "Matching"}             Insertion of a close-delimiter flashes matching open.
 @{" Comments " Link "Comments"}             Inserting, killing and aligning comments.
 @{" Macro Expansion " Link "Macro Expansion"} 	How to see the results of C macro expansion.
 @{" Balanced Editing " Link "Balanced Editing"}     Inserting two matching parentheses at once, etc.
 @{" Lisp Completion " Link "Lisp Completion"}      Completion on symbol names in Lisp code.
 @{" Documentation " Link "Documentation"}        Getting documentation of functions you plan to call.
 @{" Change Log " Link "Change Log"}           Maintaining a change history for your program.
 @{" Tags " Link "Tags"}                 Go direct to any function in your program in one
                         command.  Tags remembers which file it is in.
 @{" Fortran " Link "Fortran"} 		Fortran mode and its special features.


@EndNode

@Node "Program Modes" "emacs/Program Modes"
@Next "Lists"
@Prev "Programs"
@Toc "Programs"

Major Modes for Programming Languages
=====================================

   Emacs has major modes for the programming languages Lisp, Scheme (a
variant of Lisp), C, Fortran and Muddle.  Ideally, a major mode should
be implemented for each programming language that you might want to
edit with Emacs; but often the mode for one language can serve for other
syntactically similar languages.  The language modes that exist are
those that someone decided to take the trouble to write.

   There are several forms of Lisp mode, which differ in the way they
interface to Lisp execution.  See @{"Lisp Modes" Link "Lisp Modes"}.

   Each of the programming language modes defines the TAB key to run an
indentation function that knows the indentation conventions of that
language and updates the current line's indentation accordingly.  For
example, in C mode TAB is bound to @{b}c-indent-line@{ub}.  LFD is normally
defined to do RET followed by TAB; thus, it too indents in a
mode-specific fashion.

   In most programming languages, indentation is likely to vary from
line to line.  So the major modes for those languages rebind DEL to
treat a tab as if it were the equivalent number of spaces (using the
command @{b}backward-delete-char-untabify@{ub}).  This makes it possible to rub
out indentation one column at a time without worrying whether it is
made up of spaces or tabs.  Use @{b}C-b C-d@{ub} to delete a tab character
before point, in these modes.

   Programming language modes define paragraphs to be separated only by
blank lines, so that the paragraph commands remain useful.  Auto Fill
mode, if enabled in a programming language major mode, indents the new
lines which it creates.

   Turning on a major mode calls a user-supplied function called the
@{i}mode hook@{ui}, which is the value of a Lisp variable.  For example, turning
on C mode calls the value of the variable @{b}c-mode-hook@{ub} if that value
exists and is non-@{b}nil@{ub}.  Mode hook variables for other programming
language modes include @{b}lisp-mode-hook@{ub}, @{b}emacs-lisp-mode-hook@{ub},
@{b}lisp-interaction-mode-hook@{ub}, @{b}scheme-mode-hook@{ub} and @{b}muddle-mode-hook@{ub}.  The
mode hook function receives no arguments.


@EndNode

@Node "Lists" "emacs/Lists"
@Next "Defuns"
@Prev "Program Modes"
@Toc "Programs"

Lists and Sexps
===============

   By convention, Emacs keys for dealing with balanced expressions are
usually @{b}Control-Meta-@{ub} characters.  They tend to be analogous in
function to their @{b}Control-@{ub} and @{b}Meta-@{ub} equivalents.  These commands are
usually thought of as pertaining to expressions in programming
languages, but can be useful with any language in which some sort of
parentheses exist (including English).

   These commands fall into two classes.  Some deal only with @{i}lists@{ui}
(parenthetical groupings).  They see nothing except parentheses,
brackets, braces (whichever ones must balance in the language you are
working with), and escape characters that might be used to quote those.

   The other commands deal with expressions or @{i}sexps@{ui}.  The word `sexp'
is derived from @{i}s-expression@{ui}, the ancient term for an expression in
Lisp.  But in Emacs, the notion of `sexp' is not limited to Lisp.  It
refers to an expression in whatever language your program is written in.
Each programming language has its own major mode, which customizes the
syntax tables so that expressions in that language count as sexps.

   Sexps typically include symbols, numbers, and string constants, as
well as anything contained in parentheses, brackets or braces.

   In languages that use prefix and infix operators, such as C, it is
not possible for all expressions to be sexps.  For example, C mode does
not recognize @{b}foo + bar@{ub} as a sexp, even though it @{i}is@{ui} a C expression; it
recognizes @{b}foo@{ub} as one sexp and @{b}bar@{ub} as another, with the @{b}+@{ub} as
punctuation between them.  This is a fundamental ambiguity: both @{b}foo +
bar@{ub} and @{b}foo@{ub} are legitimate choices for the sexp to move over if point
is at the @{b}f@{ub}.  Note that @{b}(foo + bar)@{ub} is a sexp in C mode.

   Some languages have obscure forms of syntax for expressions that
nobody has bothered to make Emacs understand properly.

@{b}C-M-f@{ub}
     Move forward over a sexp (@{b}forward-sexp@{ub}).

@{b}C-M-b@{ub}
     Move backward over a sexp (@{b}backward-sexp@{ub}).

@{b}C-M-k@{ub}
     Kill sexp forward (@{b}kill-sexp@{ub}).

@{b}C-M-u@{ub}
     Move up and backward in list structure (@{b}backward-up-list@{ub}).

@{b}C-M-d@{ub}
     Move down and forward in list structure (@{b}down-list@{ub}).

@{b}C-M-n@{ub}
     Move forward over a list (@{b}forward-list@{ub}).

@{b}C-M-p@{ub}
     Move backward over a list (@{b}backward-list@{ub}).

@{b}C-M-t@{ub}
     Transpose expressions (@{b}transpose-sexps@{ub}).

@{b}C-M-@@{ub}
     Put mark after following expression (@{b}mark-sexp@{ub}).

   To move forward over a sexp, use @{b}C-M-f@{ub} (@{b}forward-sexp@{ub}).  If the first
significant character after point is an opening delimiter (@{b}(@{ub} in Lisp;
@{b}(@{ub}, @{b}[@{ub} or @{b}{@{ub} in C), @{b}C-M-f@{ub} moves past the matching closing delimiter.
If the character begins a symbol, string, or number, @{b}C-M-f@{ub} moves over
that.  If the character after point is a closing delimiter, @{b}C-M-f@{ub} gets
an error.

   The command @{b}C-M-b@{ub} (@{b}backward-sexp@{ub}) moves backward over a sexp.  The
detailed rules are like those above for @{b}C-M-f@{ub}, but with directions
reversed.  If there are any prefix characters (singlequote, backquote
and comma, in Lisp) preceding the sexp, @{b}C-M-b@{ub} moves back over them as
well.

   @{b}C-M-f@{ub} or @{b}C-M-b@{ub} with an argument repeats that operation the specified
number of times; with a negative argument, it moves in the opposite
direction.

   The sexp commands move across comments as if they were whitespace, in
languages such as C where the comment-terminator can be recognized.  In
Lisp, and other languages where comments run until the end of a line,
it is very difficult to ignore comments when parsing backwards;
therefore, in such languages the sexp commands treat the text of
comments as if it were code.

   Killing a sexp at a time can be done with @{b}C-M-k@{ub} (@{b}kill-sexp@{ub}).  @{b}C-M-k@{ub}
kills the characters that @{b}C-M-f@{ub} would move over.

   The @{i}list commands@{ui} move over lists like the sexp commands but skip
blithely over any number of other kinds of sexps (symbols, strings,
etc).  They are @{b}C-M-n@{ub} (@{b}forward-list@{ub}) and @{b}C-M-p@{ub} (@{b}backward-list@{ub}).  The
main reason they are useful is that they usually ignore comments (since
the comments usually do not contain any lists).

   @{b}C-M-n@{ub} and @{b}C-M-p@{ub} stay at the same level in parentheses, when that's
possible.  To move @{i}up@{ui} one (or @{i}n@{ui}) levels, use @{b}C-M-u@{ub} (@{b}backward-up-list@{ub}).
@{b}C-M-u@{ub} moves backward up past one unmatched opening delimiter.  A
positive argument serves as a repeat count; a negative argument reverses
direction of motion and also requests repetition, so it moves forward
and up one or more levels.

   To move @{i}down@{ui} in list structure, use @{b}C-M-d@{ub} (@{b}down-list@{ub}).  In Lisp mode,
where @{b}(@{ub} is the only opening delimiter, this is nearly the same as
searching for a @{b}(@{ub}.  An argument specifies the number of levels of
parentheses to go down.

   A somewhat random-sounding command which is nevertheless easy to use
is @{b}C-M-t@{ub} (@{b}transpose-sexps@{ub}), which drags the previous sexp across the
next one.  An argument serves as a repeat count, and a negative
argument drags backwards (thus canceling out the effect of @{b}C-M-t@{ub} with a
positive argument).  An argument of zero, rather than doing nothing,
transposes the sexps ending after point and the mark.

   To make the region be the next sexp in the buffer, use @{b}C-M-@@{ub}
(@{b}mark-sexp@{ub}) which sets mark at the same place that @{b}C-M-f@{ub} would move
to.  @{b}C-M-@@{ub} takes arguments like @{b}C-M-f@{ub}.  In particular, a negative
argument is useful for putting the mark at the beginning of the
previous sexp.

   The list and sexp commands' understanding of syntax is completely
controlled by the syntax table.  Any character can, for example, be
declared to be an opening delimiter and act like an open parenthesis.
See @{"Syntax" Link "Syntax"}.


@EndNode

@Node "Defuns" "emacs/Defuns"
@Next "Grinding"
@Prev "Lists"
@Toc "Programs"

Defuns
======

   In Emacs, a parenthetical grouping at the top level in the buffer is
called a @{i}defun@{ui}.  The name derives from the fact that most top-level
lists in a Lisp file are instances of the special form @{b}defun@{ub}, but any
top-level parenthetical grouping counts as a defun in Emacs parlance
regardless of what its contents are, and regardless of the programming
language in use.  For example, in C, the body of a function definition
is a defun.

@{b}C-M-a@{ub}
     Move to beginning of current or preceding defun
     (@{b}beginning-of-defun@{ub}).

@{b}C-M-e@{ub}
     Move to end of current or following defun (@{b}end-of-defun@{ub}).

@{b}C-M-h@{ub}
     Put region around whole current or following defun (@{b}mark-defun@{ub}).

   The commands to move to the beginning and end of the current defun
are @{b}C-M-a@{ub} (@{b}beginning-of-defun@{ub}) and @{b}C-M-e@{ub} (@{b}end-of-defun@{ub}).

   If you wish to operate on the current defun, use @{b}C-M-h@{ub} (@{b}mark-defun@{ub})
which puts point at the beginning and mark at the end of the current or
next defun.  For example, this is the easiest way to get ready to move
the defun to a different place in the text.  In C mode, @{b}C-M-h@{ub} runs the
function @{b}mark-c-function@{ub}, which is almost the same as @{b}mark-defun@{ub}; the
difference is that it backs up over the argument declarations, function
name and returned data type so that the entire C function is inside the
region.

   Emacs assumes that any open-parenthesis found in the leftmost column
is the start of a defun.  Therefore, @{i}never put an open-parenthesis at
the left margin in a Lisp file unless it is the start of a top level
list.  Never put an open-brace or other opening delimiter at the
beginning of a line of C code unless it starts the body of a function.@{ui}
The most likely problem case is when you want an opening delimiter at
the start of a line inside a string.  To avoid trouble, put an escape
character (@{b}\ @{ub}, in C and Emacs Lisp, @{b}/@{ub} in some other Lisp dialects)
before the opening delimiter.  It will not affect the contents of the
string.

   In the remotest past, the original Emacs found defuns by moving
upward a level of parentheses until there were no more levels to go up.
This always required scanning all the way back to the beginning of the
buffer, even for a small function.  To speed up the operation, Emacs
was changed to assume that any @{b}(@{ub} (or other character assigned the
syntactic class of opening-delimiter) at the left margin is the start
of a defun.  This heuristic was nearly always right and avoided the
costly scan; however, it mandated the convention described above.


@EndNode

@Node "Grinding" "emacs/Grinding"
@Next "Matching"
@Prev "Defuns"
@Toc "Programs"

Indentation for Programs
========================

   The best way to keep a program properly indented ("ground") is to use
Emacs to re-indent it as you change it.  Emacs has commands to indent
properly either a single line, a specified number of lines, or all of
the lines inside a single parenthetical grouping.


 @{" Basic Indent " Link "Basic Indent"} 
 @{" Multi-line Indent " Link "Multi-line Indent"}    Commands to reindent many lines at once.
 @{" Lisp Indent " Link "Lisp Indent"} 		Specifying how each Lisp function should be indented.
 @{" C Indent " Link "C Indent"} 		Choosing an indentation style for C code.


@EndNode

@Node "Basic Indent" "emacs/Basic Indent"
@Next "Multi-line Indent"
@Prev "Grinding"
@Toc "Grinding"

Basic Program Indentation Commands
----------------------------------

@{b}TAB@{ub}
     Adjust indentation of current line.

@{b}LFD@{ub}
     Equivalent to RET followed by TAB (@{b}newline-and-indent@{ub}).

   The basic indentation command is TAB, which gives the current line
the correct indentation as determined from the previous lines.  The
function that TAB runs depends on the major mode; it is @{b}lisp-indent-line@{ub}
in Lisp mode, @{b}c-indent-line@{ub} in C mode, etc.  These functions understand
different syntaxes for different languages, but they all do about the
same thing.  TAB in any programming language major mode inserts or
deletes whitespace at the beginning of the current line, independent of
where point is in the line.  If point is inside the whitespace at the
beginning of the line, TAB leaves it at the end of that whitespace;
otherwise, TAB leaves point fixed with respect to the characters around
it.

   Use @{b}C-q TAB@{ub} to insert a tab at point.

   When entering a large amount of new code, use LFD
(@{b}newline-and-indent@{ub}), which is equivalent to a RET followed by
a TAB.  LFD creates a blank line, and then gives it the appropriate
indentation.

   TAB indents the second and following lines of the body of a
parenthetical grouping each under the preceding one; therefore, if you
alter one line's indentation to be nonstandard, the lines below will
tend to follow it.  This is the right behavior in cases where the
standard result of TAB is unaesthetic.

   Remember that an open-parenthesis, open-brace or other opening
delimiter at the left margin is assumed by Emacs (including the
indentation routines) to be the start of a function.  Therefore, you
must never have an opening delimiter in column zero that is not the
beginning of a function, not even inside a string.  This restriction is
vital for making the indentation commands fast; you must simply accept
it.  See @{"Defuns" Link "Defuns"}, for more information on this.


@EndNode

@Node "Multi-line Indent" "emacs/Multi-line Indent"
@Next "Lisp Indent"
@Prev "Basic Indent"
@Toc "Grinding"

Indenting Several Lines
-----------------------

   When you wish to re-indent several lines of code which have been
altered or moved to a different level in the list structure, you have
several commands available.

@{b}C-M-q@{ub}
     Re-indent all the lines within one list (@{b}indent-sexp@{ub}).

@{b}C-u TAB@{ub}
     Shift an entire list rigidly sideways so that its first line is
     properly indented.

@{b}C-M-\ @{ub}
     Re-indent all lines in the region (@{b}indent-region@{ub}).

   You can re-indent the contents of a single list by positioning point
before the beginning of it and typing @{b}C-M-q@{ub} (@{b}indent-sexp@{ub} in Lisp mode,
@{b}indent-c-exp@{ub} in C mode; also bound to other suitable functions in other
modes).  The indentation of the line the sexp starts on is not changed;
therefore, only the relative indentation within the list, and not its
position, is changed.  To correct the position as well, type a TAB
before the @{b}C-M-q@{ub}.

   If the relative indentation within a list is correct but the
indentation of its beginning is not, go to the line the list begins on
and type @{b}C-u TAB@{ub}.  When TAB is given a numeric argument, it moves all
the lines in the grouping starting on the current line sideways the
same amount that the current line moves.  It is clever, though, and
does not move lines that start inside strings, or C preprocessor lines
when in C mode.

   Another way to specify the range to be re-indented is with point and
mark.  The command @{b}C-M-\ @{ub} (@{b}indent-region@{ub}) applies TAB to every line
whose first character is between point and mark.


@EndNode

@Node "Lisp Indent" "emacs/Lisp Indent"
@Next "C Indent"
@Prev "Multi-line Indent"
@Toc "Grinding"

Customizing Lisp Indentation
----------------------------

   The indentation pattern for a Lisp expression can depend on the
function called by the expression.  For each Lisp function, you can
choose among several predefined patterns of indentation, or define an
arbitrary one with a Lisp program.

   The standard pattern of indentation is as follows: the second line
of the expression is indented under the first argument, if that is on
the same line as the beginning of the expression; otherwise, the second
line is indented underneath the function name.  Each following line is
indented under the previous line whose nesting depth is the same.

   If the variable @{b}lisp-indent-offset@{ub} is non-@{b}nil@{ub}, it overrides the
usual indentation pattern for the second line of an expression, so that
such lines are always indented @{b}lisp-indent-offset@{ub} more columns than the
containing list.

   The standard pattern is overridden for certain functions.  Functions
whose names start with @{b}def@{ub} always indent the second line by
@{b}lisp-body-indention@{ub} extra columns beyond the open-parenthesis starting
the expression.

   The standard pattern can be overridden in various ways for individual
functions, according to the @{b}lisp-indent-hook@{ub} property of the function
name.  There are four possibilities for this property:

@{b}nil@{ub}
     This is the same as no property; the standard indentation pattern
     is used.

@{b}defun@{ub}
     The pattern used for function names that start with @{b}def@{ub} is used for
     this function also.

a number, @{i}number@{ui}
     The first @{i}number@{ui} arguments of the function are @{i}distinguished@{ui}
     arguments; the rest are considered the @{i}body@{ui} of the expression.  A
     line in the expression is indented according to whether the first
     argument on it is distinguished or not.  If the argument is part
     of the body, the line is indented @{b}lisp-body-indent@{ub} more columns
     than the open-parenthesis starting the containing expression.  If
     the argument is distinguished and is either the first or second
     argument, it is indented @{i}twice@{ui} that many extra columns.  If the
     argument is distinguished and not the first or second argument,
     the standard pattern is followed for that line.

a symbol, @{i}symbol@{ui}
     @{i}symbol@{ui} should be a function name; that function is called to
     calculate the indentation of a line within this expression.  The
     function receives two arguments:
    @{i}state@{ui}
          The value returned by @{b}parse-partial-sexp@{ub} (a Lisp primitive for
          indentation and nesting computation) when it parses up to the
          beginning of this line.

    @{i}pos@{ui}
          The position at which the line being indented begins.

     It should return either a number, which is the number of columns of
     indentation for that line, or a list whose CAR is such a number.
     The difference between returning a number and returning a list is
     that a number says that all following lines at the same nesting
     level should be indented just like this one; a list says that
     following lines might call for different indentations.  This makes
     a difference when the indentation is being computed by @{b}C-M-q@{ub}; if
     the value is a number, @{b}C-M-q@{ub} need not recalculate indentation for
     the following lines until the end of the list.


@EndNode

@Node "C Indent" "emacs/C Indent"
@Prev "Lisp Indent"
@Toc "Grinding"

Customizing C Indentation
-------------------------

   Two variables control which commands perform C indentation and when.

   If @{b}c-auto-newline@{ub} is non-@{b}nil@{ub}, newlines are inserted both before and
after braces that you insert, and after colons and semicolons.  Correct
C indentation is done on all the lines that are made this way.

   If @{b}c-tab-always-indent@{ub} is @{b}nil@{ub}, the TAB command in C mode does
indentation only if point is at the left margin or within the line's
indentation.  If there is non-whitespace to the left of point, then TAB
just inserts a tab character in the buffer.  Normally, this variable is
@{b}t@{ub}, and TAB always reindents the current line.

   C does not have anything analogous to particular function names for
which special forms of indentation are desirable.  However, it has a
different need for customization facilities: many different styles of C
indentation are in common use.

   There are six variables you can set to control the style that Emacs C
mode will use.

@{b}c-indent-level@{ub}
     Indentation of C statements within surrounding block.  The
     surrounding block's indentation is the indentation of the line on
     which the open-brace appears.

@{b}c-continued-statement-offset@{ub}
     Extra indentation given to a substatement, such as the then-clause
     of an if or body of a while.

@{b}c-brace-offset@{ub}
     Extra indentation for line if it starts with an open brace.

@{b}c-brace-imaginary-offset@{ub}
     An open brace following other text is treated as if it were this
     far to the right of the start of its line.

@{b}c-argdecl-indent@{ub}
     Indentation level of declarations of C function arguments.

@{b}c-label-offset@{ub}
     Extra indentation for line that is a label, or case or default.

   The variable @{b}c-indent-level@{ub} controls the indentation for C
statements with respect to the surrounding block.  In the example

         {
           foo ();

the difference in indentation between the lines is @{b}c-indent-level@{ub}.  Its
standard value is 2.

   If the open-brace beginning the compound statement is not at the
beginning of its line, the @{b}c-indent-level@{ub} is added to the indentation
of the line, not the column of the open-brace.  For example,

     if (losing) {
       do_this ();

One popular indentation style is that which results from setting
@{b}c-indent-level@{ub} to 8 and putting open-braces at the end of a line in
this way.  I prefer to put the open-brace on a separate line.

   In fact, the value of the variable @{b}c-brace-imaginary-offset@{ub} is also
added to the indentation of such a statement.  Normally this variable
is zero.  Think of this variable as the imaginary position of the open
brace, relative to the first nonblank character on the line.  By setting
this variable to 4 and @{b}c-indent-level@{ub} to 0, you can get this style:

     if (x == y) {
         do_it ();
         }

   When @{b}c-indent-level@{ub} is zero, the statements inside most braces will
line up right under the open brace.  But there is an exception made for
braces in column zero, such as surrounding a function's body.  The
statements just inside it do not go at column zero.  Instead,
@{b}c-brace-offset@{ub} and @{b}c-continued-statement-offset@{ub} (see below) are added
to produce a typical offset between brace levels, and the statements
are indented that far.

   @{b}c-continued-statement-offset@{ub} controls the extra indentation for a
line that starts within a statement (but not within parentheses or
brackets).  These lines are usually statements that are within other
statements, such as the then-clauses of @{b}if@{ub} statements and the bodies of
@{b}while@{ub} statements.  This parameter is the difference in indentation
between the two lines in

     if (x == y)
       do_it ();

Its standard value is 2.  Some popular indentation styles correspond to
a value of zero for @{b}c-continued-statement-offset@{ub}.

   @{b}c-brace-offset@{ub} is the extra indentation given to a line that starts
with an open-brace.  Its standard value is zero; compare

     if (x == y)
       {

with

     if (x == y)
       do_it ();

if @{b}c-brace-offset@{ub} were set to 4, the first example would become

     if (x == y)
           {

   @{b}c-argdecl-indent@{ub} controls the indentation of declarations of the
arguments of a C function.  It is absolute: argument declarations
receive exactly @{b}c-argdecl-indent@{ub} spaces.  The standard value is 5,
resulting in code like this:

     char *
     index (string, c)
          char *string;
          int c;

   @{b}c-label-offset@{ub} is the extra indentation given to a line that
contains a label, a case statement, or a @{b}default:@{ub} statement.  Its
standard value is -2, resulting in code like this

     switch (c)
       {
       case 'x':

If @{b}c-label-offset@{ub} were zero, the same code would be indented as

     switch (c)
       {
         case 'x':

This example assumes that the other variables above also have their
standard values.

   I strongly recommend that you try out the indentation style produced
by the standard settings of these variables, together with putting open
braces on separate lines.  You can see how it looks in all the C source
files of GNU Emacs.


@EndNode

@Node "Matching" "emacs/Matching"
@Next "Comments"
@Prev "Grinding"
@Toc "Programs"

Automatic Display Of Matching Parentheses
=========================================

   The Emacs parenthesis-matching feature is designed to show
automatically how parentheses match in the text.  Whenever a
self-inserting character that is a closing delimiter is typed, the
cursor moves momentarily to the location of the matching opening
delimiter, provided that is on the screen.  If it is not on the screen,
some text starting with that opening delimiter is displayed in the echo
area.  Either way, you can tell what grouping is being closed off.

   In Lisp, automatic matching applies only to parentheses.  In C, it
applies to braces and brackets too.  Emacs knows which characters to
regard as matching delimiters based on the syntax table, which is set
by the major mode.  See @{"Syntax" Link "Syntax"}.

   If the opening delimiter and closing delimiter are mismatched--such
as in @{b}[x)@{ub}--a warning message is displayed in the echo area.  The
correct matches are specified in the syntax table.

   Two variables control parenthesis match display.
@{b}blink-matching-paren@{ub} turns the feature on or off; @{b}nil@{ub} turns it off, but
the default is @{b}t@{ub} to turn match display on.
@{b}blink-matching-paren-distance@{ub} specifies how many characters back to
search to find the matching opening delimiter.  If the match is not
found in that far, scanning stops, and nothing is displayed.  This is
to prevent scanning for the matching delimiter from wasting lots of
time when there is no match.  The default is 4000.


@EndNode

@Node "Comments" "emacs/Comments"
@Next "Macro Expansion"
@Prev "Matching"
@Toc "Programs"

Manipulating Comments
=====================

   The comment commands insert, kill and align comments.

@{b}M-;@{ub}
     Insert or align comment (@{b}indent-for-comment@{ub}).

@{b}C-x ;@{ub}
     Set comment column (@{b}set-comment-column@{ub}).

@{b}C-u - C-x ;@{ub}
     Kill comment on current line (@{b}kill-comment@{ub}).

@{b}M-LFD@{ub}
     Like RET followed by inserting and aligning a comment
     (@{b}indent-new-comment-line@{ub}).

   The command that creates a comment is @{b}Meta-;@{ub} (@{b}indent-for-comment@{ub}).
If there is no comment already on the line, a new comment is created,
aligned at a specific column called the @{i}comment column@{ui}.  The comment is
created by inserting the string Emacs thinks comments should start with
(the value of @{b}comment-start@{ub}; see below).  Point is left after that
string.  If the text of the line extends past the comment column, then
the indentation is done to a suitable boundary (usually, at least one
space is inserted).  If the major mode has specified a string to
terminate comments, that is inserted after point, to keep the syntax
valid.

   @{b}Meta-;@{ub} can also be used to align an existing comment.  If a line
already contains the string that starts comments, then @{b}M-;@{ub} just moves
point after it and re-indents it to the conventional place.  Exception:
comments starting in column 0 are not moved.

   Some major modes have special rules for indenting certain kinds of
comments in certain contexts.  For example, in Lisp code, comments which
start with two semicolons are indented as if they were lines of code,
instead of at the comment column.  Comments which start with three
semicolons are supposed to start at the left margin.  Emacs understands
these conventions by indenting a double-semicolon comment using TAB,
and by not changing the indentation of a triple-semicolon comment at
all.

     ;; This function is just an example
     ;;; Here either two or three semicolons are appropriate.
     (defun foo (x)
     ;;; And now, the first part of the function:
       ;; The following line adds one.
       (1+ x))           ; This line adds one.

   In C code, a comment preceded on its line by nothing but whitespace
is indented like a line of code.

   Even when an existing comment is properly aligned, @{b}M-;@{ub} is still
useful for moving directly to the start of the comment.

   @{b}C-u - C-x ;@{ub} (@{b}kill-comment@{ub}) kills the comment on the current line, if
there is one.  The indentation before the start of the comment is killed
as well.  If there does not appear to be a comment in the line, nothing
is done.  To reinsert the comment on another line, move to the end of
that line, do @{b}C-y@{ub}, and then do @{b}M-;@{ub} to realign it.  Note that @{b}C-u - C-x
;@{ub} is not a distinct key; it is @{b}C-x ;@{ub} (@{b}set-comment-column@{ub}) with a
negative argument.  That command is programmed so that when it receives
a negative argument it calls @{b}kill-comment@{ub}.  However, @{b}kill-comment@{ub} is a
valid command which you could bind directly to a key if you wanted to.

Multiple Lines of Comments
--------------------------

   If you are typing a comment and find that you wish to continue it on
another line, you can use the command @{b}Meta-LFD@{ub}
(@{b}indent-new-comment-line@{ub}), which terminates the comment you
are typing, creates a new blank line afterward, and begins a new
comment indented under the old one.  When Auto Fill mode is on, going
past the fill column while typing a comment causes the comment to be
continued in just this fashion.  If point is not at the end of the line
when @{b}M-LFD@{ub} is typed, the text on the rest of the line becomes part of
the new comment line.

Options Controlling Comments
----------------------------

   The comment column is stored in the variable @{b}comment-column@{ub}.  You
can set it to a number explicitly.  Alternatively, the command @{b}C-x ;@{ub}
(@{b}set-comment-column@{ub}) sets the comment column to the column point is
at.  @{b}C-u C-x ;@{ub} sets the comment column to match the last comment before
point in the buffer, and then does a @{b}Meta-;@{ub} to align the current line's
comment under the previous one.  Note that @{b}C-u - C-x ;@{ub} runs the
function @{b}kill-comment@{ub} as described above.

   @{b}comment-column@{ub} is a per-buffer variable; altering the variable
affects only the current buffer, but there is a default value which you
can change as well.  See @{"Locals" Link "Locals"}.  Many major modes initialize this
variable for the current buffer.

   The comment commands recognize comments based on the regular
expression that is the value of the variable @{b}comment-start-skip@{ub}.  This
regexp should not match the null string.  It may match more than the
comment starting delimiter in the strictest sense of the word; for
example, in C mode the value of the variable is @{b}@{i}"/\\*+ *"@{ui}@{ub}, which
matches extra stars and spaces after the @{b}/*@{ub} itself.  (Note that @{b}\\ @{ub} is
needed in Lisp syntax to include a @{b}\ @{ub} in the string, which is needed to
deny the first star its special meaning in regexp syntax.  See @{"Regexps" Link "Regexps"}.)

   When a comment command makes a new comment, it inserts the value of
@{b}comment-start@{ub} to begin it.  The value of @{b}comment-end@{ub} is inserted after
point, so that it will follow the text that you will insert into the
comment.  In C mode, @{b}comment-start@{ub} has the value @{b}"/* "@{ub} and @{b}comment-end@{ub}
has the value @{b}" */"@{ub}.

   @{b}comment-multi-line@{ub} controls how @{b}M-LFD@{ub} (@{b}indent-new-comment-line@{ub})
behaves when used inside a comment.  If @{b}comment-multi-line@{ub} is @{b}nil@{ub}, as
it normally is, then the comment on the starting line is terminated and
a new comment is started on the new following line.  If
@{b}comment-multi-line@{ub} is not @{b}nil@{ub}, then the new following line is set up as
part of the same comment that was found on the starting line.  This is
done by not inserting a terminator on the old line, and not inserting a
starter on the new line.  In languages where multi-line comments work,
the choice of value for this variable is a matter of taste.

   The variable @{b}comment-indent-hook@{ub} should contain a function that will
be called to compute the indentation for a newly inserted comment or
for aligning an existing comment.  It is set differently by various
major modes.  The function is called with no arguments, but with point
at the beginning of the comment, or at the end of a line if a new
comment is to be inserted.  It should return the column in which the
comment ought to start.  For example, in Lisp mode, the indent hook
function bases its decision on how many semicolons begin an existing
comment, and on the code in the preceding lines.


@EndNode

@Node "Macro Expansion" "emacs/Macro Expansion"
@Next "Balanced Editing"
@Prev "Comments"
@Toc "Programs"

Viewing How C Macros Expand
===========================

   When you are debugging C code that uses macros, sometimes it is hard
to figure out precisely how the macros expand.  The command @{b}M-x
c-macro-expand@{ub}.  It runs the C preprocessor and shows you what
expansion results from the region.  The portion of the buffer before the
region is also included in preprocessing, for the sake of macros defined
there, but the output from this part isn't shown.


@EndNode

@Node "Balanced Editing" "emacs/Balanced Editing"
@Next "Lisp Completion"
@Prev "Macro Expansion"
@Toc "Programs"

Editing Without Unbalanced Parentheses
======================================

@{b}M-(@{ub}
     Put parentheses around next sexp(s) (@{b}insert-parentheses@{ub}).

@{b}M-)@{ub}
     Move past next close parenthesis and re-indent
     (@{b}move-over-close-and-reindent@{ub}).

   The two commands, @{b}M-(@{ub} (@{b}insert-parentheses@{ub}) and @{b}M-)@{ub}
(@{b}move-over-close-and-reindent@{ub}), are designed to facilitate a style
of editing which keeps parentheses balanced at all times.  @{b}M-(@{ub} inserts a
pair of parentheses, either together as in @{b}()@{ub}, or, if given an
argument, around the next several sexps, and leaves point after the open
parenthesis.  Instead of typing @{b}( F O O )@{ub}, you can type @{b}M-( F O O@{ub},
which has the same effect except for leaving the cursor before the
close parenthesis.  Then you would type @{b}M-)@{ub}, which moves past the close
parenthesis, deleting any indentation preceding it (in this example
there is none), and indenting with LFD after it.


@EndNode

@Node "Lisp Completion" "emacs/Lisp Completion"
@Next "Documentation"
@Prev "Balanced Editing"
@Toc "Programs"

Completion for Lisp Symbols
===========================

   Usually completion happens in the minibuffer.  But one kind of
completion is available in all buffers: completion for Lisp symbol
names.

   The command @{b}M-TAB@{ub} (@{b}lisp-complete-symbol@{ub}) takes the partial Lisp
symbol before point to be an abbreviation, and compares it against all
nontrivial Lisp symbols currently known to Emacs.  Any additional
characters that they all have in common are inserted at point.
Nontrivial symbols are those that have function definitions, values or
properties.

   If there is an open-parenthesis immediately before the beginning of
the partial symbol, only symbols with function definitions are
considered as completions.

   If the partial name in the buffer has more than one possible
completion and they have no additional characters in common, a list of
all possible completions is displayed in another window.


@EndNode

@Node "Documentation" "emacs/Documentation"
@Next "Change Log"
@Prev "Lisp Completion"
@Toc "Programs"

Documentation Commands
======================

   As you edit Lisp code to be run in Emacs, the commands @{b}C-h f@{ub}
(@{b}describe-function@{ub}) and @{b}C-h v@{ub} (@{b}describe-variable@{ub}) can be used to
print documentation of functions and variables that you want to call.
These commands use the minibuffer to read the name of a function or
variable to document, and display the documentation in a window.

   For extra convenience, these commands provide default arguments
based on the code in the neighborhood of point.  @{b}C-h f@{ub} sets the default
to the function called in the innermost list containing point.  @{b}C-h v@{ub}
uses the symbol name around or adjacent to point as its default.

   Documentation on Unix commands, system calls and libraries can be
obtained with the @{b}M-x manual-entry@{ub} command.  This reads a topic as an
argument, and displays the text on that topic from the Unix manual.
@{b}manual-entry@{ub} always searches all 8 sections of the manual, and
concatenates all the entries that are found.  For example, the topic
@{b}termcap@{ub} finds the description of the termcap library from section 3,
followed by the description of the termcap data base from section 5.


@EndNode

@Node "Change Log" "emacs/Change Log"
@Next "Tags"
@Prev "Documentation"
@Toc "Programs"

Change Logs
===========

   The Emacs command @{b}M-x add-change-log-entry@{ub} helps you keep a record
of when and why you have changed a program.  It assumes that you have a
file in which you write a chronological sequence of entries describing
individual changes.  The default is to store the change entries in a
file called @{b}ChangeLog@{ub} in the same directory as the file you are editing.
The same @{b}ChangeLog@{ub} file therefore records changes for all the files in
the directory.

   A change log entry starts with a header line that contains your name
and the current date.  Aside from these header lines, every line in the
change log starts with a tab.  One entry can describe several changes;
each change starts with a line starting with a tab and a star.  @{b}M-x
add-change-log-entry@{ub} visits the change log file and creates a new entry
unless the most recent entry is for today's date and your name.  In
either case, it adds a new line to start the description of another
change just after the header line of the entry.  When @{b}M-x
add-change-log-entry@{ub} is finished, all is prepared for you to edit in
the description of what you changed and how.  You must then save the
change log file yourself.

   The change log file is always visited in Indented Text mode, which
means that LFD and auto-filling indent each new line like the previous
line.  This is convenient for entering the contents of an entry, which
must all be indented.  See @{"Text Mode" Link "Text Mode"}.

   An alternative convenient command for starting a change log entry is
@{b}C-x 4 a@{ub} (@{b}add-change-log-entry-other-window@{ub}).  It resembles
@{b}add-change-log-entry@{ub} except that it visits the change log in another
window, and always uses the file @{b}./ChangeLog@{ub}--it does not ask you for
the file name.

   Here is an example of the formatting conventions used in the change
log for Emacs:

     Wed Jun 26 19:29:32 1985  Richard M. Stallman  (rms at mit-prep)
     
             * xdisp.c (try_window_id):
             If C-k is done at end of next-to-last line,
             this fn updates window_end_vpos and cannot leave
             window_end_pos nonnegative (it is zero, in fact).
             If display is preempted before lines are output,
             this is inconsistent.  Fix by setting
             blank_end_of_window to nonzero.

     Tue Jun 25 05:25:33 1985  Richard M. Stallman  (rms at mit-prep)
     
             * cmds.c (Fnewline):
             Call the auto fill hook if appropriate.

     * xdisp.c (try_window_id):
             If point is found by compute_motion after xp, record that
             permanently.  If display_text_line sets point position wrong
             (case where line is killed, point is at eob and that line is
             not displayed), set it again in final compute_motion.


@EndNode

@Node "Tags" "emacs/Tags"
@Next "Fortran"
@Prev "Change Log"
@Toc "Programs"

Tag Tables
==========

   A @{i}tag table@{ui} is a description of how a multi-file program is broken
up into files.  It lists the names of the component files and the names
and positions of the functions in each file.  Grouping the related
files makes it possible to search or replace through all the files with
one command.  Recording the function names and positions makes possible
the @{b}Meta-.@{ub} command which you can use to find the definition of a
function without having to know which of the files it is in.

   Tag tables are stored in files called @{i}tag table files@{ui}.  The
conventional name for a tag table file is @{b}TAGS@{ub}.

   Each entry in the tag table records the name of one tag, the name of
the file that the tag is defined in (implicitly), and the position in
that file of the tag's definition.

   Just what names from the described files are recorded in the tag
table depends on the programming language of the described file.  They
normally include all functions and subroutines, and may also include
global variables, data types, and anything else convenient.  In any
case, each name recorded is called a @{i}tag@{ui}.


 @{" Tag Syntax " Link "Tag Syntax"} 
 @{" Create Tag Table " Link "Create Tag Table"} 
 @{" Select Tag Table " Link "Select Tag Table"} 
 @{" Find Tag " Link "Find Tag"} 
 @{" Tags Search " Link "Tags Search"} 
 @{" Tags Stepping " Link "Tags Stepping"} 
 @{" List Tags " Link "List Tags"} 


@EndNode

@Node "Tag Syntax" "emacs/Tag Syntax"
@Next "Create Tag Table"
@Prev "Tags"
@Toc "Tags"

Source File Tag Syntax
----------------------

   In Lisp code, any function defined with @{b}defun@{ub}, any variable defined
with @{b}defvar@{ub} or @{b}defconst@{ub}, and in general the first argument of any
expression that starts with @{b}(def@{ub} in column zero, is a tag.

   In C code, any C function is a tag, and so is any typedef if @{b}-t@{ub} is
specified when the tag table is constructed.

   In Fortran code, functions and subroutines are tags.

   In LaTeX text, the argument of any of the commands @{b}\chapter@{ub},
@{b}\section@{ub}, @{b}\subsection@{ub}, @{b}\subsubsection@{ub}, @{b}\eqno@{ub}, @{b}\label@{ub}, @{b}\ref@{ub}, @{b}\cite@{ub},
@{b}\bibitem@{ub} and @{b}\typeout@{ub} is a tag.


@EndNode

@Node "Create Tag Table" "emacs/Create Tag Table"
@Next "Select Tag Table"
@Prev "Tag Syntax"
@Toc "Tags"

Creating Tag Tables
-------------------

   The @{b}etags@{ub} program is used to create a tag table file.  It knows the
syntax of C, Fortran, LaTeX, Scheme and Emacs Lisp/Common Lisp.  To use
@{b}etags@{ub}, type

     etags @{i}inputfiles@{ui} ...

as a shell command.  It reads the specified files and writes a tag table
named @{b}TAGS@{ub} in the current working directory.  @{b}etags@{ub} recognizes the
language used in an input file based on its file name and contents;
there are no switches for specifying the language.  The @{b}-t@{ub} switch tells
@{b}etags@{ub} to record typedefs in C code as tags.

   If the tag table data become outdated due to changes in the files
described in the table, the way to update the tag table is the same way
it was made in the first place.  It is not necessary to do this often.

   If the tag table fails to record a tag, or records it for the wrong
file, then Emacs cannot possibly find its definition.  However, if the
position recorded in the tag table becomes a little bit wrong (due to
some editing in the file that the tag definition is in), the only
consequence is to slow down finding the tag slightly.  Even if the
stored position is very wrong, Emacs will still find the tag, but it
must search the entire file for it.

   So you should update a tag table when you define new tags that you
want to have listed, or when you move tag definitions from one file to
another, or when changes become substantial.  Normally there is no need
to update the tag table after each edit, or even every day.


@EndNode

@Node "Select Tag Table" "emacs/Select Tag Table"
@Next "Find Tag"
@Prev "Create Tag Table"
@Toc "Tags"

Selecting a Tag Table
---------------------

   Emacs has at any time one @{i}selected@{ui} tag table, and all the commands
for working with tag tables use the selected one.  To select a tag
table, type @{b}M-x visit-tags-table@{ub}, which reads the tag table file name
as an argument.  The name @{b}TAGS@{ub} in the default directory is used as the
default file name.

   All this command does is store the file name in the variable
@{b}tags-file-name@{ub}.  Emacs does not actually read in the tag table contents
until you try to use them.  Setting this variable yourself is just as
good as using @{b}visit-tags-table@{ub}.  The variable's initial value is @{b}nil@{ub};
this value tells all the commands for working with tag tables that they
must ask for a tag table file name to use.


@EndNode

@Node "Find Tag" "emacs/Find Tag"
@Next "Tags Search"
@Prev "Select Tag Table"
@Toc "Tags"

Finding a Tag
-------------

   The most important thing that a tag table enables you to do is to
find the definition of a specific tag.

@{b}M-. @{i}tag@{ui}@{ub}
     Find first definition of @{i}tag@{ui} (@{b}find-tag@{ub}).

@{b}C-u M-.@{ub}
     Find next alternate definition of last tag specified.

@{b}C-x 4 . @{i}tag@{ui}@{ub}
     Find first definition of @{i}tag@{ui}, but display it in another window
     (@{b}find-tag-other-window@{ub}).

   @{b}M-.@{ub}  (@{b}find-tag@{ub}) is the command to find the definition of a specified
tag.  It searches through the tag table for that tag, as a string, and
then uses the tag table info to determine the file that the definition
is in and the approximate character position in the file of the
definition.  Then @{b}find-tag@{ub} visits that file, moves point to the
approximate character position, and starts searching ever-increasing
distances away for the the text that should appear at the beginning of
the definition.

   If an empty argument is given (just type RET), the sexp in the
buffer before or around point is used as the name of the tag to find.
See @{"Lists" Link "Lists"}, for info on sexps.

   The argument to @{b}find-tag@{ub} need not be the whole tag name; it can be a
substring of a tag name.  However, there can be many tag names
containing the substring you specify.  Since @{b}find-tag@{ub} works by
searching the text of the tag table, it finds the first tag in the
table that the specified substring appears in.

   The way to find other tags that match the substring is to give
@{b}find-tag@{ub} a numeric argument, as in @{b}C-u M-.@{ub}; this does not read a tag
name, but continues searching the tag table's text for another tag
containing the same substring last used.  If you have a real META key,
@{b}M-0 M-.@{ub}  is an easier alternative to @{b}C-u M-.@{ub}. (That is a zero in @{b}M-0@{ub}.)

   Like most commands that can switch buffers, @{b}find-tag@{ub} has another
similar command that displays the new buffer in another window.  @{b}C-x 4
.@{ub}  invokes the function @{b}find-tag-other-window@{ub}.  (This key sequence
ends with a period.)

   Emacs comes with a tag table file @{b}TAGS@{ub}, in the @{b}src@{ub} subdirectory,
which includes all the Lisp libraries and all the C sources of Emacs.
By specifying this file with @{b}visit-tags-table@{ub} and then using @{b}M-.@{ub}  you
can quickly look at the source of any Emacs function.


@EndNode

@Node "Tags Search" "emacs/Tags Search"
@Next "Tags Stepping"
@Prev "Find Tag"
@Toc "Tags"

Searching and Replacing with Tag Tables
---------------------------------------

   The commands in this section visit and search all the files listed
in the selected tag table, one by one.  For these commands, the tag
table serves only to specify a sequence of files to search.  A related
command is @{b}M-x grep@{ub} (see @{"Compilation" Link "Compilation"}).

@{b}M-x tags-search@{ub}
     Search for the specified regexp through the files in the selected
     tag table.

@{b}M-x tags-query-replace@{ub}
     Perform a @{b}query-replace@{ub} on each file in the selected tag table.

@{b}M-,@{ub}
     Restart one of the commands above, from the current location of
     point (@{b}tags-loop-continue@{ub}).

   @{b}M-x tags-search@{ub} reads a regexp using the minibuffer, then visits the
files of the selected tag table one by one, and searches through each one
for that regexp.  It displays the name of the file being searched so
you can follow its progress.  As soon as an occurrence is found,
@{b}tags-search@{ub} returns.

   Having found one match, you probably want to find all the rest.  To
find one more match, type @{b}M-,@{ub} (@{b}tags-loop-continue@{ub}) to resume the
@{b}tags-search@{ub}.  This searches the rest of the current buffer, followed by
the remaining files of the tag table.

   @{b}M-x tags-query-replace@{ub} performs a single @{b}query-replace@{ub} through all
the files in the tag table.  It reads a string to search for and a
string to replace with, just like ordinary @{b}M-x query-replace@{ub}.  It
searches much like @{b}M-x tags-search@{ub} but repeatedly, processing matches
according to your input.  See @{"Replace" Link "Replace"}, for more information on
@{b}query-replace@{ub}.

   It is possible to get through all the files in the tag table with a
single invocation of @{b}M-x tags-query-replace@{ub}.  But since any
unrecognized character causes the command to exit, you may need to
continue where you left off.  @{b}M-,@{ub} can be used for this.  It resumes the
last tags search or replace command that you did.

   It may have struck you that @{b}tags-search@{ub} is a lot like @{b}grep@{ub}.  You can
also run @{b}grep@{ub} itself as an inferior of Emacs and have Emacs show you
the matching lines one by one.  This works mostly the same as running a
compilation and having Emacs show you where the errors were.  See
@{"Compilation" Link "Compilation"}.


@EndNode

@Node "Tags Stepping" "emacs/Tags Stepping"
@Next "List Tags"
@Prev "Tags Search"
@Toc "Tags"

Stepping Through a Tag Table
----------------------------

   If you wish to process all the files in the selected tag table, but
@{b}M-x tags-search@{ub} and @{b}M-x tags-query-replace@{ub} in particular are not what
you want, you can use @{b}M-x next-file@{ub}.

@{b}C-u M-x next-file@{ub}
     With a numeric argument, regardless of its value, visit the first
     file in the tag table, and prepare to advance sequentially by
     files.

@{b}M-x next-file@{ub}
     Visit the next file in the selected tag table.


@EndNode

@Node "List Tags" "emacs/List Tags"
@Prev "Tags Stepping"
@Toc "Tags"

Tag Table Inquiries
-------------------

@{b}M-x list-tags@{ub}
     Display a list of the tags defined in a specific program file.

@{b}M-x tags-apropos@{ub}
     Display a list of all tags matching a specified regexp.

   @{b}M-x list-tags@{ub} reads the name of one of the files described by the
selected tag table, and displays a list of all the tags defined in that
file.  The "file name" argument is really just a string to compare
against the names recorded in the tag table; it is read as a string
rather than as a file name.  Therefore, completion and defaulting are
not available, and you must enter the string the same way it appears in
the tag table.  Do not include a directory as part of the file name
unless the file name recorded in the tag table includes a directory.

   @{b}M-x tags-apropos@{ub} is like @{b}apropos@{ub} for tags.  It reads a regexp, then
finds all the tags in the selected tag table whose entries match that
regexp, and displays the tag names found.


@EndNode

@Node "Fortran" "emacs/Fortran"
@Prev "Tags"
@Toc "Programs"

Fortran Mode
============

   Fortran mode provides special motion commands for Fortran statements
and subprograms, and indentation commands that understand Fortran
conventions of nesting, line numbers and continuation statements.

   Special commands for comments are provided because Fortran comments
are unlike those of other languages.

   Built-in abbrevs optionally save typing when you insert Fortran
keywords.

   Use @{b}M-x fortran-mode@{ub} to switch to this major mode.  Doing so calls
the value of @{b}fortran-mode-hook@{ub} as a function of no arguments if that
variable has a value that is not @{b}nil@{ub}.


 @{" Motion " Link "Fortran Motion"}                     Moving point by statements or subprograms.
 @{" Indent " Link "Fortran Indent"}                     Indentation commands for Fortran.
 @{" Comments " Link "Fortran Comments"}                   Inserting and aligning comments.
 @{" Columns " Link "Fortran Columns"}                    Measuring columns for valid Fortran.
 @{" Abbrev " Link "Fortran Abbrev"}                     Built-in abbrevs for Fortran keywords.

   Fortran mode was contributed by Michael Prange.


@EndNode

@Node "Fortran Motion" "emacs/Fortran Motion"
@Next "Fortran Indent"
@Prev "Fortran"
@Toc "Fortran"

Motion Commands
---------------

   Fortran mode provides special commands to move by subprograms
(functions and subroutines) and by statements.  There is also a command
to put the region around one subprogram, convenient for killing it or
moving it.

@{b}C-M-a@{ub}
     Move to beginning of subprogram (@{b}beginning-of-fortran-subprogram@{ub}).

@{b}C-M-e@{ub}
     Move to end of subprogram (@{b}end-of-fortran-subprogram@{ub}).

@{b}C-M-h@{ub}
     Put point at beginning of subprogram and mark at end
     (@{b}mark-fortran-subprogram@{ub}).

@{b}C-c C-n@{ub}
     Move to beginning of current or next statement
     (@{b}fortran-next-statement@{ub}).

@{b}C-c C-p@{ub}
     Move to beginning of current or previous statement
     (@{b}fortran-previous-statement@{ub}).


@EndNode

@Node "Fortran Indent" "emacs/Fortran Indent"
@Next "Fortran Comments"
@Prev "Fortran Motion"
@Toc "Fortran"

Fortran Indentation
-------------------

   Special commands and features are needed for indenting Fortran code
in order to make sure various syntactic entities (line numbers, comment
line indicators and continuation line flags) appear in the columns that
are required for standard Fortran.


 @{" Commands " Link "ForIndent Commands"}                     Commands for indenting Fortran.
 @{" Numbers " Link "ForIndent Num"}                      How line numbers auto-indent.
 @{" Conv " Link "ForIndent Conv"}                         Conventions you must obey to avoid trouble.
 @{" Vars " Link "ForIndent Vars"}                         Variables controlling Fortran indent style.


@EndNode

@Node "ForIndent Commands" "emacs/ForIndent Commands"
@Next "ForIndent Num"
@Prev "Fortran Indent"
@Toc "Fortran Indent"

Fortran Indentation Commands
............................

@{b}TAB@{ub}
     Indent the current line (@{b}fortran-indent-line@{ub}).

@{b}M-LFD@{ub}
     Break the current line and set up a continuation line.

@{b}C-M-q@{ub}
     Indent all the lines of the subprogram point is in
     (@{b}fortran-indent-subprogram@{ub}).

   TAB is redefined by Fortran mode to reindent the current line for
Fortran (@{b}fortran-indent-line@{ub}).  Line numbers and continuation markers
are indented to their required columns, and the body of the statement
is independently indented based on its nesting in the program.

   The key @{b}C-M-q@{ub} is redefined as @{b}fortran-indent-subprogram@{ub}, a command
to reindent all the lines of the Fortran subprogram (function or
subroutine) containing point.

   The key @{b}M-LFD@{ub} is redefined as @{b}fortran-split-line@{ub}, a command to split
a line in the appropriate fashion for Fortran.  In a non-comment line,
the second half becomes a continuation line and is indented
accordingly.  In a comment line, both halves become separate comment
lines.


@EndNode

@Node "ForIndent Num" "emacs/ForIndent Num"
@Next "ForIndent Conv"
@Prev "ForIndent Commands"
@Toc "Fortran Indent"

Line Numbers and Continuation
.............................

   If a number is the first non-whitespace in the line, it is assumed
to be a line number and is moved to columns 0 through 4.  (Columns are
always counted from 0 in GNU Emacs.)  If the text on the line starts
with the conventional Fortran continuation marker @{b}$@{ub}, it is moved to
column 5.  If the text begins with any non whitespace character in
column 5, it is assumed to be an unconventional continuation marker and
remains in column 5.

   Line numbers of four digits or less are normally indented one space.
This amount is controlled by the variable @{b}fortran-line-number-indent@{ub}
which is the maximum indentation a line number can have.  Line numbers
are indented to right-justify them to end in column 4 unless that would
require more than this maximum indentation.  The default value of the
variable is 1.

   Simply inserting a line number is enough to indent it according to
these rules.  As each digit is inserted, the indentation is recomputed.
To turn off this feature, set the variable
@{b}fortran-electric-line-number@{ub} to @{b}nil@{ub}.  Then inserting line numbers
is like inserting anything else.


@EndNode

@Node "ForIndent Conv" "emacs/ForIndent Conv"
@Next "ForIndent Vars"
@Prev "ForIndent Num"
@Toc "Fortran Indent"

Syntactic Conventions
.....................

   Fortran mode assumes that you follow certain conventions that
simplify the task of understanding a Fortran program well enough to
indent it properly:

   @{b}*@{ub} Two nested @{b}do@{ub} loops never share a @{b}continue@{ub} statement.

   @{b}*@{ub} The same character appears in column 5 of all continuation lines,
     and this character is the value of the variable
     @{b}fortran-continuation-char@{ub}.  By default, this character is @{b}$@{ub}.

If you fail to follow these conventions, the indentation commands may
indent some lines unaesthetically.  However, a correct Fortran program
will retain its meaning when reindented even if the conventions are not
followed.


@EndNode

@Node "ForIndent Vars" "emacs/ForIndent Vars"
@Prev "ForIndent Conv"
@Toc "Fortran Indent"

Variables for Fortran Indentation
.................................

   Several additional variables control how Fortran indentation works.

@{b}fortran-do-indent@{ub}
     Extra indentation within each level of @{b}do@{ub} statement
     (default 3).

@{b}fortran-if-indent@{ub}
     Extra indentation within each level of @{b}if@{ub} statement
     (default 3).

@{b}fortran-continuation-indent@{ub}
     Extra indentation for bodies of continuation lines (default 5).

@{b}fortran-check-all-num-for-matching-do@{ub}
     If this is @{b}nil@{ub}, indentation assumes that each @{b}do@{ub} statement ends on
     a @{b}continue@{ub} statement.  Therefore, when computing indentation for a
     statement other than @{b}continue@{ub}, it can save time by not checking
     for a @{b}do@{ub} statement ending there.  If this is non-@{b}nil@{ub}, indenting
     any numbered statement must check for a @{b}do@{ub} that ends there.  The
     default is @{b}nil@{ub}.

@{b}fortran-minimum-statement-indent@{ub}
     Minimum indentation for fortran statements.  For standard Fortran,
     this is 6.  Statement bodies will never be indented less than this
     much.


@EndNode

@Node "Fortran Comments" "emacs/Fortran Comments"
@Next "Fortran Columns"
@Prev "Fortran Indent"
@Toc "Fortran"

Comments
--------

   The usual Emacs comment commands assume that a comment can follow a
line of code.  In Fortran, the standard comment syntax requires an
entire line to be just a comment.  Therefore, Fortran mode replaces the
standard Emacs comment commands and defines some new variables.

   Fortran mode can also handle a nonstandard comment syntax where
comments start with @{b}!@{ub} and can follow other text.  Because only some
Fortran compilers accept this syntax, Fortran mode will not insert such
comments unless you have said in advance to do so.  To do this, set the
variable @{b}comment-start@{ub} to @{b}"!"@{ub} (see @{"Variables" Link "Variables"}).

@{b}M-;@{ub}
     Align comment or insert new comment (@{b}fortran-comment-indent@{ub}).

@{b}C-x ;@{ub}
     Applies to nonstandard @{b}!@{ub} comments only.

@{b}C-c ;@{ub}
     Turn all lines of the region into comments, or (with arg) turn
     them back into real code (@{b}fortran-comment-region@{ub}).

   @{b}M-;@{ub} in Fortran mode is redefined as the command
@{b}fortran-comment-indent@{ub}.  Like the usual @{b}M-;@{ub} command, this recognizes
any kind of existing comment and aligns its text appropriately; if
there is no existing comment, a comment is inserted and aligned.  But
inserting and aligning comments are not the same in Fortran mode as in
other modes.

   When a new comment must be inserted, if the current line is blank, a
full-line comment is inserted.  On a non-blank line, a nonstandard @{b}!@{ub}
comment is inserted if you have said you want to use them.  Otherwise a
full-line comment is inserted on a new line before the current line.

   Nonstandard @{b}!@{ub} comments are aligned like comments in other languages,
but full-line comments are different.  In a standard full-line comment,
the comment delimiter itself must always appear in column zero.  What
can be aligned is the text within the comment.  You can choose from
three styles of alignment by setting the variable
@{b}fortran-comment-indent-style@{ub} to one of these values:

@{b}fixed@{ub}
     The text is aligned at a fixed column, which is the value of
     @{b}fortran-comment-line-column@{ub}.  This is the default.

@{b}relative@{ub}
     The text is aligned as if it were a line of code, but with an
     additional @{b}fortran-comment-line-column@{ub} columns of indentation.

@{b}nil@{ub}
     Text in full-line columns is not moved automatically.

   In addition, you can specify the character to be used to indent
within full-line comments by setting the variable
@{b}fortran-comment-indent-char@{ub} to the character you want to use.

   Fortran mode introduces the two variables, @{b}comment-line-start@{ub} and
@{b}comment-line-start-skip@{ub}, which play for full-line comments the same
roles played by @{b}comment-start@{ub} and @{b}comment-start-skip@{ub} for ordinary
text-following comments.  Normally these are set properly by Fortran
mode so you do not need to change them.

   The normal Emacs comment command @{b}C-x ;@{ub} has not been redefined.  If
you use @{b}!@{ub} comments, this command can be used with them.  Otherwise it
is useless in Fortran mode.

   The command @{b}C-c ;@{ub} (@{b}fortran-comment-region@{ub}) turns all the lines of
the region into comments by inserting the string @{b}C$$$@{ub} at the front of
each one.  With a numeric arg, the region is turned back into live code
by deleting @{b}C$$$@{ub} from the front of each line in it.  The string used
for these comments can be controlled by setting the variable
@{b}fortran-comment-region@{ub}.  Note that here we have an example of a command
and a variable with the same name; these two uses of the name never
conflict because in Lisp and in Emacs it is always clear from the
context which one is meant.


@EndNode

@Node "Fortran Columns" "emacs/Fortran Columns"
@Next "Fortran Abbrev"
@Prev "Fortran Comments"
@Toc "Fortran"

Columns
-------

@{b}C-c C-r@{ub}
     Displays a "column ruler" momentarily above the current line
     (@{b}fortran-column-ruler@{ub}).

@{b}C-c C-w@{ub}
     Splits the current window horizontally so that it is 72 columns
     wide.  This may help you avoid going over that limit
     (@{b}fortran-window-create@{ub}).

   The command @{b}C-c C-r@{ub} (@{b}fortran-column-ruler@{ub}) shows a column ruler
momentarily above the current line.  The comment ruler is two lines of
text that show you the locations of columns with special significance
in Fortran programs.  Square brackets show the limits of the columns for
line numbers, and curly brackets show the limits of the columns for the
statement body.  Column numbers appear above them.

   Note that the column numbers count from zero, as always in GNU
Emacs.  As a result, the numbers may not be those you are familiar
with; but the actual positions in the line are standard Fortran.

   The text used to display the column ruler is the value of the
variable @{b}fortran-comment-ruler@{ub}.  By changing this variable, you can
change the display.

   For even more help, use @{b}C-c C-w@{ub} (@{b}fortran-window-create@{ub}), a command
which splits the current window horizontally, making a window 72
columns wide.  By editing in this window you can immediately see when
you make a line too wide to be correct Fortran.


@EndNode

@Node "Fortran Abbrev" "emacs/Fortran Abbrev"
@Prev "Fortran Columns"
@Toc "Fortran"

Fortran Keyword Abbrevs
-----------------------

   Fortran mode provides many built-in abbrevs for common keywords and
declarations.  These are the same sort of abbrev that you can define
yourself.  To use them, you must turn on Abbrev mode (see @{"Abbrevs" Link "Abbrevs"}).

   The built-in abbrevs are unusual in one way: they all start with a
semicolon.  You cannot normally use semicolons in an abbrev, but Fortran
mode makes this possible by changing the syntax of semicolon to "word
constituent".

   For example, one built-in Fortran abbrev is @{b};c@{ub} for @{b}continue@{ub}.  If you
insert @{b};c@{ub} and then insert a punctuation character such as a space or a
newline, the @{b};c@{ub} will change automatically to @{b}continue@{ub}, provided Abbrev
mode is enabled.

   Type @{b};?@{ub} or @{b};C-h@{ub} to display a list of all the built-in Fortran
abbrevs and what they stand for.


@EndNode

@Node "Compiling-Testing" "emacs/Compiling-Testing"
@Next "Abbrevs"
@Prev "Programs"
@Toc "Main"

Compiling and Testing Programs
******************************

   The previous chapter discusses the Emacs commands that are useful for
making changes in programs.  This chapter deals with commands that
assist in the larger process of developing and maintaining programs.


 @{" Compilation " Link "Compilation"}         Compiling programs in languages other than Lisp
                        (C, Pascal, etc.)
 @{" Modes " Link "Lisp Modes"}               Various modes for editing Lisp programs, with
                       different facilities for running the Lisp programs.
 @{" Libraries " Link "Lisp Libraries"}                      Creating Lisp programs to run in Emacs.
 @{" Interaction " Link "Lisp Interaction"}                    Executing Lisp in an Emacs buffer.
 @{" Eval " Link "Lisp Eval"}                Executing a single Lisp expression in Emacs.
 @{" Debug " Link "Lisp Debug"}               Debugging Lisp programs running in Emacs.
 @{" External Lisp " Link "External Lisp"}       Communicating through Emacs with a separate Lisp.


@EndNode

@Node "Compilation" "emacs/Compilation"
@Next "Lisp Modes"
@Prev "Compiling-Testing"
@Toc "Compiling-Testing"

Running `make', or Compilers Generally
======================================

   Emacs can run compilers for noninteractive languages such as C and
Fortran as inferior processes, feeding the error log into an Emacs
buffer.  It can also parse the error messages and visit the files in
which errors are found, moving point right to the line where the error
occurred.

@{b}M-x compile@{ub}
     Run a compiler asynchronously under Emacs, with error messages to
     @{b}*compilation*@{ub} buffer.

@{b}M-x grep@{ub}
     Run @{b}grep@{ub} asynchronously under Emacs, with matching lines listed in
     the buffer named @{b}*compilation*@{ub}.

@{b}M-x kill-compilation@{ub}
@{b}M-x kill-grep@{ub}
     Kill the running compilation or @{b}grep@{ub} subprocess.

@{b}C-x `@{ub}
     Visit the locus of the next compiler error message or @{b}grep@{ub} match.

   To run @{b}make@{ub} or another compiler, do @{b}M-x compile@{ub}.  This command reads
a shell command line using the minibuffer, and then executes the
specified command line in an inferior shell with output going to the
buffer named @{b}*compilation*@{ub}.  The current buffer's default directory is
used as the working directory for the execution of the command;
normally, therefore, the makefile comes from this directory.

   When the shell command line is read, the minibuffer appears
containing a default command line, which is the command you used the
last time you did @{b}M-x compile@{ub}.  If you type just RET, the same command
line is used again.  The first @{b}M-x compile@{ub} provides @{b}make -k@{ub} as the
default.  The default is taken from the variable @{b}compile-command@{ub}; if the
appropriate compilation command for a file is something other than @{b}make
-k@{ub}, it can be useful to have the file specify a local value for
@{b}compile-command@{ub} (see @{"File Variables" Link "File Variables"}).

   Starting a compilation causes the buffer @{b}*compilation*@{ub} to be
displayed in another window but not selected.  Its mode line tells you
whether compilation is finished, with the word @{b}run@{ub} or @{b}exit@{ub} inside the
parentheses.  You do not have to keep this buffer visible; compilation
continues in any case.

   To kill the compilation process, do @{b}M-x kill-compilation@{ub}.  You will
see that the mode line of the @{b}*compilation*@{ub} buffer changes to say
@{b}signal@{ub} instead of @{b}run@{ub}.  Starting a new compilation also kills any
running compilation, as only one can exist at any time.  However, this
requires confirmation before actually killing a compilation that is
running.

   To parse the compiler error messages, type @{b}C-x `@{ub} (@{b}next-error@{ub}).  The
character following the @{b}C-x@{ub} is the grave accent, not the single quote.
This command displays the buffer @{b}*compilation*@{ub} in one window and the
buffer in which the next error occurred in another window.  Point in
that buffer is moved to the line where the error was found.  The
corresponding error message is scrolled to the top of the window in
which @{b}*compilation*@{ub} is displayed.

   The first time @{b}C-x `@{ub} is used after the start of a compilation, it
parses all the error messages, visits all the files that have error
messages, and makes markers pointing at the lines that the error
messages refer to.  Then it moves to the first error message location.
Subsequent uses of @{b}C-x `@{ub} advance down the data set up by the first use.
When the preparsed error messages are exhausted, the next @{b}C-x `@{ub} checks
for any more error messages that have come in; this is useful if you
start editing the compiler errors while the compilation is still going
on.  If no more error messages have come in, @{b}C-x `@{ub} reports an error.

   @{b}C-u C-x `@{ub} discards the preparsed error message data and parses the
@{b}*compilation*@{ub} buffer over again, then displaying the first error.  This
way, you can process the same set of errors again.

   Instead of running a compiler, you can run @{b}grep@{ub} and see the lines on
which matches were found.  To do this, type @{b}M-x grep@{ub} with an argument
line that contains the same arguments you would give @{b}grep@{ub} when running
it normally: a @{b}grep@{ub}-style regexp (usually in singlequotes to quote the
shell's special characters) followed by filenames which may use
wildcards.  The output from @{b}grep@{ub} goes in the @{b}*compilation*@{ub} buffer and
the lines that matched can be found with @{b}C-x `@{ub} as if they were
compilation errors.

   Note: a shell is used to run the compile command, but the shell is
told that it should be noninteractive.  This means in particular that
the shell starts up with no prompt.  If you find your usual shell
prompt making an unsightly appearance in the @{b}*compilation*@{ub} buffer, it
means you have made a mistake in your shell's init file (@{b}.cshrc@{ub} or
@{b}.shrc@{ub} or ...) by setting the prompt unconditionally.  The shell
init file should set the prompt only if there already is a prompt.

   Here is how to do it in @{b}csh@{ub}:

     if ($?prompt) set prompt = ...

   Here is how to do it in the Bourne-Again shell:

     if [ ! "$PS1" ]; then
        PS1=...
     fi


@EndNode

@Node "Lisp Modes" "emacs/Lisp Modes"
@Next "Lisp Libraries"
@Prev "Compilation"
@Toc "Compiling-Testing"

Major Modes for Lisp
====================

   Emacs has four different major modes for Lisp.  They are the same in
terms of editing commands, but differ in the commands for executing Lisp
expressions.

Emacs-Lisp mode
     The mode for editing source files of programs to run in Emacs Lisp.
     This mode defines @{b}C-M-x@{ub} to evaluate the current defun.  See
     @{"Lisp Libraries" Link "Lisp Libraries"}.

Lisp Interaction mode
     The mode for an interactive session with Emacs Lisp.  It defines
     LFD to evaluate the sexp before point and insert its value in the
     buffer.  See @{"Lisp Interaction" Link "Lisp Interaction"}.

Lisp mode
     The mode for editing source files of programs that run in Lisps
     other than Emacs Lisp.  This mode defines @{b}C-M-x@{ub} to send the
     current defun to an inferior Lisp process.  See @{"External Lisp" Link "External Lisp"}.

Inferior Lisp mode
     The mode for an interactive session with an inferior Lisp process.
     This mode combines the special features of Lisp mode and Shell mode
     (see @{"Shell Mode" Link "Shell Mode"}).

Scheme mode
     Like Lisp mode but for Scheme programs.

Inferior Scheme mode
     The mode for an interactive session with an inferior Scheme
     process.


@EndNode

@Node "Lisp Libraries" "emacs/Lisp Libraries"
@Next "Lisp Eval"
@Prev "Lisp Modes"
@Toc "Compiling-Testing"

Libraries of Lisp Code for Emacs
================================

   Lisp code for Emacs editing commands is stored in files whose names
conventionally end in @{b}.el@{ub}.  This ending tells Emacs to edit them in
Emacs-Lisp mode (see @{"Lisp Modes" Link "Lisp Modes"}).


 @{" Loading " Link "Loading"} 		Loading libraries of Lisp code into Emacs for use.
 @{" Compiling Libraries " Link "Compiling Libraries"}  Compiling a library makes it load and run faster.
 @{" Mocklisp " Link "Mocklisp"} 		Converting Mocklisp to Lisp so GNU Emacs can run it.


@EndNode

@Node "Loading" "emacs/Loading"
@Next "Compiling Libraries"
@Prev "Lisp Libraries"
@Toc "Lisp Libraries"

Loading Libraries
-----------------

   To execute a file of Emacs Lisp, use @{b}M-x load-file@{ub}.  This command
reads a file name using the minibuffer and then executes the contents of
that file as Lisp code.  It is not necessary to visit the file first;
in any case, this command reads the file as found on disk, not text in
an Emacs buffer.

   Once a file of Lisp code is installed in the Emacs Lisp library
directories, users can load it using @{b}M-x load-library@{ub}.  Programs can
load it by calling @{b}load-library@{ub}, or with @{b}load@{ub}, a more primitive
function that is similar but accepts some additional arguments.

   @{b}M-x load-library@{ub} differs from @{b}M-x load-file@{ub} in that it searches a
sequence of directories and tries three file names in each directory.
The three names are, first, the specified name with @{b}.elc@{ub} appended;
second, with @{b}.el@{ub} appended; third, the specified name alone.  A @{b}.elc@{ub}
file would be the result of compiling the Lisp file into byte code; it
is loaded if possible in preference to the Lisp file itself because the
compiled file will load and run faster.

   Because the argument to @{b}load-library@{ub} is usually not in itself a
valid file name, file name completion is not available.  Indeed, when
using this command, you usually do not know exactly what file name will
be used.

   The sequence of directories searched by @{b}M-x load-library@{ub} is
specified by the variable @{b}load-path@{ub}, a list of strings that are
directory names.  The default value of the list contains the directory
where the Lisp code for Emacs itself is stored.  If you have libraries
of your own, put them in a single directory and add that directory to
@{b}load-path@{ub}.  @{b}nil@{ub} in this list stands for the current default directory,
but it is probably not a good idea to put @{b}nil@{ub} in the list.  If you find
yourself wishing that @{b}nil@{ub} were in the list, most likely what you really
want to do is use @{b}M-x load-file@{ub} this once.

   Often you do not have to give any command to load a library, because
the commands defined in the library are set up to @{i}autoload@{ui} that library.
Running any of those commands causes @{b}load@{ub} to be called to load the
library; this replaces the autoload definitions with the real ones from
the library.

   If autoloading a file does not finish, either because of an error or
because of a @{b}C-g@{ub} quit, all function definitions made by the file are
undone automatically.  So are any calls to @{b}provide@{ub}.  As a consequence,
if you use one of the autoloadable commands again, the entire file will
be loaded a second time.  This prevents problems where the command is no
longer autoloading but it works wrong because not all the file was
loaded.  Function definitions are undone only for autoloading; explicit
calls to @{b}load@{ub} do not undo anything if loading is not completed.


@EndNode

@Node "Compiling Libraries" "emacs/Compiling Libraries"
@Next "Mocklisp"
@Prev "Loading"
@Toc "Lisp Libraries"

Compiling Libraries
-------------------

   Emacs Lisp code can be compiled into byte-code which loads faster,
takes up less space when loaded, and executes faster.

   The way to make a byte-code compiled file from an Emacs-Lisp source
file is with @{b}M-x byte-compile-file@{ub}.  The default argument for this
function is the file visited in the current buffer.  It reads the
specified file, compiles it into byte code, and writes an output file
whose name is made by appending @{b}c@{ub} to the input file name.  Thus, the
file @{b}rmail.el@{ub} would be compiled into @{b}rmail.elc@{ub}.

   To recompile the changed Lisp files in a directory, use @{b}M-x
byte-recompile-directory@{ub}.  Specify just the directory name as an
argument.  Each @{b}.el@{ub} file that has been byte-compiled before is
byte-compiled again if it has changed since the previous compilation.
A numeric argument to this command tells it to offer to compile each
@{b}.el@{ub} file that has not already been compiled.  You must answer @{b}y@{ub} or
@{b}n@{ub} to each offer.

   Emacs can be invoked noninteractively from the shell to do byte
compilation with the aid of the function @{b}batch-byte-compile@{ub}.  In this
case, the files to be compiled are specified with command-line
arguments.  Use a shell command of the form

     emacs -batch -f batch-byte-compile @{i}files@{ui}...

   Directory names may also be given as arguments;
@{b}byte-recompile-directory@{ub} is invoked (in effect) on each such directory.
@{b}batch-byte-compile@{ub} uses all the remaining command-line arguments as
file or directory names, then kills the Emacs process.

   @{b}M-x disassemble@{ub} explains the result of byte compilation.  Its
argument is a function name.  It displays the byte-compiled code in a
help window in symbolic form, one instruction per line.  If the
instruction refers to a variable or constant, that is shown too.


@EndNode

@Node "Mocklisp" "emacs/Mocklisp"
@Prev "Compiling Libraries"
@Toc "Lisp Libraries"

Converting Mocklisp to Lisp
---------------------------

   GNU Emacs can run Mocklisp files by converting them to Emacs Lisp
first.  To convert a Mocklisp file, visit it and then type @{b}M-x
convert-mocklisp-buffer@{ub}.  Then save the resulting buffer of Lisp file
in a file whose name ends in @{b}.el@{ub} and use the new file as a Lisp library.

   It does not currently work to byte-compile converted Mocklisp code.
This is because converted Mocklisp code uses some special Lisp features
to deal with Mocklisp's incompatible ideas of how arguments are
evaluated and which values signify "true" or "false".


@EndNode

@Node "Lisp Eval" "emacs/Lisp Eval"
@Next "Lisp Debug"
@Prev "Lisp Libraries"
@Toc "Compiling-Testing"

Evaluating Emacs-Lisp Expressions
=================================

   Lisp programs intended to be run in Emacs should be edited in
Emacs-Lisp mode; this will happen automatically for file names ending
in @{b}.el@{ub}.  By contrast, Lisp mode itself is used for editing Lisp
programs intended for other Lisp systems.  Emacs-Lisp mode can be
selected with the command @{b}M-x emacs-lisp-mode@{ub}.

   For testing of Lisp programs to run in Emacs, it is useful to be
able to evaluate part of the program as it is found in the Emacs
buffer.  For example, after changing the text of a Lisp function
definition, evaluating the definition installs the change for future
calls to the function.  Evaluation of Lisp expressions is also useful
in any kind of editing task for invoking noninteractive functions
(functions that are not commands).

@{b}M-ESC@{ub}
     Read a Lisp expression in the minibuffer, evaluate it, and print
     the value in the minibuffer (@{b}eval-expression@{ub}).

@{b}C-x C-e@{ub}
     Evaluate the Lisp expression before point, and print the value in
     the minibuffer (@{b}eval-last-sexp@{ub}).

@{b}C-M-x@{ub}
     Evaluate the defun containing or after point, and print the value
     in the minibuffer (@{b}eval-defun@{ub}).

@{b}M-x eval-region@{ub}
     Evaluate all the Lisp expressions in the region.

@{b}M-x eval-current-buffer@{ub}
     Evaluate all the Lisp expressions in the buffer.

   @{b}M-ESC@{ub} (@{b}eval-expression@{ub}) is the most basic command for evaluating a
Lisp expression interactively.  It reads the expression using the
minibuffer, so you can execute any expression on a buffer regardless of
what the buffer contains.  When the expression is evaluated, the current
buffer is once again the buffer that was current when @{b}M-ESC@{ub} was typed.

   @{b}M-ESC@{ub} can easily confuse users who do not understand it, especially
on keyboards with autorepeat where it can result from holding down the
ESC key for too long.  Therefore, @{b}eval-expression@{ub} is normally a
disabled command.  Attempting to use this command asks for confirmation
and gives you the option of enabling it; once you enable the command,
confirmation will no longer be required for it.  See @{"Disabling" Link "Disabling"}.

   In Emacs-Lisp mode, the key @{b}C-M-x@{ub} is bound to the function
@{b}eval-defun@{ub}, which parses the defun containing or following point as
a Lisp expression and evaluates it.  The value is printed in the echo
area.  This command is convenient for installing in the Lisp
environment changes that you have just made in the text of a function
definition.

   The command @{b}C-x C-e@{ub} (@{b}eval-last-sexp@{ub}) performs a similar job but is
available in all major modes, not just Emacs-Lisp mode.  It finds the
sexp before point, reads it as a Lisp expression, evaluates it, and
prints the value in the echo area.  It is sometimes useful to type in an
expression and then, with point still after it, type @{b}C-x C-e@{ub}.

   If @{b}C-M-x@{ub} or @{b}C-x C-e@{ub} is given a numeric argument, it prints the value
by insertion into the current buffer at point, rather than in the echo
area.  The argument value does not matter.

   The most general command for evaluating Lisp expressions from a
buffer is @{b}eval-region@{ub}.  @{b}M-x eval-region@{ub} parses the text of the region
as one or more Lisp expressions, evaluating them one by one.  @{b}M-x
eval-current-buffer@{ub} is similar but evaluates the entire buffer.  This
is a reasonable way to install the contents of a file of Lisp code that
you are just ready to test.  After finding and fixing a bug, use @{b}C-M-x@{ub}
on each function that you change, to keep the Lisp world in step with
the source file.


@EndNode

@Node "Lisp Debug" "emacs/Lisp Debug"
@Next "Lisp Interaction"
@Prev "Lisp Eval"
@Toc "Compiling-Testing"

The Emacs-Lisp Debugger
=======================

   GNU Emacs contains a debugger for Lisp programs executing inside it.
This debugger is normally not used; many commands frequently get Lisp
errors when invoked in inappropriate contexts (such as @{b}C-f@{ub} at the end
of the buffer) and it would be very unpleasant for that to enter a
special debugging mode.  When you want to make Lisp errors invoke the
debugger, you must set the variable @{b}debug-on-error@{ub} to non-@{b}nil@{ub}.  Quitting
with @{b}C-g@{ub} is not considered an error, and @{b}debug-on-error@{ub} has no effect
on the handling of @{b}C-g@{ub}.  However, if you set @{b}debug-on-quit@{ub} non-@{b}nil@{ub}, @{b}C-g@{ub}
will invoke the debugger.  This can be useful for debugging an infinite
loop; type @{b}C-g@{ub} once the loop has had time to reach its steady state.
@{b}debug-on-quit@{ub} has no effect on errors.

   You can also cause the debugger to be entered when a specified
function is called, or at a particular place in Lisp code.  Use @{b}M-x
debug-on-entry@{ub} with argument @{i}fun-name@{ui} to cause function @{i}fun-name@{ui} to
enter the debugger as soon as it is called.  Use @{b}M-x
cancel-debug-on-entry@{ub} to make the function stop entering the debugger
when called.  (Redefining the function also does this.)  To enter the
debugger from some other place in Lisp code, you must insert the
expression @{b}(debug)@{ub} there and install the changed code with @{b}C-M-x@{ub}.  See
@{"Lisp Eval" Link "Lisp Eval"}.

   When the debugger is entered, it displays the previously selected
buffer in one window and a buffer named @{b}*Backtrace*@{ub} in another window.
The backtrace buffer contains one line for each level of Lisp function
execution currently going on.  At the beginning of this buffer is a
message describing the reason that the debugger was invoked (such as,
what error message if it was invoked due to an error).

   The backtrace buffer is read-only, and is in a special major mode,
Backtrace mode, in which letters are defined as debugger commands.  The
usual Emacs editing commands are available; you can switch windows to
examine the buffer that was being edited at the time of the error, and
you can also switch buffers, visit files, and do any other sort of
editing.  However, the debugger is a recursive editing level (see
@{"Recursive Edit" Link "Recursive Edit"}) and it is wise to go back to the backtrace buffer and
exit the debugger officially when you don't want to use it any more.
Exiting the debugger kills the backtrace buffer.

   The contents of the backtrace buffer show you the functions that are
executing and the arguments that were given to them.  It has the
additional purpose of allowing you to specify a stack frame by moving
point to the line describing that frame.  The frame whose line point is
on is considered the @{i}current frame@{ui}.  Some of the debugger commands
operate on the current frame.  Debugger commands are mainly used for
stepping through code an expression at a time.  Here is a list of them.

@{b}c@{ub}
     Exit the debugger and continue execution.  In most cases,
     execution of the program continues as if the debugger had never
     been entered (aside from the effect of any variables or data
     structures you may have changed while inside the debugger).  This
     includes entry to the debugger due to function entry or exit,
     explicit invocation, quitting or certain errors.  Most errors
     cannot be continued; trying to continue one of them causes the
     same error to occur again.

@{b}d@{ub}
     Continue execution, but enter the debugger the next time a Lisp
     function is called.  This allows you to step through the
     subexpressions of an expression, seeing what values the
     subexpressions compute and what else they do.

     The stack frame made for the function call which enters the
     debugger in this way will be flagged automatically for the
     debugger to be called when the frame is exited.  You can use the @{b}u@{ub}
     command to cancel this flag.

@{b}b@{ub}
     Set up to enter the debugger when the current frame is exited.
     Frames that will invoke the debugger on exit are flagged with
     stars.

@{b}u@{ub}
     Don't enter the debugger when the current frame is exited.  This
     cancels a @{b}b@{ub} command on that frame.

@{b}e@{ub}
     Read a Lisp expression in the minibuffer, evaluate it, and print
     the value in the echo area.  This is the same as the command @{b}M-ESC@{ub},
     except that @{b}e@{ub} is not normally disabled like @{b}M-ESC@{ub}.

@{b}q@{ub}
     Terminate the program being debugged; return to top-level Emacs
     command execution.

     If the debugger was entered due to a @{b}C-g@{ub} but you really want to
     quit, not to debug, use the @{b}q@{ub} command.

@{b}r@{ub}
     Return a value from the debugger.  The value is computed by
     reading an expression with the minibuffer and evaluating it.

     The value returned by the debugger makes a difference when the
     debugger was invoked due to exit from a Lisp call frame (as
     requested with @{b}b@{ub}); then the value specified in the @{b}r@{ub} command is
     used as the value of that frame.

     The debugger's return value also matters with many errors.  For
     example, @{b}wrong-type-argument@{ub} errors will use the debugger's return
     value instead of the invalid argument; @{b}no-catch@{ub} errors will use the
     debugger value as a throw tag instead of the tag that was not
     found.  If an error was signaled by calling the Lisp function
     @{b}signal@{ub}, the debugger's return value is returned as the value of
     @{b}signal@{ub}.


@EndNode

@Node "Lisp Interaction" "emacs/Lisp Interaction"
@Next "External Lisp"
@Prev "Lisp Debug"
@Toc "Compiling-Testing"

Lisp Interaction Buffers
========================

   The buffer @{b}*scratch*@{ub} which is selected when Emacs starts up is
provided for evaluating Lisp expressions interactively inside Emacs.
Both the expressions you evaluate and their output goes in the buffer.

   The @{b}*scratch*@{ub} buffer's major mode is Lisp Interaction mode, which is
the same as Emacs-Lisp mode except for one command, LFD.  In Emacs-Lisp
mode, LFD is an indentation command, as usual.  In Lisp Interaction
mode, LFD is bound to @{b}eval-print-last-sexp@{ub}.  This function reads the
Lisp expression before point, evaluates it, and inserts the value in
printed representation before point.

   Thus, the way to use the @{b}*scratch*@{ub} buffer is to insert Lisp
expressions at the end, ending each one with LFD so that it will be
evaluated.  The result is a complete typescript of the expressions you
have evaluated and their values.

   The rationale for this feature is that Emacs must have a buffer when
it starts up, but that buffer is not useful for editing files since a
new buffer is made for every file that you visit.  The Lisp interpreter
typescript is the most useful thing I can think of for the initial
buffer to do.  @{b}M-x lisp-interaction-mode@{ub} will put any buffer in Lisp
Interaction mode.


@EndNode

@Node "External Lisp" "emacs/External Lisp"
@Prev "Lisp Interaction"
@Toc "Compiling-Testing"

Running an External Lisp
========================

   Emacs has facilities for running programs in other Lisp systems.
You can run a Lisp process as an inferior of Emacs, and pass
expressions to it to be evaluated.  You can also pass changed function
definitions directly from the Emacs buffers in which you edit the Lisp
programs to the inferior Lisp process.

   To run an inferior Lisp process, type @{b}M-x run-lisp@{ub}.  This runs the
program named @{b}lisp@{ub}, the same program you would run by typing @{b}lisp@{ub} as a
shell command, with both input and output going through an Emacs buffer
named @{b}*lisp*@{ub}.  That is to say, any "terminal output" from Lisp will go
into the buffer, advancing point, and any "terminal input" for Lisp
comes from text in the buffer.  To give input to Lisp, go to the end of
the buffer and type the input, terminated by RET.  The @{b}*lisp*@{ub} buffer is
in Inferior Lisp mode, a mode which has all the special characteristics
of Lisp mode and Shell mode (see @{"Shell Mode" Link "Shell Mode"}).

   For the source files of programs to run in external Lisps, use Lisp
mode.  This mode can be selected with @{b}M-x lisp-mode@{ub}, and is used
automatically for files whose names end in @{b}.l@{ub} or @{b}.lisp@{ub}, as most Lisp
systems usually expect.

   When you edit a function in a Lisp program you are running, the
easiest way to send the changed definition to the inferior Lisp process
is the key @{b}C-M-x@{ub}.  In Lisp mode, this runs the function @{b}lisp-send-defun@{ub},
which finds the defun around or following point and sends it as input to
the Lisp process.  (Emacs can send input to any inferior process
regardless of what buffer is current.)

   Contrast the meanings of @{b}C-M-x@{ub} in Lisp mode (for editing programs to
be run in another Lisp system) and Emacs-Lisp mode (for editing Lisp
programs to be run in Emacs): in both modes it has the effect of
installing the function definition that point is in, but the way of
doing so is different according to where the relevant Lisp environment
is found.  See @{"Lisp Modes" Link "Lisp Modes"}.


@EndNode

@Node "Abbrevs" "emacs/Abbrevs"
@Next "Picture"
@Prev "Compiling-Testing"
@Toc "Main"

Abbrevs
*******

   An @{i}abbrev@{ui} is a word which @{i}expands@{ui}, if you insert it, into some
different text.  Abbrevs are defined by the user to expand in specific
ways.  For example, you might define @{b}foo@{ub} as an abbrev expanding to @{b}find
outer otter@{ub}.  With this abbrev defined, you would be able to get @{b}find
outer otter @{ub} into the buffer by typing @{b}f o o SPC@{ub}.

   Abbrevs expand only when Abbrev mode (a minor mode) is enabled.
Disabling Abbrev mode does not cause abbrev definitions to be forgotten,
but they do not expand until Abbrev mode is enabled again.  The command
@{b}M-x abbrev-mode@{ub} toggles Abbrev mode; with a numeric argument, it turns
Abbrev mode on if the argument is positive, off otherwise.  See
@{"Minor Modes" Link "Minor Modes"}.  @{b}abbrev-mode@{ub} is also a variable; Abbrev mode is on when
the variable is non-@{b}nil@{ub}.  The variable @{b}abbrev-mode@{ub} automatically
becomes local to the current buffer when it is set.

   Abbrev definitions can be @{i}mode-specific@{ui}--active only in one major
mode.  Abbrevs can also have @{i}global@{ui} definitions that are active in all
major modes.  The same abbrev can have a global definition and various
mode-specific definitions for different major modes.  A mode specific
definition for the current major mode overrides a global definition.

   Abbrevs can be defined interactively during the editing session.
Lists of abbrev definitions can also be saved in files and reloaded in
later sessions.  Some users keep extensive lists of abbrevs that they
load in every session.

   A second kind of abbreviation facility is called the @{i}dynamic
expansion@{ui}.  Dynamic abbrev expansion happens only when you give an
explicit command and the result of the expansion depends only on the
current contents of the buffer.  See @{"Dynamic Abbrevs" Link "Dynamic Abbrevs"}.


 @{" Defining Abbrevs " Link "Defining Abbrevs"}   Defining an abbrev, so it will expand when typed.
 @{" Expanding Abbrevs " Link "Expanding Abbrevs"}  Controlling expansion: prefixes, canceling expansion.
 @{" Editing Abbrevs " Link "Editing Abbrevs"}    Viewing or editing the entire list of defined abbrevs.
 @{" Saving Abbrevs " Link "Saving Abbrevs"}     Saving the entire list of abbrevs for another session.
 @{" Dynamic Abbrevs " Link "Dynamic Abbrevs"}    Abbreviations for words already in the buffer.


@EndNode

@Node "Defining Abbrevs" "emacs/Defining Abbrevs"
@Next "Expanding Abbrevs"
@Prev "Abbrevs"
@Toc "Abbrevs"

Defining Abbrevs
================

@{b}C-x +@{ub}
     Define an abbrev to expand into some text before point
     (@{b}add-global-abbrev@{ub}).

@{b}C-x C-a@{ub}
     Similar, but define an abbrev available only in the current major
     mode (@{b}add-mode-abbrev@{ub}).

@{b}C-x -@{ub}
     Define a word in the buffer as an abbrev
     (@{b}inverse-add-global-abbrev@{ub}).

@{b}C-x C-h@{ub}
     Define a word in the buffer as a mode-specific abbrev
     (@{b}inverse-add-mode-abbrev@{ub}).

@{b}M-x kill-all-abbrevs@{ub}
     After this command, there are no abbrev definitions in effect.

   The usual way to define an abbrev is to enter the text you want the
abbrev to expand to, position point after it, and type @{b}C-x +@{ub}
(@{b}add-global-abbrev@{ub}).  This reads the abbrev itself using the
minibuffer, and then defines it as an abbrev for one or more words
before point.  Use a numeric argument to say how many words before
point should be taken as the expansion.  For example, to define the
abbrev @{b}foo@{ub} as mentioned above, insert the text @{b}find outer otter@{ub} and
then type @{b}C-u 3 C-x + f o o RET@{ub}.

   An argument of zero to @{b}C-x +@{ub} means to use the contents of the region
as the expansion of the abbrev being defined.

   The command @{b}C-x C-a@{ub} (@{b}add-mode-abbrev@{ub}) is similar, but defines a
mode-specific abbrev.  Mode specific abbrevs are active only in a
particular major mode.  @{b}C-x C-a@{ub} defines an abbrev for the major mode in
effect at the time @{b}C-x C-a@{ub} is typed.  The arguments work the same as
for @{b}C-x +@{ub}.

   If the text of the abbrev you want is already in the buffer instead
of the expansion, use command @{b}C-x -@{ub} (@{b}inverse-add-global-abbrev@{ub}) instead
of @{b}C-x +@{ub}, or use @{b}C-x C-h@{ub} (@{b}inverse-add-mode-abbrev@{ub}) instead of @{b}C-x C-a@{ub}.
These commands are called "inverse" because they invert the meaning of
the argument found in the buffer and the argument read using the
minibuffer.

   To change the definition of an abbrev, just add the new definition.
You will be asked to confirm if the abbrev has a prior definition.  To
remove an abbrev definition, give a negative argument to @{b}C-x +@{ub} or @{b}C-x
C-a@{ub}.  You must choose the command to specify whether to kill a global
definition or a mode-specific definition for the current mode, since
those two definitions are independent for one abbrev.

   @{b}M-x kill-all-abbrevs@{ub} removes all the abbrev definitions there are.


@EndNode

@Node "Expanding Abbrevs" "emacs/Expanding Abbrevs"
@Next "Editing Abbrevs"
@Prev "Defining Abbrevs"
@Toc "Abbrevs"

Controlling Abbrev Expansion
============================

   An abbrev expands whenever it is present in the buffer just before
point and a self-inserting punctuation character (SPC, comma, etc.) is
typed.  Most often the way an abbrev is used is to insert the abbrev
followed by punctuation.

   Abbrev expansion preserves case; thus, @{b}foo@{ub} expands into @{b}find outer
otter@{ub}; @{b}Foo@{ub} into @{b}Find outer otter@{ub}, and @{b}FOO@{ub} into @{b}FIND OUTER OTTER@{ub} or @{b}Find
Outer Otter@{ub} according to the variable @{b}abbrev-all-caps@{ub} (a non-@{b}nil@{ub} value
chooses the first of the two expansions).

   These two commands are used to control abbrev expansion:

@{b}M-'@{ub}
     Separate a prefix from a following abbrev to be expanded
     (@{b}abbrev-prefix-mark@{ub}).

@{b}C-x '@{ub}
     Expand the abbrev before point (@{b}expand-abbrev@{ub}).  This is effective
     even when Abbrev mode is not enabled.

@{b}M-x unexpand-abbrev@{ub}
     Undo last abbrev expansion.

@{b}M-x expand-region-abbrevs@{ub}
     Expand some or all abbrevs found in the region.

   You may wish to expand an abbrev with a prefix attached; for
example, if @{b}cnst@{ub} expands into @{b}construction@{ub}, you might want to use it to
enter @{b}reconstruction@{ub}.  It does not work to type @{b}recnst@{ub}, because that is
not necessarily a defined abbrev.  What does work is to use the command
@{b}M-'@{ub} (@{b}abbrev-prefix-mark@{ub}) in between the prefix @{b}re@{ub} and the abbrev @{b}cnst@{ub}.
First, insert @{b}re@{ub}.  Then type @{b}M-'@{ub}; this inserts a minus sign in the
buffer to indicate that it has done its work.  Then insert the abbrev
@{b}cnst@{ub}; the buffer now contains @{b}re-cnst@{ub}.  Now insert a punctuation
character to expand the abbrev @{b}cnst@{ub} into @{b}construction@{ub}.  The minus sign
is deleted at this point, because @{b}M-'@{ub} left word for this to be done.
The resulting text is the desired @{b}reconstruction@{ub}.

   If you actually want the text of the abbrev in the buffer, rather
than its expansion, you can accomplish this by inserting the following
punctuation with @{b}C-q@{ub}.  Thus, @{b}foo C-q -@{ub} leaves @{b}foo-@{ub} in the buffer.

   If you expand an abbrev by mistake, you can undo the expansion
(replace the expansion by the original abbrev text) with @{b}M-x
unexpand-abbrev@{ub}.  @{b}C-_@{ub} (@{b}undo@{ub}) can also be used to undo the expansion;
but first it will undo the insertion of the following punctuation
character!

   @{b}M-x expand-region-abbrevs@{ub} searches through the region for defined
abbrevs, and for each one found offers to replace it with its expansion.
This command is useful if you have typed in text using abbrevs but
forgot to turn on Abbrev mode first.  It may also be useful together
with a special set of abbrev definitions for making several global
replacements at once.  This command is effective even if Abbrev mode is
not enabled.


@EndNode

@Node "Editing Abbrevs" "emacs/Editing Abbrevs"
@Next "Saving Abbrevs"
@Prev "Expanding Abbrevs"
@Toc "Abbrevs"

Examining and Editing Abbrevs
=============================

@{b}M-x list-abbrevs@{ub}
     Print a list of all abbrev definitions.

@{b}M-x edit-abbrevs@{ub}
     Edit a list of abbrevs; you can add, alter or remove definitions.

   The output from @{b}M-x list-abbrevs@{ub} looks like this:

     (lisp-mode-abbrev-table)
     "dk"	       0    "define-key"
     (global-abbrev-table)
     "dfn"	       0    "definition"

(Some blank lines of no semantic significance, and some other abbrev
tables, have been omitted.)

   A line containing a name in parentheses is the header for abbrevs in
a particular abbrev table; @{b}global-abbrev-table@{ub} contains all the global
abbrevs, and the other abbrev tables that are named after major modes
contain the mode-specific abbrevs.

   Within each abbrev table, each nonblank line defines one abbrev.  The
word at the beginning is the abbrev.  The number that appears is the
number of times the abbrev has been expanded.  Emacs keeps track of
this to help you see which abbrevs you actually use, in case you decide
to eliminate those that you don't use often.  The string at the end of
the line is the expansion.

   @{b}M-x edit-abbrevs@{ub} allows you to add, change or kill abbrev
definitions by editing a list of them in an Emacs buffer.  The list has
the same format described above.  The buffer of abbrevs is called
@{b}*Abbrevs*@{ub}, and is in Edit-Abbrevs mode.  This mode redefines the key
@{b}C-c C-c@{ub} to install the abbrev definitions as specified in the buffer.
The command that does this is @{b}edit-abbrevs-redefine@{ub}.  Any abbrevs not
described in the buffer are eliminated when this is done.

   @{b}edit-abbrevs@{ub} is actually the same as @{b}list-abbrevs@{ub} except that it
selects the buffer @{b}*Abbrevs*@{ub} whereas @{b}list-abbrevs@{ub} merely displays it in
another window.


@EndNode

@Node "Saving Abbrevs" "emacs/Saving Abbrevs"
@Next "Dynamic Abbrevs"
@Prev "Editing Abbrevs"
@Toc "Abbrevs"

Saving Abbrevs
==============

   These commands allow you to keep abbrev definitions between editing
sessions.

@{b}M-x write-abbrev-file@{ub}
     Write a file describing all defined abbrevs.

@{b}M-x read-abbrev-file@{ub}
     Read such a file and define abbrevs as specified there.

@{b}M-x quietly-read-abbrev-file@{ub}
     Similar but do not display a message about what is going on.

@{b}M-x define-abbrevs@{ub}
     Define abbrevs from buffer.

@{b}M-x insert-abbrevs@{ub}
     Insert all abbrevs and their expansions into the buffer.

   @{b}M-x write-abbrev-file@{ub} reads a file name using the minibuffer and
writes a description of all current abbrev definitions into that file.
The text stored in the file looks like the output of @{b}M-x list-abbrevs@{ub}.
This is used to save abbrev definitions for use in a later session.

   @{b}M-x read-abbrev-file@{ub} reads a file name using the minibuffer and
reads the file, defining abbrevs according to the contents of the file.
@{b}M-x quietly-read-abbrev-file@{ub} is the same except that it does not
display a message in the echo area saying that it is doing its work; it
is actually useful primarily in the @{b}.emacs@{ub} file.  If an empty argument
is given to either of these functions, the file name used is the value
of the variable @{b}abbrev-file-name@{ub}, which is by default @{b}"~/.abbrev_defs"@{ub}.

   Emacs will offer to save abbrevs automatically if you have changed
any of them, whenever it offers to save all files (for @{b}C-x s@{ub} or @{b}C-x
C-c@{ub}).  This feature can be inhibited by setting the variable
@{b}save-abbrevs@{ub} to @{b}nil@{ub}.

   The commands @{b}M-x insert-abbrevs@{ub} and @{b}M-x define-abbrevs@{ub} are similar
to the previous commands but work on text in an Emacs buffer.  @{b}M-x
insert-abbrevs@{ub} inserts text into the current buffer before point,
describing all current abbrev definitions; @{b}M-x define-abbrevs@{ub} parses
the entire current buffer and defines abbrevs accordingly.


@EndNode

@Node "Dynamic Abbrevs" "emacs/Dynamic Abbrevs"
@Prev "Saving Abbrevs"
@Toc "Abbrevs"

Dynamic Abbrev Expansion
========================

   The abbrev facility described above operates automatically as you
insert text, but all abbrevs must be defined explicitly.  By contrast,
@{i}dynamic abbrevs@{ui} allow the meanings of abbrevs to be determined
automatically from the contents of the buffer, but dynamic abbrev
expansion happens only when you request it explicitly.

@{b}M-/@{ub}
     Expand the word in the buffer before point as a @{i}dynamic abbrev@{ui}, by
     searching in the buffer for words starting with that abbreviation
     (@{b}dabbrev-expand@{ub}).

   For example, if the buffer contains @{b}does this follow @{ub} and you type
@{b}f o M-/@{ub}, the effect is to insert @{b}follow@{ub} because that is the last word
in the buffer that starts with @{b}fo@{ub}.  A numeric argument to @{b}M-/@{ub} says to
take the second, third, etc. distinct expansion found looking backward
from point.  Repeating @{b}M-/@{ub} searches for an alternative expansion by
looking farther back.  After the part of the buffer preceding point has
been considered, the part of the buffer after point is searched.

   Dynamic abbrev expansion is completely independent of Abbrev mode;
the expansion of a word with @{b}M-/@{ub} is completely independent of whether it
has a definition as an ordinary abbrev.


@EndNode

@Node "Picture" "emacs/Picture"
@Next "Sending Mail"
@Prev "Abbrevs"
@Toc "Main"

Editing Pictures
****************

   If you want to create a picture made out of text characters (for
example, a picture of the division of a register into fields, as a
comment in a program), use the command @{b}edit-picture@{ub} to enter Picture
mode.

   In Picture mode, editing is based on the @{i}quarter-plane@{ui} model of
text, according to which the text characters lie studded on an area that
stretches infinitely far to the right and downward.  The concept of the
end of a line does not exist in this model; the most you can say is
where the last nonblank character on the line is found.

   Of course, Emacs really always considers text as a sequence of
characters, and lines really do have ends.  But in Picture mode most
frequently-used keys are rebound to commands that simulate the
quarter-plane model of text.  They do this by inserting spaces or by
converting tabs to spaces.

   Most of the basic editing commands of Emacs are redefined by Picture
mode to do essentially the same thing but in a quarter-plane way.  In
addition, Picture mode defines various keys starting with the @{b}C-c@{ub}
prefix to run special picture editing commands.

   One of these keys, @{b}C-c C-c@{ub}, is pretty important.  Often a picture is
part of a larger file that is usually edited in some other major mode.
@{b}M-x edit-picture@{ub} records the name of the previous major mode, and then
you can use the @{b}C-c C-c@{ub} command (@{b}picture-mode-exit@{ub}) to restore that
mode.  @{b}C-c C-c@{ub} also deletes spaces from the ends of lines, unless given
a numeric argument.

   The commands used in Picture mode all work in other modes (provided
the @{b}picture@{ub} library is loaded), but are not bound to keys except in
Picture mode.  Note that the descriptions below talk of moving "one
column" and so on, but all the picture mode commands handle numeric
arguments as their normal equivalents do.

   Turning on Picture mode calls the value of the variable
@{b}picture-mode-hook@{ub} as a function, with no arguments, if that value
exists and is non-@{b}nil@{ub}.


 @{" Basic Picture " Link "Basic Picture"}          Basic concepts and simple commands of Picture Mode.
 @{" Insert in Picture " Link "Insert in Picture"}      Controlling direction of cursor motion
                           after "self-inserting" characters.
 @{" Tabs in Picture " Link "Tabs in Picture"}        Various features for tab stops and indentation.
 @{" Rectangles in Picture " Link "Rectangles in Picture"}  Clearing and superimposing rectangles.


@EndNode

@Node "Basic Picture" "emacs/Basic Picture"
@Next "Insert in Picture"
@Prev "Picture"
@Toc "Picture"

Basic Editing in Picture Mode
=============================

   Most keys do the same thing in Picture mode that they usually do,
but do it in a quarter-plane style.  For example, @{b}C-f@{ub} is rebound to run
@{b}picture-forward-column@{ub}, which is defined to move point one column to
the right, by inserting a space if necessary, so that the actual end of
the line makes no difference.  @{b}C-b@{ub} is rebound to run
@{b}picture-backward-column@{ub}, which always moves point left one column,
converting a tab to multiple spaces if necessary.  @{b}C-n@{ub} and @{b}C-p@{ub} are
rebound to run @{b}picture-move-down@{ub} and @{b}picture-move-up@{ub}, which can either
insert spaces or convert tabs as necessary to make sure that point
stays in exactly the same column.  @{b}C-e@{ub} runs @{b}picture-end-of-line@{ub}, which
moves to after the last nonblank character on the line.  There is no
need to change @{b}C-a@{ub}, as the choice of screen model does not affect
beginnings of lines.

   Insertion of text is adapted to the quarter-plane screen model
through the use of Overwrite mode (see @{"Minor Modes" Link "Minor Modes"}).  Self-inserting
characters replace existing text, column by column, rather than pushing
existing text to the right.  RET runs @{b}picture-newline@{ub}, which just moves
to the beginning of the following line so that new text will replace
that line.

   Deletion and killing of text are replaced with erasure.  DEL
(@{b}picture-backward-clear-column@{ub}) replaces the preceding character
with a space rather than removing it.  @{b}C-d@{ub} (@{b}picture-clear-column@{ub}) does
the same thing in a forward direction.  @{b}C-k@{ub} (@{b}picture-clear-line@{ub}) really
kills the contents of lines, but does not ever remove the newlines from
the buffer.

   To do actual insertion, you must use special commands.  @{b}C-o@{ub}
(@{b}picture-open-line@{ub}) still creates a blank line, but does so after
the current line; it never splits a line.  @{b}C-M-o@{ub}, @{b}split-line@{ub}, makes
sense in Picture mode, so it is not changed.  LFD
(@{b}picture-duplicate-line@{ub}) inserts below the current line another line
with the same contents.

   Real deletion can be done with @{b}C-w@{ub}, or with @{b}C-c C-d@{ub} (which is
defined as @{b}delete-char@{ub}, as @{b}C-d@{ub} is in other modes), or with one of the
picture rectangle commands (see @{"Rectangles in Picture" Link "Rectangles in Picture"}).


@EndNode

@Node "Insert in Picture" "emacs/Insert in Picture"
@Next "Tabs in Picture"
@Prev "Basic Picture"
@Toc "Picture"

Controlling Motion after Insert
===============================

   Since "self-inserting" characters in Picture mode just overwrite and
move point, there is no essential restriction on how point should be
moved.  Normally point moves right, but you can specify any of the
eight orthogonal or diagonal directions for motion after a
"self-inserting" character.  This is useful for drawing lines in the
buffer.

@{b}C-c <@{ub}
     Move left after insertion (@{b}picture-movement-left@{ub}).

@{b}C-c >@{ub}
     Move right after insertion (@{b}picture-movement-right@{ub}).

@{b}C-c ^@{ub}
     Move up after insertion (@{b}picture-movement-up@{ub}).

@{b}C-c .@{ub}
     Move down after insertion (@{b}picture-movement-down@{ub}).

@{b}C-c `@{ub}
     Move up and left ("northwest") after insertion
     (@{b}picture-movement-nw@{ub}).

@{b}C-c '@{ub}
     Move up and right ("northeast") after insertion
     (@{b}picture-movement-ne@{ub}).

@{b}C-c /@{ub}
     Move down and left ("southwest") after insertion
     (@{b}picture-movement-sw@{ub}).

@{b}C-c \ @{ub}
     Move down and right ("southeast") after insertion
     (@{b}picture-movement-se@{ub}).

   Two motion commands move based on the current Picture insertion
direction.  The command @{b}C-c C-f@{ub} (@{b}picture-motion@{ub}) moves in the same
direction as motion after "insertion" currently does, while @{b}C-c C-b@{ub}
(@{b}picture-motion-reverse@{ub}) moves in the opposite direction.


@EndNode

@Node "Tabs in Picture" "emacs/Tabs in Picture"
@Next "Rectangles in Picture"
@Prev "Insert in Picture"
@Toc "Picture"

Picture Mode Tabs
=================

   Two kinds of tab-like action are provided in Picture mode.
Context-based tabbing is done with @{b}M-TAB@{ub} (@{b}picture-tab-search@{ub}).  With no
argument, it moves to a point underneath the next "interesting"
character that follows whitespace in the previous nonblank line.
"Next" here means "appearing at a horizontal position greater than the
one point starts out at".  With an argument, as in @{b}C-u M-TAB@{ub}, this
command moves to the next such interesting character in the current
line.  @{b}M-TAB@{ub} does not change the text; it only moves point.
"Interesting" characters are defined by the variable @{b}picture-tab-chars@{ub},
which contains a string whose characters are all considered
interesting.  Its default value is @{b}"!-~"@{ub}.

   TAB itself runs @{b}picture-tab@{ub}, which operates based on the current tab
stop settings; it is the Picture mode equivalent of @{b}tab-to-tab-stop@{ub}.
Normally it just moves point, but with a numeric argument it clears the
text that it moves over.

   The context-based and tab-stop-based forms of tabbing are brought
together by the command @{b}C-c TAB@{ub}, @{b}picture-set-tab-stops@{ub}.  This command
sets the tab stops to the positions which @{b}M-TAB@{ub} would consider
significant in the current line.  The use of this command, together
with TAB, can get the effect of context-based tabbing.  But @{b}M-TAB@{ub} is
more convenient in the cases where it is sufficient.


@EndNode

@Node "Rectangles in Picture" "emacs/Rectangles in Picture"
@Prev "Tabs in Picture"
@Toc "Picture"

Picture Mode Rectangle Commands
===============================

   Picture mode defines commands for working on rectangular pieces of
the text in ways that fit with the quarter-plane model.  The standard
rectangle commands may also be useful (see @{"Rectangles" Link "Rectangles"}).

@{b}C-c C-k@{ub}
     Clear out the region-rectangle (@{b}picture-clear-rectangle@{ub}).  With
     argument, kill it.

@{b}C-c C-w @{i}r@{ui}@{ub}
     Similar but save rectangle contents in register @{i}r@{ui} first
     (@{b}picture-clear-rectangle-to-register@{ub}).

@{b}C-c C-y@{ub}
     Copy last killed rectangle into the buffer by overwriting, with
     upper left corner at point (@{b}picture-yank-rectangle@{ub}).  With
     argument, insert instead.

@{b}C-c C-x @{i}r@{ui}@{ub}
     Similar, but use the rectangle in register @{i}r@{ui}
     (@{b}picture-yank-rectangle-from-register@{ub}).

   The picture rectangle commands @{b}C-c C-k@{ub} (@{b}picture-clear-rectangle@{ub}) and
@{b}C-c C-w@{ub} (@{b}picture-clear-rectangle-to-register@{ub}) differ from the standard
rectangle commands in that they normally clear the rectangle instead of
deleting it; this is analogous with the way @{b}C-d@{ub} is changed in Picture
mode.

   However, deletion of rectangles can be useful in Picture mode, so
these commands delete the rectangle if given a numeric argument.

   The Picture mode commands for yanking rectangles differ from the
standard ones in overwriting instead of inserting.  This is the same
way that Picture mode insertion of other text is different from other
modes.  @{b}C-c C-y@{ub} (@{b}picture-yank-rectangle@{ub}) inserts (by overwriting) the
rectangle that was most recently killed, while @{b}C-c C-x@{ub}
(@{b}picture-yank-rectangle-from-register@{ub}) does likewise for the
rectangle found in a specified register.


@EndNode

@Node "Sending Mail" "emacs/Sending Mail"
@Next "Rmail"
@Prev "Picture"
@Toc "Main"

Sending Mail
************

   To send a message in Emacs, you start by typing a command (@{b}C-x m@{ub}) to
select and initialize the @{b}*mail*@{ub} buffer.  Then you edit the text and
headers of the message in this buffer, and type another command (@{b}C-c
C-c@{ub}) to send the message.

@{b}C-x m@{ub}
     Begin composing a message to send (@{b}mail@{ub}).

@{b}C-x 4 m@{ub}
     Likewise, but display the message in another window
     (@{b}mail-other-window@{ub}).

@{b}C-c C-c@{ub}
     In Mail mode, send the message and switch to another buffer
     (@{b}mail-send-and-exit@{ub}).

   The command @{b}C-x m@{ub} (@{b}mail@{ub}) selects a buffer named @{b}*mail*@{ub} and
initializes it with the skeleton of an outgoing message.  @{b}C-x 4 m@{ub}
(@{b}mail-other-window@{ub}) selects the @{b}*mail*@{ub} buffer in a different
window, leaving the previous current buffer visible.

   Because the mail composition buffer is an ordinary Emacs buffer, you
can switch to other buffers while in the middle of composing mail, and
switch back later (or never).  If you use the @{b}C-x m@{ub} command again when
you have been composing another message but have not sent it, you are
asked to confirm before the old message is erased.  If you answer @{b}n@{ub}, the
@{b}*mail*@{ub} buffer is left selected with its old contents, so you can finish
the old message and send it.  @{b}C-u C-x m@{ub} is another way to do this.
Sending the message marks the @{b}*mail*@{ub} buffer "unmodified", which avoids
the need for confirmation when @{b}C-x m@{ub} is next used.

   If you are composing a message in the @{b}*mail*@{ub} buffer and want to send
another message before finishing the first, rename the @{b}*mail*@{ub} buffer
using @{b}M-x rename-buffer@{ub} (see @{"Misc Buffer" Link "Misc Buffer"}).


 @{" Format " Link "Mail Format"}                 Format of the mail being composed.
 @{" Headers " Link "Mail Headers"}                Details of allowed mail header fields.
 @{" Mode " Link "Mail Mode"}                   Special commands for editing mail being composed.


@EndNode

@Node "Mail Format" "emacs/Mail Format"
@Next "Mail Headers"
@Prev "Sending Mail"
@Toc "Sending Mail"

The Format of the Mail Buffer
=============================

   In addition to the @{i}text@{ui} or contents, a message has @{i}header fields@{ui}
which say who sent it, when, to whom, why, and so on.  Some header
fields such as the date and sender are created automatically after the
message is sent.  Others, such as the recipient names, must be
specified by you in order to send the message properly.

   Mail mode provides a few commands to help you edit some header
fields, and some are preinitialized in the buffer automatically at
times.  You can insert or edit any header fields using ordinary editing
commands.

   The line in the buffer that says

     --text follows this line--

is a special delimiter that separates the headers you have specified
from the text.  Whatever follows this line is the text of the message;
the headers precede it.  The delimiter line itself does not appear in
the message actually sent.  The text used for the delimiter line is
controlled by the variable @{b}mail-header-separator@{ub}.

   Here is an example of what the headers and text in the @{b}*mail*@{ub} buffer
might look like.

     To: rms@mc
     CC: mly@mc, rg@oz
     Subject: The Emacs Manual
     --Text follows this line--
     Please ignore this message.


@EndNode

@Node "Mail Headers" "emacs/Mail Headers"
@Next "Mail Mode"
@Prev "Mail Format"
@Toc "Sending Mail"

Mail Header Fields
==================

   There are several header fields you can use in the @{b}*mail*@{ub} buffer.
Each header field starts with a field name at the beginning of a line,
terminated by a colon.  It does not matter whether you use upper or
lower case in the field name.  After the colon and optional whitespace
comes the contents of the field.

@{b}To@{ub}
     This field contains the mailing addresses to which the message is
     addressed.

@{b}Subject@{ub}
     The contents of the @{b}Subject@{ub} field should be a piece of text that
     says what the message is about.  The reason @{b}Subject@{ub} fields are
     useful is that most mail-reading programs can provide a summary of
     messages, listing the subject of each message but not its text.

@{b}CC@{ub}
     This field contains additional mailing addresses to send the
     message to, but whose readers should not regard the message as
     addressed to them.

@{b}BCC@{ub}
     This field contains additional mailing addresses to send the
     message to, but which should not appear in the header of the
     message actually sent.

@{b}FCC@{ub}
     This field contains the name of one file (in Unix mail file
     format) to which a copy of the message should be appended when the
     message is sent.

@{b}From@{ub}
     Use the @{b}From@{ub} field to say who you are, when the account you are
     using to send the mail is not your own.  The contents of the @{b}From@{ub}
     field should be a valid mailing address, since replies will
     normally go there.

@{b}Reply-To@{ub}
     Use the @{b}Reply-to@{ub} field to direct replies to a different address,
     not your own.  There is no difference between @{b}From@{ub} and @{b}Reply-to@{ub} in
     their effect on where replies go, but they convey a different
     meaning to the human who reads the message.

     If you set the variable @{b}mail-default-reply-to@{ub} to a non-@{b}nil@{ub} value,
     then every message you begin to edit will have a @{b}Reply-to@{ub} field
     whose contents are the value of the variable.

@{b}In-Reply-To@{ub}
     This field contains a piece of text describing a message you are
     replying to.  Some mail systems can use this information to
     correlate related pieces of mail.  Normally this field is filled
     in by Rmail when you are replying to a message in Rmail, and you
     never need to think about it (see @{"Rmail" Link "Rmail"}).

   The @{b}To@{ub}, @{b}CC@{ub}, @{b}BCC@{ub} and @{b}FCC@{ub} fields can appear any number of times, to
specify many places to send the message.

   The @{b}To@{ub}, @{b}CC@{ub}, and @{b}BCC@{ub} fields can have continuation lines.  All the
lines starting with whitespace, following the line on which the field
starts, are considered part of the field.  For example,

     To: foo@here, this@there,
       me@gnu.cambridge.mass.usa.earth.spiral3281

   If you have a @{b}~/.mailrc@{ub} file, Emacs will scan it for mail aliases
the first time you try to send mail in an Emacs session.  Aliases found
in the @{b}To@{ub}, @{b}CC@{ub}, and @{b}BCC@{ub} fields will be expanded where appropriate.

   If the variable @{b}mail-archive-file-name@{ub} is non-@{b}nil@{ub}, it should be a
string naming a file; every time you start to edit a message to send,
an @{b}FCC@{ub} field will be put in for that file.  Unless you remove the @{b}FCC@{ub}
field, every message will be written into that file when it is sent.


@EndNode

@Node "Mail Mode" "emacs/Mail Mode"
@Prev "Mail Headers"
@Toc "Sending Mail"

Mail Mode
=========

   The major mode used in the @{b}*mail*@{ub} buffer is Mail mode, which is much
like Text mode except that various special commands are provided on the
@{b}C-c@{ub} prefix.  These commands all have to do specifically with editing or
sending the message.

@{b}C-c C-s@{ub}
     Send the message, and leave the @{b}*mail*@{ub} buffer selected (@{b}mail-send@{ub}).

@{b}C-c C-c@{ub}
     Send the message, and select some other buffer
     (@{b}mail-send-and-exit@{ub}).

@{b}C-c C-f C-t@{ub}
     Move to the @{b}To@{ub} header field, creating one if there is none
     (@{b}mail-to@{ub}).

@{b}C-c C-f C-s@{ub}
     Move to the @{b}Subject@{ub} header field, creating one if there is none
     (@{b}mail-subject@{ub}).

@{b}C-c C-f C-c@{ub}
     Move to the @{b}CC@{ub} header field, creating one if there is none
     (@{b}mail-cc@{ub}).

@{b}C-c C-w@{ub}
     Insert the file @{b}~/.signature@{ub} at the end of the message text
     (@{b}mail-signature@{ub}).

@{b}C-c C-y@{ub}
     Yank the selected message from Rmail (@{b}mail-yank-original@{ub}).  This
     command does nothing unless your command to start sending a
     message was issued with Rmail.

@{b}C-c C-q@{ub}
     Fill all paragraphs of yanked old messages, each individually
     (@{b}mail-fill-yanked-message@{ub}).

   There are two ways to send the message.  @{b}C-c C-s@{ub} (@{b}mail-send@{ub}) sends
the message and marks the @{b}*mail*@{ub} buffer unmodified, but leaves that
buffer selected so that you can modify the message (perhaps with new
recipients) and send it again.  @{b}C-c C-c@{ub} (@{b}mail-send-and-exit@{ub}) sends and
then deletes the window (if there is another window) or switches to
another buffer.  It puts the @{b}*mail*@{ub} buffer at the lowest priority for
automatic reselection, since you are finished with using it.  This is
the usual way to send the message.

   Mail mode provides some other special commands that are useful for
editing the headers and text of the message before you send it.  There
are three commands defined to move point to particular header fields,
all based on the prefix @{b}C-c C-f@{ub} (@{b}C-f@{ub} is for "field").  They are @{b}C-c C-f
C-t@{ub} (@{b}mail-to@{ub}) to move to the @{b}To@{ub} field, @{b}C-c C-f C-s@{ub} (@{b}mail-subject@{ub}) for
the @{b}Subject@{ub} field, and @{b}C-c C-f C-c@{ub} (@{b}mail-cc@{ub}) for the @{b}CC@{ub} field.  These
fields have special motion commands because they are the most common
fields for the user to want to edit.

   @{b}C-c C-w@{ub} (@{b}mail-signature@{ub}) adds a standard piece text at the end of the
message to say more about who you are.  The text comes from the file
@{b}.signature@{ub} in your home directory.

   When mail sending is invoked from the Rmail mail reader using an
Rmail command, @{b}C-c C-y@{ub} can be used inside the @{b}*mail*@{ub} buffer to insert
the text of the message you are replying to.  Normally it indents each
line of that message four spaces and eliminates most header fields.  A
numeric argument specifies the number of spaces to indent.  An argument
of just @{b}C-u@{ub} says not to indent at all and not to eliminate anything.
@{b}C-c C-y@{ub} always uses the current message from the @{b}RMAIL@{ub} buffer, so you
can insert several old messages by selecting one in @{b}RMAIL@{ub}, switching to
@{b}*mail*@{ub} and yanking it, then switching back to @{b}RMAIL@{ub} to select another.

   After using @{b}C-c C-y@{ub}, you can type the command @{b}C-c C-q@{ub}
(@{b}mail-fill-yanked-message@{ub}) to fill the paragraphs of the yanked old
message or messages.  One use of @{b}C-c C-q@{ub} fills all such paragraphs,
each one separately.

   Turning on Mail mode (which @{b}C-x m@{ub} does automatically) calls the
value of @{b}text-mode-hook@{ub}, if it is not void or @{b}nil@{ub}, and then calls the
value of @{b}mail-mode-hook@{ub} if that is not void or @{b}nil@{ub}.  Aside from these,
the @{b}mail@{ub} command runs @{b}mail-setup-hook@{ub} whenever it initializes the
@{b}*mail*@{ub} buffer for editing a message.


@EndNode

@Node "Rmail" "emacs/Rmail"
@Next "Recursive Edit"
@Prev "Sending Mail"
@Toc "Main"

Reading Mail with Rmail
***********************

   Rmail is an Emacs subsystem for reading and disposing of mail that
you receive.  Rmail stores mail messages in files called @{i}Rmail files@{ui}.
Reading the message in an Rmail file is done in a special major mode,
Rmail mode, which redefines most letters to run commands for managing
mail.  To enter Rmail, type @{b}M-x rmail@{ub}.  This reads your primary mail
file, merges new mail in from your inboxes, displays the first new
message, and lets you begin reading.

   Using Rmail in the simplest fashion, you have one Rmail file,
@{b}~/RMAIL@{ub}, in which all of your mail is saved.  It is called your
@{i}primary mail file@{ui}.  In more sophisticated usage, you can copy messages
into other Rmail files and then edit those files with Rmail.

   Rmail displays only one message at a time.  It is called the @{i}current
message@{ui}.  Rmail mode's special commands can do such things as move to
another message, delete the message, copy the message into another
file, or send a reply.

   Within the Rmail file, messages are arranged sequentially in order
of receipt.  They are also assigned consecutive integers as their
@{i}message numbers@{ui}.  The number of the current message is displayed in
Rmail's mode line, followed by the total number of messages in the
file.  You can move to a message by specifying its message number using
the @{b}j@{ub} key (see @{"Rmail Motion" Link "Rmail Motion"}).

   Following the usual conventions of Emacs, changes in an Rmail file
become permanent only when the file is saved.  You can do this with @{b}s@{ub}
(@{b}rmail-save@{ub}), which also expunges deleted messages from the file
first (see @{"Rmail Deletion" Link "Rmail Deletion"}).  To save the file without expunging, use
@{b}C-x C-s@{ub}.  Rmail saves the Rmail file spontaneously when moving new mail
from an inbox file (see @{"Rmail Inbox" Link "Rmail Inbox"}).

   You can exit Rmail with @{b}q@{ub} (@{b}rmail-quit@{ub}); this expunges and saves the
Rmail file and then switches to another buffer.  But there is no need to
`exit' formally.  If you switch from Rmail to editing in other buffers,
and never happen to switch back, you have exited.  Just make sure to save the
Rmail file eventually (like any other file you have changed).  @{b}C-x s@{ub} is
a good enough way to do this (see @{"Saving" Link "Saving"}).


 @{" Scroll " Link "Rmail Scrolling"}                    Scrolling through a message.
 @{" Motion " Link "Rmail Motion"}                    Moving to another message.
 @{" Deletion " Link "Rmail Deletion"}                  Deleting and expunging messages.
 @{" Inbox " Link "Rmail Inbox"}                     How mail gets into the Rmail file.
 @{" Files " Link "Rmail Files"}                     Using multiple Rmail files.
 @{" Output " Link "Rmail Output"}              	     Copying message out to files.
 @{" Labels " Link "Rmail Labels"}                    Classifying messages by labeling them.
 @{" Summary " Link "Rmail Summary"}                   Summaries show brief info on many messages.
 @{" Reply " Link "Rmail Reply"}                     Sending replies to messages you are viewing.
 @{" Editing " Link "Rmail Editing"}                   Editing message text and headers in Rmail.
 @{" Digest " Link "Rmail Digest"}                    Extracting the messages from a digest message.


@EndNode

@Node "Rmail Scrolling" "emacs/Rmail Scrolling"
@Next "Rmail Motion"
@Prev "Rmail"
@Toc "Rmail"

Scrolling Within a Message
==========================

   When Rmail displays a message that does not fit on the screen, it is
necessary to scroll through it.  This could be done with @{b}C-v@{ub}, @{b}M-v@{ub} and
@{b}M-<@{ub}, but in Rmail scrolling is so frequent that it deserves to be
easier to type.

@{b}SPC@{ub}
     Scroll forward (@{b}scroll-up@{ub}).

@{b}DEL@{ub}
     Scroll backward (@{b}scroll-down@{ub}).

@{b}.@{ub}
     Scroll to start of message (@{b}rmail-beginning-of-message@{ub}).

   Since the most common thing to do while reading a message is to
scroll through it by screenfuls, Rmail makes SPC and DEL synonyms of
@{b}C-v@{ub} (@{b}scroll-up@{ub}) and @{b}M-v@{ub} (@{b}scroll-down@{ub}).

   The command @{b}.@{ub} (@{b}rmail-beginning-of-message@{ub}) scrolls back to the
beginning of the selected message.  This is not quite the same as @{b}M-<@{ub}:
for one thing, it does not set the mark; for another, it resets the
buffer boundaries to the current message if you have changed them.


@EndNode

@Node "Rmail Motion" "emacs/Rmail Motion"
@Next "Rmail Deletion"
@Prev "Rmail Scrolling"
@Toc "Rmail"

Moving Among Messages
=====================

   The most basic thing to do with a message is to read it.  The way to
do this in Rmail is to make the message current.  You can make any
message current given its message number using the @{b}j@{ub} command, but the
usual thing to do is to move sequentially through the file, since this
is the order of receipt of messages.  When you enter Rmail, you are
positioned at the first new message (new messages are those received
since the previous use of Rmail), or at the last message if there are
no new messages this time.  Move forward to see the other new messages;
move backward to reexamine old messages.

@{b}n@{ub}
     Move to the next nondeleted message, skipping any intervening
     deleted messages (@{b}rmail-next-undeleted-message@{ub}).

@{b}p@{ub}
     Move to the previous nondeleted message
     (@{b}rmail-previous-undeleted-message@{ub}).

@{b}M-n@{ub}
     Move to the next message, including deleted messages
     (@{b}rmail-next-message@{ub}).

@{b}M-p@{ub}
     Move to the previous message, including deleted messages
     (@{b}rmail-previous-message@{ub}).

@{b}j@{ub}
     Move to the first message.  With argument @{i}n@{ui}, move to message
     number @{i}n@{ui} (@{b}rmail-show-message@{ub}).

@{b}>@{ub}
     Move to the last message (@{b}rmail-last-message@{ub}).

@{b}M-s @{i}regexp@{ui} RET@{ub}
     Move to the next message containing a match for @{i}regexp@{ui}
     (@{b}rmail-search@{ub}).  If @{i}regexp@{ui} is empty, the last regexp used is
     used again.

@{b}- M-s @{i}regexp@{ui} RET@{ub}
     Move to the previous message containing a match for @{i}regexp@{ui}.  If
     @{i}regexp@{ui} is empty, the last regexp used is used again.

   @{b}n@{ub} and @{b}p@{ub} are the usual way of moving among messages in Rmail.  They
move through the messages sequentially, but skip over deleted messages,
which is usually what you want to do.  Their command definitions are
named @{b}rmail-next-undeleted-message@{ub} and
@{b}rmail-previous-undeleted-message@{ub}.  If you do not want to skip
deleted messages--for example, if you want to move to a message to
undelete it--use the variants @{b}M-n@{ub} and @{b}M-p@{ub} (@{b}rmail-next-message@{ub} and
@{b}rmail-previous-message@{ub}).  A numeric argument to any of these commands
serves as a repeat count.

   In Rmail, you can specify a numeric argument by typing the digits.
It is not necessary to type @{b}C-u@{ub} first.

   The @{b}M-s@{ub} (@{b}rmail-search@{ub}) command is Rmail's version of search.  The
usual incremental search command @{b}C-s@{ub} works in Rmail, but it searches
only within the current message.  The purpose of @{b}M-s@{ub} is to search for
another message.  It reads a regular expression (see @{"Regexps" Link "Regexps"})
nonincrementally, then searches starting at the beginning of the
following message for a match.  The message containing the match is
selected.

   To search backward in the file for another message, give @{b}M-s@{ub} a
negative argument.  In Rmail this can be done with @{b}- M-s@{ub}.

   It is also possible to search for a message based on labels.  See
@{"Rmail Labels" Link "Rmail Labels"}.

   To move to a message specified by absolute message number, use @{b}j@{ub}
(@{b}rmail-show-message@{ub}) with the message number as argument.  With no
argument, @{b}j@{ub} selects the first message.  @{b}>@{ub} (@{b}rmail-last-message@{ub}) selects
the last message.

   Each time Rmail selects a message, it calls (with no arguments) the
value of the variable @{b}rmail-show-message-hook@{ub}, if that is non-@{b}nil@{ub}.


@EndNode

@Node "Rmail Deletion" "emacs/Rmail Deletion"
@Next "Rmail Inbox"
@Prev "Rmail Motion"
@Toc "Rmail"

Deleting Messages
=================

   When you no longer need to keep a message, you can @{i}delete@{ui} it.  This
flags it as ignorable, and some Rmail commands will pretend it is no
longer present; but it still has its place in the Rmail file, and still
has its message number.

   @{i}Expunging@{ui} the Rmail file actually removes the deleted messages.  The
remaining messages are renumbered consecutively.  Expunging is the only
action that changes the message number of any message, except for
undigestifying (see @{"Rmail Digest" Link "Rmail Digest"}).

@{b}d@{ub}
     Delete the current message, and move to the next nondeleted message
     (@{b}rmail-delete-forward@{ub}).

@{b}C-d@{ub}
     Delete the current message, and move to the previous nondeleted
     message (@{b}rmail-delete-backward@{ub}).

@{b}u@{ub}
     Undelete the current message, or move back to a deleted message and
     undelete it (@{b}rmail-undelete-previous-message@{ub}).

@{b}x@{ub}
@{b}e@{ub}
     Expunge the Rmail file (@{b}rmail-expunge@{ub}).  These two commands are
     synonyms.

   There are two Rmail commands for deleting messages.  Both delete the
current message and select another message.  @{b}d@{ub} (@{b}rmail-delete-forward@{ub})
moves to the following message, skipping messages already deleted, while
@{b}C-d@{ub} (@{b}rmail-delete-backward@{ub}) moves to the previous nondeleted message.
If there is no nondeleted message to move to in the specified direction,
the message that was just deleted remains current.

   To make all the deleted messages finally vanish from the Rmail file,
type @{b}e@{ub} (@{b}rmail-expunge@{ub}).  Until you do this, you can still @{i}undelete@{ui} the
deleted messages.

   To undelete, type @{b}u@{ub} (@{b}rmail-undelete-previous-message@{ub}), which is
designed to cancel the effect of a @{b}d@{ub} command (usually).  It undeletes
the current message if the current message is deleted.  Otherwise it
moves backward to previous messages until a deleted message is found,
and undeletes that message.

   You can usually undo a @{b}d@{ub} with a @{b}u@{ub} because the @{b}u@{ub} moves back to and
undeletes the message that the @{b}d@{ub} deleted.  But this does not work when
the @{b}d@{ub} skips a few already-deleted messages that follow the message
being deleted; then the @{b}u@{ub} command will undelete the last of the
messages that were skipped.  There is no clean way to avoid this
problem.  However, by repeating the @{b}u@{ub} command, you can eventually get
back to the message that you intended to undelete.  You can also reach
that message with @{b}M-p@{ub} commands and then type @{b}u@{ub}.

   A deleted message has the @{b}deleted@{ub} attribute, and as a result @{b}deleted@{ub}
appears in the mode line when the current message is deleted.  In fact,
deleting or undeleting a message is nothing more than adding or
removing this attribute.  See @{"Rmail Labels" Link "Rmail Labels"}.


@EndNode

@Node "Rmail Inbox" "emacs/Rmail Inbox"
@Next "Rmail Files"
@Prev "Rmail Deletion"
@Toc "Rmail"

Rmail Files and Inboxes
=======================

   Unix places incoming mail for you in a file that we call your @{i}inbox@{ui}.
When you start up Rmail, it copies the new messages from your inbox into
your primary mail file, an Rmail file, which also contains other
messages saved from previous Rmail sessions.  It is in this file that
you actually read the mail with Rmail.  This operation is called
@{i}getting new mail@{ui}.  It can be repeated at any time using the @{b}g@{ub} key in
Rmail.  The inbox file name is @{b}/usr/spool/mail/@{i}username@{ui}@{ub} in Berkeley
Unix, @{b}/usr/mail/@{i}username@{ui}@{ub} in System V.

   There are two reasons for having separate Rmail files and inboxes.

  1. The format in which Unix delivers the mail in the inbox is not
     adequate for Rmail mail storage.  It has no way to record
     attributes (such as @{b}deleted@{ub}) or user-specified labels; it has no
     way to record old headers and reformatted headers; it has no way
     to record cached summary line information.

  2. It is very cumbersome to access an inbox file without danger of
     losing mail, because it is necessary to interlock with mail
     delivery.  Moreover, different Unix systems use different
     interlocking techniques.  The strategy of moving mail out of the
     inbox once and for all into a separate Rmail file avoids the need
     for interlocking in all the rest of Rmail, since only Rmail
     operates on the Rmail file.

   When getting new mail, Rmail first copies the new mail from the inbox
file to the Rmail file; then it saves the Rmail file; then it deletes
the inbox file.  This way, a system crash may cause duplication of mail
between the inbox and the Rmail file, but cannot lose mail.

   Copying mail from an inbox in the system's mailer directory actually
puts it in an intermediate file @{b}~/.newmail@{ub}.  This is because the
interlocking is done by a C program that copies to another file.
@{b}~/.newmail@{ub} is deleted after mail merging is successful.  If there is a
crash at the wrong time, this file will continue to exist and will be
used as an inbox the next time you get new mail.


@EndNode

@Node "Rmail Files" "emacs/Rmail Files"
@Next "Rmail Output"
@Prev "Rmail Inbox"
@Toc "Rmail"

Multiple Mail Files
===================

   Rmail operates by default on your @{i}primary mail file@{ui}, which is named
@{b}~/RMAIL@{ub} and receives your incoming mail from your system inbox file.
But you can also have other mail files and edit them with Rmail.  These
files can receive mail through their own inboxes, or you can move
messages into them by explicit command in Rmail (see @{"Rmail Output" Link "Rmail Output"}).

@{b}i @{i}file@{ui} RET@{ub}
     Read @{i}file@{ui} into Emacs and run Rmail on it (@{b}rmail-input@{ub}).

@{b}M-x set-rmail-inbox-list RET @{i}files@{ui} RET@{ub}
     Specify inbox file names for current Rmail file to get mail from.

@{b}g@{ub}
     Merge new mail from current Rmail file's inboxes
     (@{b}rmail-get-new-mail@{ub}).

@{b}C-u g @{i}file@{ui}@{ub}
     Merge new mail from inbox file @{i}file@{ui}.

   To run Rmail on a file other than your primary mail file, you may
use the @{b}i@{ub} (@{b}rmail-input@{ub}) command in Rmail.  This visits the file, puts
it in Rmail mode, and then gets new mail from the file's inboxes if any.
You can also use @{b}M-x rmail-input@{ub} even when not in Rmail.

   The file you read with @{b}i@{ub} does not have to be in Rmail file format.
It could also be Unix mail format, or @{b}mmdf@{ub} format; or it could be a
mixture of all three, as long as each message belongs to one of the
three formats.  Rmail recognizes all three and converts all the
messages to proper Rmail format before showing you the file.

   Each Rmail file can contain a list of inbox file names; you can
specify this list with @{b}M-x set-rmail-inbox-list RET @{i}files@{ui} RET@{ub}.  The
argument can contain any number of file names, separated by commas.  It
can also be empty, which specifies that this file should have no
inboxes.  Once a list of inboxes is specified, the Rmail file remembers
it permanently until it is explicitly changed.

   If an Rmail file has inboxes, new mail is merged in from the inboxes
when the Rmail file is brought into Rmail, and when the @{b}g@{ub}
(@{b}rmail-get-new-mail@{ub}) command is used.  If the Rmail file specifies
no inboxes, then no new mail is merged in at these times.  A special
exception is made for your primary mail file in using the standard
system inbox for it if it does not specify any.

   To merge mail from a file that is not the usual inbox, give the @{b}g@{ub}
key a numeric argument, as in @{b}C-u g@{ub}.  Then it reads a file name and
merges mail from that file.  The inbox file is not deleted or changed in
any way when @{b}g@{ub} with an argument is used.  This is, therefore, a general
way of merging one file of messages into another.


@EndNode

@Node "Rmail Output" "emacs/Rmail Output"
@Next "Rmail Labels"
@Prev "Rmail Files"
@Toc "Rmail"

Copying Messages Out to Files
=============================

@{b}o @{i}file@{ui} RET@{ub}
     Append a copy of the current message to the file @{i}file@{ui}, writing it
     in Rmail file format (@{b}rmail-output-to-rmail-file@{ub}).

@{b}C-o @{i}file@{ui} RET@{ub}
     Append a copy of the current message to the file @{i}file@{ui}, writing it
     in Unix mail file format (@{b}rmail-output@{ub}).

   If an Rmail file has no inboxes, how does it get anything in it?  By
explicit @{b}o@{ub} commands.

   @{b}o@{ub} (@{b}rmail-output-to-rmail-file@{ub}) appends the current message in Rmail
format to the end of the specified file.  This is the best command to
use to move messages between Rmail files.  If the other Rmail file is
currently visited, the copying is done into the other file's Emacs
buffer instead.  You should eventually save it on disk.

   The @{b}C-o@{ub} (@{b}rmail-output@{ub}) command in Rmail appends a copy of the current
message to a specified file, in Unix mail file format.  This is useful
for moving messages into files to be read by other mail processors that
do not understand Rmail format.

   Copying a message with @{b}o@{ub} or @{b}C-o@{ub} gives the original copy of the
message the @{b}filed@{ub} attribute, so that @{b}filed@{ub} appears in the mode line
when such a message is current.

   Normally you should use only @{b}o@{ub} to output messages to other Rmail
files, never @{b}C-o@{ub}.  But it is also safe if you always use @{b}C-o@{ub}, never @{b}o@{ub}.
When a file is visited in Rmail, the last message is checked, and if it
is in Unix format, the entire file is scanned and all Unix-format
messages are converted to Rmail format.  (The reason for checking the
last message is that scanning the file is slow and most Rmail files
have only Rmail format messages.)  If you use @{b}C-o@{ub} consistently, the
last message is sure to be in Unix format, so Rmail will convert all
messages properly.

   The case where you might want to use @{b}C-o@{ub} always, instead of @{b}o@{ub}
always, is when you or other users want to append mail to the same file
from other mail processors.  Other mail processors probably do not know
Rmail format but do know Unix format.

   In any case, always use @{b}o@{ub} to add to an Rmail file that is being
visited in Rmail.  Adding messages with @{b}C-o@{ub} to the actual disk file
will trigger a "simultaneous editing" warning when you ask to save the
Emacs buffer, and will be lost if you do save.


@EndNode

@Node "Rmail Labels" "emacs/Rmail Labels"
@Next "Rmail Summary"
@Prev "Rmail Output"
@Toc "Rmail"

Labels
======

   Each message can have various @{i}labels@{ui} assigned to it as a means of
classification.  A label has a name; different names mean different
labels.  Any given label is either present or absent on a particular
message.  A few label names have standard meanings and are given to
messages automatically by Rmail when appropriate; these special labels
are called @{i}attributes@{ui}.  All other labels are assigned by the user.

@{b}a @{i}label@{ui} RET@{ub}
     Assign the label @{i}label@{ui} to the current message (@{b}rmail-add-label@{ub}).

@{b}k @{i}label@{ui} RET@{ub}
     Remove the label @{i}label@{ui} from the current message (@{b}rmail-kill-label@{ub}).

@{b}C-M-n @{i}labels@{ui} RET@{ub}
     Move to the next message that has one of the labels @{i}labels@{ui}
     (@{b}rmail-next-labeled-message@{ub}).

@{b}C-M-p @{i}labels@{ui} RET@{ub}
     Move to the previous message that has one of the labels @{i}labels@{ui}
     (@{b}rmail-previous-labeled-message@{ub}).

@{b}C-M-l @{i}labels@{ui} RET@{ub}
     Make a summary of all messages containing any of the labels @{i}labels@{ui}
     (@{b}rmail-summary-by-labels@{ub}).

Specifying an empty string for one these commands means to use the last
label specified for any of these commands.

   The @{b}a@{ub} (@{b}rmail-add-label@{ub}) and @{b}k@{ub} (@{b}rmail-kill-label@{ub}) commands allow you
to assign or remove any label on the current message.  If the @{i}label@{ui}
argument is empty, it means to assign or remove the same label most
recently assigned or removed.

   Once you have given messages labels to classify them as you wish,
there are two ways to use the labels: in moving and in summaries.

   The command @{b}C-M-n @{i}labels@{ui} RET@{ub} (@{b}rmail-next-labeled-message@{ub}) moves to
the next message that has one of the labels @{i}labels@{ui}.  @{i}labels@{ui} is one or
more label names, separated by commas.  @{b}C-M-p@{ub}
(@{b}rmail-previous-labeled-message@{ub}) is similar, but moves backwards to
previous messages.  A preceding numeric argument to either one serves
as a repeat count.

   The command @{b}C-M-l @{i}labels@{ui} RET@{ub} (@{b}rmail-summary-by-labels@{ub}) displays a
summary containing only the messages that have at least one of a
specified set of messages.  The argument @{i}labels@{ui} is one or more label
names, separated by commas.  See @{"Rmail Summary" Link "Rmail Summary"}, for information on
summaries.

   If the @{i}labels@{ui} argument to @{b}C-M-n@{ub}, @{b}C-M-p@{ub} or @{b}C-M-l@{ub} is empty, it means
to use the last set of labels specified for any of these commands.

   Some labels such as @{b}deleted@{ub} and @{b}filed@{ub} have built-in meanings and are
assigned to or removed from messages automatically at appropriate
times; these labels are called @{i}attributes@{ui}.  Here is a list of Rmail
attributes:

@{b}unseen@{ub}
     Means the message has never been current.  Assigned to messages
     when they come from an inbox file, and removed when a message is
     made current.

@{b}deleted@{ub}
     Means the message is deleted.  Assigned by deletion commands and
     removed by undeletion commands (see @{"Rmail Deletion" Link "Rmail Deletion"}).

@{b}filed@{ub}
     Means the message has been copied to some other file.  Assigned by
     the file output commands (see @{"Rmail Files" Link "Rmail Files"}).

@{b}answered@{ub}
     Means you have mailed an answer to the message.  Assigned by the @{b}r@{ub}
     command (@{b}rmail-reply@{ub}).  See @{"Rmail Reply" Link "Rmail Reply"}.

@{b}forwarded@{ub}
     Means you have forwarded the message to other users.  Assigned by
     the @{b}f@{ub} command (@{b}rmail-forward@{ub}).  See @{"Rmail Reply" Link "Rmail Reply"}.

@{b}edited@{ub}
     Means you have edited the text of the message within Rmail.  See
     @{"Rmail Editing" Link "Rmail Editing"}.

   All other labels are assigned or removed only by the user, and it is
up to the user to decide what they mean.


@EndNode

@Node "Rmail Summary" "emacs/Rmail Summary"
@Next "Rmail Reply"
@Prev "Rmail Labels"
@Toc "Rmail"

Summaries
=========

   A @{i}summary@{ui} is a buffer containing one line per message that Rmail can
make and display to give you an overview of the mail in an Rmail file.
Each line shows the message number, the sender, the labels, and the
subject.  When the summary buffer is selected, various commands can be
used to select messages by moving in the summary buffer, or delete or
undelete messages.

   A summary buffer applies to a single Rmail file only; if you are
editing multiple Rmail files, they have separate summary buffers.  The
summary buffer name is made by appending @{b}-summary@{ub} to the Rmail buffer's
name.  Only one summary buffer will be displayed at a time unless you
make several windows and select the summary buffers by hand.


 @{" Rmail Make Summary " Link "Rmail Make Summary"}   Making various sorts of summaries.
 @{" Rmail Summary Edit " Link "Rmail Summary Edit"}   Manipulating messages from the summary.


@EndNode

@Node "Rmail Make Summary" "emacs/Rmail Make Summary"
@Next "Rmail Summary Edit"
@Prev "Rmail Summary"
@Toc "Rmail Summary"

Making Summaries
----------------

   Here are the commands to create a summary for the current Rmail file.
Summaries do not update automatically; to make an updated summary, you
must use one of these commands again.

@{b}h@{ub}
@{b}C-M-h@{ub}
     Summarize all messages (@{b}rmail-summary@{ub}).

@{b}l @{i}labels@{ui} RET@{ub}
@{b}C-M-l @{i}labels@{ui} RET@{ub}
     Summarize message that have one or more of the specified labels
     (@{b}rmail-summary-by-labels@{ub}).

@{b}C-M-r @{i}rcpts@{ui} RET@{ub}
     Summarize messages that have one or more of the specified
     recipients (@{b}rmail-summary-by-recipients@{ub}).

   The @{b}h@{ub} or @{b}C-M-h@{ub} (@{b}rmail-summary@{ub}) command fills the summary buffer for
the current Rmail file with a summary of all the messages in the file.
It then displays and selects the summary buffer in another window.

   @{b}C-M-l @{i}labels@{ui} RET@{ub} (@{b}rmail-summary-by-labels@{ub}) makes a partial summary
mentioning only the messages that have one or more of the labels
@{i}labels@{ui}.  @{i}labels@{ui} should contain label names separated by commas.

   @{b}C-M-r @{i}rcpts@{ui} RET@{ub} (@{b}rmail-summary-by-recipients@{ub}) makes a partial
summary mentioning only the messages that have one or more of the
recipients @{i}rcpts@{ui}.  @{i}rcpts@{ui} should contain mailing addresses separated by
commas.

   Note that there is only one summary buffer for any Rmail file;
making one kind of summary discards any previously made summary.


@EndNode

@Node "Rmail Summary Edit" "emacs/Rmail Summary Edit"
@Prev "Rmail Make Summary"
@Toc "Rmail Summary"

Editing in Summaries
--------------------

   Summary buffers are given the major mode Rmail Summary mode, which
provides the following special commands:

@{b}j@{ub}
     Select the message described by the line that point is on
     (@{b}rmail-summary-goto-msg@{ub}).

@{b}C-n@{ub}
     Move to next line and select its message in Rmail
     (@{b}rmail-summary-next-all@{ub}).

@{b}C-p@{ub}
     Move to previous line and select its message
     (@{b}rmail-summary-previous-all@{ub}).

@{b}n@{ub}
     Move to next line, skipping lines saying `deleted', and select its
     message (@{b}rmail-summary-next-msg@{ub}).

@{b}p@{ub}
     Move to previous line, skipping lines saying `deleted', and select
     its message (@{b}rmail-summary-previous-msg@{ub}).

@{b}d@{ub}
     Delete the current line's message, then do like @{b}n@{ub}
     (@{b}rmail-summary-delete-forward@{ub}).

@{b}u@{ub}
     Undelete and select this message or the previous deleted message in
     the summary (@{b}rmail-summary-undelete@{ub}).

@{b}SPC@{ub}
     Scroll the other window (presumably Rmail) forward
     (@{b}rmail-summary-scroll-msg-up@{ub}).

@{b}DEL@{ub}
     Scroll the other window backward (@{b}rmail-summary-scroll-msg-down@{ub}).

@{b}x@{ub}
     Kill the summary window (@{b}rmail-summary-exit@{ub}).

@{b}q@{ub}
     Exit Rmail (@{b}rmail-summary-quit@{ub}).

   The keys @{b}C-n@{ub} and @{b}C-p@{ub} are modified in Rmail Summary mode so that in
addition to moving point in the summary buffer they also cause the
line's message to become current in the associated Rmail buffer.  That
buffer is also made visible in another window if it is not already so.

   @{b}n@{ub} and @{b}p@{ub} are similar to @{b}C-n@{ub} and @{b}C-p@{ub}, but skip lines that say `message
deleted'.  They are like the @{b}n@{ub} and @{b}p@{ub} keys of Rmail itself.  Note,
however, that in a partial summary these commands move only among the
message listed in the summary.

   The other Emacs cursor motion commands are not changed in Rmail
Summary mode, so it is easy to get the point on a line whose message is
not selected in Rmail.  This can also happen if you switch to the Rmail
window and switch messages there.  To get the Rmail buffer back in sync
with the summary, use the @{b}j@{ub} (@{b}rmail-summary-goto-msg@{ub}) command, which
selects in Rmail the message of the current summary line.

   Deletion and undeletion can also be done from the summary buffer.
They always work based on where point is located in the summary buffer,
ignoring which message is selected in Rmail.  @{b}d@{ub}
(@{b}rmail-summary-delete-forward@{ub}) deletes the current line's message,
then moves to the next line whose message is not deleted and selects
that message.  The inverse of this is @{b}u@{ub} (@{b}rmail-summary-undelete@{ub}), which
moves back (if necessary) to a line whose message is deleted, undeletes
that message, and selects it in Rmail.

   When moving through messages with the summary buffer, it is
convenient to be able to scroll the message while remaining in the
summary window.  The commands SPC (@{b}rmail-summary-scroll-msg-up@{ub}) and DEL
(@{b}rmail-summary-scroll-msg-down@{ub}) do this.  They scroll the message just
as those same keys do when the Rmail buffer is selected.

   When you are finished using the summary, type @{b}x@{ub} (@{b}rmail-summary-exit@{ub})
to kill the summary buffer's window.

   You can also exit Rmail while in the summary.  @{b}q@{ub} (@{b}rmail-summary-quit@{ub})
kills the summary window, then saves the Rmail file and switches to
another buffer.


@EndNode

@Node "Rmail Reply" "emacs/Rmail Reply"
@Next "Rmail Editing"
@Prev "Rmail Summary"
@Toc "Rmail"

Sending Replies
===============

   Rmail has several commands that use Mail mode to send outgoing mail.
See @{"Sending Mail" Link "Sending Mail"}, for information on using Mail mode.  What are
documented here are the special commands of Rmail for entering Mail
mode.  Note that the usual keys for sending mail, @{b}C-x m@{ub} and @{b}C-x 4 m@{ub},
are available in Rmail mode and work just as they usually do.

@{b}m@{ub}
     Send a message (@{b}rmail-mail@{ub}).

@{b}c@{ub}
     Continue editing already started outgoing message (@{b}rmail-continue@{ub}).

@{b}r@{ub}
     Send a reply to the current Rmail message (@{b}rmail-reply@{ub}).

@{b}f@{ub}
     Forward current message to other users (@{b}rmail-forward@{ub}).

   The most common reason to send a message while in Rmail is to reply
to the message you are reading.  To do this, type @{b}r@{ub} (@{b}rmail-reply@{ub}).
This displays the @{b}*mail*@{ub} buffer in another window, much like @{b}C-x 4 m@{ub},
but preinitializes the @{b}Subject@{ub}, @{b}To@{ub}, @{b}CC@{ub} and @{b}In-reply-to@{ub} header fields
based on the message being replied to.  The @{b}To@{ub} field is given the
sender of that message, and the @{b}CC@{ub} gets all the recipients of that
message (but recipients that match elements of the list
@{b}rmail-dont-reply-to@{ub} are omitted; by default, this list contains your
own mailing address).

   If you don't want to include the other recipients in the @{b}cc@{ub} field,
you can use a prefix argument to the @{b}r@{ub} command.  In Rmail, you can do
this with @{b}1 r@{ub}.

   Once you have initialized the @{b}*mail*@{ub} buffer this way, sending the
mail goes as usual (see @{"Sending Mail" Link "Sending Mail"}).  You can edit the presupplied
header fields if they are not right for you.

   One additional Mail mode command is available when mailing is invoked
from Rmail: @{b}C-c C-y@{ub} (@{b}mail-yank-original@{ub}) inserts into the outgoing
message a copy of the current Rmail message; normally this is the
message you are replying to, but you can also switch to the Rmail
buffer, select a different message, switch back, and yank new current
message.  Normally the yanked message is indented four spaces and has
most header fields deleted from it; an argument to @{b}C-c C-y@{ub} specifies
the amount to indent, and @{b}C-u C-c C-y@{ub} does not indent at all and does
not delete any header fields.

   Another frequent reason to send mail in Rmail is to forward the
current message to other users.  @{b}f@{ub} (@{b}rmail-forward@{ub}) makes this easy by
preinitializing the @{b}*mail*@{ub} buffer with the current message as the text,
and a subject designating a forwarded message.  All you have to do is
fill in the recipients and send.

   The @{b}m@{ub} (@{b}rmail-mail@{ub}) command is used to start editing an outgoing
message that is not a reply.  It leaves the header fields empty.  Its
only difference from @{b}C-x 4 m@{ub} is that it makes the Rmail buffer
accessible for @{b}C-c y@{ub}, just as @{b}r@{ub} does.  Thus, @{b}m@{ub} can be used to reply to
or forward a message; it can do anything @{b}r@{ub} or @{b}f@{ub} can do.

   The @{b}c@{ub} (@{b}rmail-continue@{ub}) command resumes editing the @{b}*mail*@{ub} buffer, to
finish editing an outgoing message you were already composing, or to
alter a message you have sent.


@EndNode

@Node "Rmail Editing" "emacs/Rmail Editing"
@Next "Rmail Digest"
@Prev "Rmail Reply"
@Toc "Rmail"

Editing Within a Message
========================

   Rmail mode provides a few special commands for moving within and
editing the current message.  In addition, the usual Emacs commands are
available (except for a few, such as @{b}C-M-n@{ub} and @{b}C-M-h@{ub}, that are
redefined by Rmail for other purposes).  However, the Rmail buffer is
normally read-only, and to alter it you must use the Rmail command @{b}w@{ub}
described below.

@{b}t@{ub}
     Toggle display of original headers (@{b}rmail-toggle-headers@{ub}).

@{b}w@{ub}
     Edit current message (@{b}rmail-edit-current-message@{ub}).

   Rmail reformats the header of each message before displaying it.
Normally this involves deleting most header fields, on the grounds that
they are not interesting.  The variable @{b}rmail-ignored-headers@{ub} should
contain a regexp that matches the header fields to discard in this way.
The original headers are saved permanently, and to see what they look
like, use the @{b}t@{ub} (@{b}rmail-toggle-headers@{ub}) command.  This discards the
reformatted headers of the current message and displays it with the
original headers.  Repeating @{b}t@{ub} reformats the message again.  Selecting
the message again also reformats.

   The Rmail buffer is normally read-only, and most of the characters
you would type to modify it (including most letters) are redefined as
Rmail commands.  This is usually not a problem since it is rare to want
to change the text of a message.  When you do want to do this, the way
is to type @{b}w@{ub} (@{b}rmail-edit-current-message@{ub}), which changes from Rmail
mode into Rmail Edit mode, another major mode which is nearly the same
as Text mode.  The mode line illustrates this change.

   In Rmail Edit mode, letters insert themselves as usual and the Rmail
commands are not available.  When you are finished editing the message
and are ready to go back to Rmail, type @{b}C-c C-c@{ub}, which switches back to
Rmail mode.  Alternatively, you can return to Rmail mode but cancel all
the editing that you have done by typing @{b}C-c C-]@{ub}.

   Entering Rmail Edit mode calls with no arguments the value of the
variable @{b}text-mode-hook@{ub}, if that value exists and is not @{b}nil@{ub}; then it
does the same with the variable @{b}rmail-edit-mode-hook@{ub}.  It adds the
attribute @{b}edited@{ub} to the message.


@EndNode

@Node "Rmail Digest" "emacs/Rmail Digest"
@Prev "Rmail Editing"
@Toc "Rmail"

Digest Messages
===============

   A @{i}digest message@{ui} is a message which exists to contain and carry
several other messages.  Digests are used on moderated mailing lists;
all the messages that arrive for the list during a period of time such
as one day are put inside a single digest which is then sent to the
subscribers.  Transmitting the single digest uses much less computer
time than transmitting the individual messages even though the total
size is the same, because the per-message overhead in network mail
transmission is considerable.

   When you receive a digest message, the most convenient way to read
it is to @{i}undigestify@{ui} it: to turn it back into many individual messages.
Then you can read and delete the individual messages as it suits you.

   To undigestify a message, select it and then type @{b}M-x
undigestify-rmail-message@{ub}.  This copies each submessage as a separate
Rmail message and inserts them all following the digest.  The digest
message itself is flagged as deleted.


@EndNode

@Node "Recursive Edit" "emacs/Recursive Edit"
@Next "Narrowing"
@Prev "Rmail"
@Toc "Main"

Recursive Editing Levels
========================

   A @{i}recursive edit@{ui} is a situation in which you are using Emacs
commands to perform arbitrary editing while in the middle of another
Emacs command.  For example, when you type @{b}C-r@{ub} inside of a
@{b}query-replace@{ub}, you enter a recursive edit in which you can change
the current buffer.  On exiting from the recursive edit, you go back to
the @{b}query-replace@{ub}.

   @{i}Exiting@{ui} the recursive edit means returning to the unfinished
command, which continues execution.  For example, exiting the recursive
edit requested by @{b}C-r@{ub} in @{b}query-replace@{ub} causes query replacing to
resume.  Exiting is done with @{b}C-M-c@{ub} (@{b}exit-recursive-edit@{ub}).

   You can also @{i}abort@{ui} the recursive edit.  This is like exiting, but
also quits the unfinished command immediately.  Use the command @{b}C-]@{ub}
(@{b}abort-recursive-edit@{ub}) for this.  See @{"Quitting" Link "Quitting"}.

   The mode line shows you when you are in a recursive edit by
displaying square brackets around the parentheses that always surround
the major and minor mode names.  Every window's mode line shows this,
in the same way, since being in a recursive edit is true of Emacs as a
whole rather than any particular buffer.

   It is possible to be in recursive edits within recursive edits.  For
example, after typing @{b}C-r@{ub} in a @{b}query-replace@{ub}, you might type a command
that entered the debugger.  In such circumstances, two or more sets of
square brackets appear in the mode line.  Exiting the inner recursive
edit (such as, with the debugger @{b}c@{ub} command) would resume the command
where it called the debugger.  After the end of this command, you would
be able to exit the first recursive edit.  Aborting also gets out of
only one level of recursive edit; it returns immediately to the command
level of the previous recursive edit.  So you could immediately abort
that one too.

   Alternatively, the command @{b}M-x top-level@{ub} aborts all levels of
recursive edits, returning immediately to the top level command reader.

   The text being edited inside the recursive edit need not be the same
text that you were editing at top level.  It depends on what the
recursive edit is for.  If the command that invokes the recursive edit
selects a different buffer first, that is the buffer you will edit
recursively.  In any case, you can switch buffers within the recursive
edit in the normal manner (as long as the buffer-switching keys have
not been rebound).  You could probably do all the rest of your editing
inside the recursive edit, visiting files and all.  But this could have
surprising effects (such as stack overflow) from time to time.  So
remember to exit or abort the recursive edit when you no longer need it.

   In general, GNU Emacs tries to avoid using recursive edits.  It is
usually preferable to allow the user to switch among the possible
editing modes in any order he likes.  With recursive edits, the only
way to get to another state is to go "back" to the state that the
recursive edit was invoked from.


@EndNode

@Node "Narrowing" "emacs/Narrowing"
@Next "Sorting"
@Prev "Recursive Edit"
@Toc "Main"

Narrowing
=========

   @{i}Narrowing@{ui} means focusing in on some portion of the buffer, making
the rest temporarily invisible and inaccessible.  Cancelling the
narrowing, and making the entire buffer once again visible, is called
@{i}widening@{ui}.  The amount of narrowing in effect in a buffer at any time is
called the buffer's @{i}restriction@{ui}.

@{b}C-x n@{ub}
     Narrow down to between point and mark (@{b}narrow-to-region@{ub}).

@{b}C-x w@{ub}
     Widen to make the entire buffer visible again (@{b}widen@{ub}).

   When you have narrowed down to a part of the buffer, that part
appears to be all there is.  You can't see the rest, you can't move
into it (motion commands won't go outside the visible part), you can't
change it in any way.  However, it is not gone, and if you save the
file all the invisible text will be saved.  In addition to sometimes
making it easier to concentrate on a single subroutine or paragraph by
eliminating clutter, narrowing can be used to restrict the range of
operation of a replace command or repeating keyboard macro.  The word
@{b}Narrow@{ub} appears in the mode line whenever narrowing is in effect.

   The primary narrowing command is @{b}C-x n@{ub} (@{b}narrow-to-region@{ub}).  It sets
the current buffer's restrictions so that the text in the current
region remains visible but all text before the region or after the
region is invisible.  Point and mark do not change.

   Because narrowing can easily confuse users who do not understand it,
@{b}narrow-to-region@{ub} is normally a disabled command.  Attempting to use
this command asks for confirmation and gives you the option of enabling
it; once you enable the command, confirmation will no longer be
required for it.  See @{"Disabling" Link "Disabling"}.

   The way to undo narrowing is to widen with @{b}C-x w@{ub} (@{b}widen@{ub}).  This
makes all text in the buffer accessible again.

   You can get information on what part of the buffer you are narrowed
down to using the @{b}C-x =@{ub} command.  See @{"Position Info" Link "Position Info"}.


@EndNode

@Node "Sorting" "emacs/Sorting"
@Next "Shell"
@Prev "Narrowing"
@Toc "Main"

Sorting Text
============

   Emacs provides several commands for sorting text in the buffer.  All
operate on the contents of the region (the text between point and the
mark).  They divide the text of the region into many @{i}sort records@{ui},
identify a @{i}sort key@{ui} for each record, and then reorder the records into
the order determined by the sort keys.  The records are ordered so that
their keys are in alphabetical order, or, for numeric sorting, in
numeric order.  In alphabetic sorting, all upper case letters `A'
through `Z' come before lower case `a', in accord with the ASCII
character sequence.

   The various sort commands differ in how they divide the text into
sort records and in which part of each record is used as the sort key.
Most of the commands make each line a separate sort record, but some
commands use paragraphs or pages as sort records.  Most of the sort
commands use each entire sort record as its own sort key, but some use
only a portion of the record as the sort key.

@{b}M-x sort-lines@{ub}
     Divide the region into lines, and sort by comparing the entire
     text of a line.  A prefix argument means sort into descending
     order.

@{b}M-x sort-paragraphs@{ub}
     Divide the region into paragraphs, and sort by comparing the entire
     text of a paragraph (except for leading blank lines).  A prefix
     argument means sort into descending order.

@{b}M-x sort-pages@{ub}
     Divide the region into pages, and sort by comparing the entire
     text of a page (except for leading blank lines).  A prefix
     argument means sort into descending order.

@{b}M-x sort-fields@{ub}
     Divide the region into lines, and sort by comparing the contents of
     one field in each line.  Fields are defined as separated by
     whitespace, so the first run of consecutive non-whitespace
     characters in a line constitutes field 1, the second such run
     constitutes field 2, etc.

     You specify which field to sort by with a numeric argument: 1 to
     sort by field 1, etc.  A negative argument means sort into
     descending order.  Thus, minus 2 means sort by field 2 in
     reverse-alphabetical order.

     If two lines are equal in the field being compared, their relative
     order in the text is not changed.  This enables you to sort by
     multiple keys: sort first by the least significant key, then by
     the next-to-least key, and so on, ending with the most important
     key.

@{b}M-x sort-numeric-fields@{ub}
     Like @{b}M-x sort-fields@{ub} except the specified field is converted to a
     number for each line, and the numbers are compared.  @{b}10@{ub} comes
     before @{b}2@{ub} when considered as text, but after it when considered as
     a number.

@{b}M-x sort-columns@{ub}
     Like @{b}M-x sort-fields@{ub} except that the text within each line used
     for comparison comes from a fixed range of columns.  See below for
     an explanation.

   For example, if the buffer contains

     On systems where clash detection (locking of files being edited) is
     implemented, Emacs also checks the first time you modify a buffer
     whether the file has changed on disk since it was last visited or
     saved.  If it has, you are asked to confirm that you want to change
     the buffer.

then if you apply @{b}M-x sort-lines@{ub} to the entire buffer you get

     On systems where clash detection (locking of files being edited) is
     implemented, Emacs also checks the first time you modify a buffer
     saved.  If it has, you are asked to confirm that you want to change
     the buffer.
     whether the file has changed on disk since it was last visited or

where the upper case `O' comes before all lower case letters.  If you
apply instead @{b}C-u 2 M-x sort-fields@{ub} you get

     implemented, Emacs also checks the first time you modify a buffer
     saved.  If it has, you are asked to confirm that you want to change
     the buffer.
     On systems where clash detection (locking of files being edited) is
     whether the file has changed on disk since it was last visited or

where the sort keys were @{b}Emacs@{ub}, @{b}If@{ub}, @{b}buffer@{ub}, @{b}systems@{ub} and @{b}the@{ub}.

   @{b}M-x sort-columns@{ub} requires more explanation.  You specify the columns
by putting point at one of the columns and the mark at the other
column.  Because this means you cannot put point or the mark at the
beginning of the first line to sort, this command uses an unusual
definition of `region': all of the line point is in is considered part
of the region, and so is all of the line the mark is in.

   For example, to sort a table by information found in columns 10 to
15, you could put the mark on column 10 in the first line of the table,
and point on column 15 in the last line of the table, and then use this
command.  Or you could put the mark on column 15 in the first line and
point on column 10 in the last line.

   This can be thought of as sorting the rectangle specified by point
and the mark, except that the text on each line to the left or right of
the rectangle moves along with the text inside the rectangle.  See
@{"Rectangles" Link "Rectangles"}.


@EndNode

@Node "Shell" "emacs/Shell"
@Next "Hardcopy"
@Prev "Sorting"
@Toc "Main"

Running Shell Commands from Emacs
=================================

   Emacs has commands for passing single command lines to inferior shell
processes; it can also run a shell interactively with input and output
to an Emacs buffer @{b}*shell*@{ub}.

@{b}M-!@{ub}
     Run a specified shell command line and display the output
     (@{b}shell-command@{ub}).

@{b}M-|@{ub}
     Run a specified shell command line with region contents as input;
     optionally replace the region with the output
     (@{b}shell-command-on-region@{ub}).

@{b}M-x shell@{ub}
     Run a subshell with input and output through an Emacs buffer.  You
     can then give commands interactively.


 @{" Single Shell " Link "Single Shell"}          How to run one shell command and return.
 @{" Interactive Shell " Link "Interactive Shell"}     Permanent shell taking input via Emacs.
 @{" Shell Mode " Link "Shell Mode"}            Special Emacs commands used with permanent shell.


@EndNode

@Node "Single Shell" "emacs/Single Shell"
@Next "Interactive Shell"
@Prev "Shell"
@Toc "Shell"

Single Shell Commands
---------------------

   @{b}M-!@{ub} (@{b}shell-command@{ub}) reads a line of text using the minibuffer and
creates an inferior shell to execute the line as a command.  Standard
input from the command comes from the null device.  If the shell
command produces any output, the output goes into an Emacs buffer named
@{b}*Shell Command Output*@{ub}, which is displayed in another window but not
selected.  A numeric argument, as in @{b}M-1 M-!@{ub}, directs this command to
insert any output into the current buffer.  In that case, point is left
before the output and the mark is set after the output.

   @{b}M-|@{ub} (@{b}shell-command-on-region@{ub}) is like @{b}M-!@{ub} but passes the contents of
the region as input to the shell command, instead of no input.  If a
numeric argument is used, meaning insert output in the current buffer,
then the old region is deleted first and the output replaces it as the
contents of the region.

   Both @{b}M-!@{ub} and @{b}M-|@{ub} use @{b}shell-file-name@{ub} to specify the shell to use.
This variable is initialized based on your @{b}SHELL@{ub} environment variable
when Emacs is started.  If the file name does not specify a directory,
the directories in the list @{b}exec-path@{ub} are searched; this list is
initialized based on the environment variable @{b}PATH@{ub} when Emacs is
started.  Your @{b}.emacs@{ub} file can override either or both of these default
initializations.

   With @{b}M-!@{ub} and @{b}M-|@{ub}, Emacs has to wait until the shell command
completes.  You can quit with @{b}C-g@{ub}; that terminates the shell command.


@EndNode

@Node "Interactive Shell" "emacs/Interactive Shell"
@Next "Shell Mode"
@Prev "Single Shell"
@Toc "Shell"

Interactive Inferior Shell
--------------------------

   To run a subshell interactively, putting its typescript in an Emacs
buffer, use @{b}M-x shell@{ub}.  This creates (or reuses) a buffer named @{b}*shell*@{ub}
and runs a subshell with input coming from and output going to that
buffer.  That is to say, any "terminal output" from the subshell will
go into the buffer, advancing point, and any "terminal input" for the
subshell comes from text in the buffer.  To give input to the subshell,
go to the end of the buffer and type the input, terminated by RET.

   Emacs does not wait for the subshell to do anything.  You can switch
windows or buffers and edit them while the shell is waiting, or while
it is running a command.  Output from the subshell waits until Emacs
has time to process it; this happens whenever Emacs is waiting for
keyboard input or for time to elapse.

   If you would like multiple subshells, change the name of buffer
@{b}*shell*@{ub} to something different by using @{b}M-x rename-buffer@{ub}.  The next
use of @{b}M-x shell@{ub} will create a new buffer @{b}*shell*@{ub} with its own
subshell.  By renaming this buffer as well you can create a third one,
and so on.  All the subshells run independently and in parallel.

   The file name used to load the subshell is the value of the variable
@{b}explicit-shell-file-name@{ub}, if that is non-@{b}nil@{ub}.  Otherwise, the
environment variable @{b}ESHELL@{ub} is used, or the environment variable @{b}SHELL@{ub}
if there is no @{b}ESHELL@{ub}.  If the file name specified is relative, the
directories in the list @{b}exec-path@{ub} are searched (see
@{"Single Shell Commands" Link "Single Shell"}).

   As soon as the subshell is started, it is sent as input the contents
of the file @{b}~/.emacs_@{i}shellname@{ui}@{ub}, if that file exists, where @{i}shellname@{ui} is the name of the file
that the shell was loaded from.  For example, if you use @{b}csh@{ub}, the file
sent to it is @{b}~/.emacs_csh@{ub}; if you use the Bourne-Again shell, the file
sent to it is @{b}~/.emacs_bash@{ub}.

   @{b}cd@{ub}, @{b}pushd@{ub} and @{b}popd@{ub} commands given to the inferior shell are watched
by Emacs so it can keep the @{b}*shell*@{ub} buffer's default directory the same
as the shell's working directory.  These commands are recognized
syntactically by examining lines of input that are sent.  If you use
aliases for these commands, you can tell Emacs to recognize them also.
For example, if the value of the variable @{b}shell-pushd-regexp@{ub} matches
the beginning of a shell command line, that line is regarded as a @{b}pushd@{ub}
command.  Change this variable when you add aliases for @{b}pushd@{ub}.
Likewise, @{b}shell-popd-regexp@{ub} and @{b}shell-cd-regexp@{ub} are used to recognize
commands with the meaning of @{b}popd@{ub} and @{b}cd@{ub}.  These commands are
recognized only at the beginning of a shell command line.

   If Emacs gets an error while trying to handle what it believes is a
@{b}cd@{ub}, @{b}pushd@{ub} or @{b}popd@{ub} command, and the value of
@{b}shell-set-directory-error-hook@{ub} is non-@{b}nil@{ub}, that value is called as a
function with no arguments.


@EndNode

@Node "Shell Mode" "emacs/Shell Mode"
@Prev "Interactive Shell"
@Toc "Shell"

Shell Mode
----------

   The shell buffer uses Shell mode, which defines several special keys
attached to the @{b}C-c@{ub} prefix.  They are chosen to resemble the usual
editing and job control characters present in shells that are not under
Emacs, except that you must type @{b}C-c@{ub} first.  Here is a complete list of
the special key bindings of Shell mode:

@{b}RET@{ub}
     At end of buffer, send line as input; otherwise, copy current line
     to end of buffer and send it (@{b}send-shell-input@{ub}).  When a line is
     copied, any text at the beginning of the line that matches the
     variable @{b}shell-prompt-pattern@{ub} is left out; this variable's value
     should be a regexp string that matches the prompts that you use in
     your subshell.

@{b}C-c C-d@{ub}
     Send end-of-file as input, probably causing the shell or its
     current subjob to finish (@{b}shell-send-eof@{ub}).

@{b}C-c C-u@{ub}
     Kill all text that has yet to be sent as input (@{b}kill-shell-input@{ub}).

@{b}C-c C-w@{ub}
     Kill a word before point (@{b}backward-kill-word@{ub}).

@{b}C-c C-c@{ub}
     Interrupt the shell or its current subjob if any
     (@{b}interrupt-shell-subjob@{ub}).

@{b}C-c C-z@{ub}
     Stop the shell or its current subjob if any (@{b}stop-shell-subjob@{ub}).

@{b}C-c C-\ @{ub}
     Send quit signal to the shell or its current subjob if any
     (@{b}quit-shell-subjob@{ub}).

@{b}C-c C-o@{ub}
     Delete last batch of output from shell (@{b}kill-output-from-shell@{ub}).

@{b}C-c C-r@{ub}
     Scroll top of last batch of output to top of window
     (@{b}show-output-from-shell@{ub}).

@{b}C-c C-y@{ub}
     Copy the previous bunch of shell input, and insert it into the
     buffer before point (@{b}copy-last-shell-input@{ub}).  No final newline is
     inserted, and the input copied is not resubmitted until you type
     RET.


@EndNode

@Node "Hardcopy" "emacs/Hardcopy"
@Next "Dissociated Press"
@Prev "Shell"
@Toc "Main"

Hardcopy Output
===============

   The Emacs commands for making hardcopy derive their names from the
Unix commands @{b}print@{ub} and @{b}lpr@{ub}.

@{b}M-x print-buffer@{ub}
     Print hardcopy of current buffer using Unix command @{b}print@{ub} (@{b}lpr
     -p@{ub}).  This makes page headings containing the file name and
     page number.

@{b}M-x lpr-buffer@{ub}
     Print hardcopy of current buffer using Unix command @{b}lpr@{ub}.  This
     makes no page headings.

@{b}M-x print-region@{ub}
     Like @{b}print-buffer@{ub} but prints only the current region.

@{b}M-x lpr-region@{ub}
     Like @{b}lpr-buffer@{ub} but prints only the current region.

   All the hardcopy commands pass extra switches to the @{b}lpr@{ub} program
based on the value of the variable @{b}lpr-switches@{ub}.  Its value should be a
list of strings, each string a switch starting with @{b}-@{ub}.  For example,
the value could be @{b}("-Pfoo")@{ub} to print on printer @{b}foo@{ub}.  You can specify
an alternative command to run instead of @{b}lpr@{ub} by setting the variable
@{b}lpr-command@{ub}.


@EndNode

@Node "Dissociated Press" "emacs/Dissociated Press"
@Next "Amusements"
@Prev "Hardcopy"
@Toc "Main"

Dissociated Press
=================

   @{b}M-x dissociated-press@{ub} is a command for scrambling a file of text
either word by word or character by character.  Starting from a buffer
of straight English, it produces extremely amusing output.  The input
comes from the current Emacs buffer.  Dissociated Press writes its
output in a buffer named @{b}*Dissociation*@{ub}, and redisplays that buffer
after every couple of lines (approximately) to facilitate reading it.

   @{b}dissociated-press@{ub} asks every so often whether to continue operating.
Answer @{b}n@{ub} to stop it.  You can also stop at any time by typing @{b}C-g@{ub}.
The dissociation output remains in the @{b}*Dissociation*@{ub} buffer for you to
copy elsewhere if you wish.

   Dissociated Press operates by jumping at random from one point in the
buffer to another.  In order to produce plausible output rather than
gibberish, it insists on a certain amount of overlap between the end of
one run of consecutive words or characters and the start of the next.
That is, if it has just printed out `president' and then decides to
jump to a different point in the file, it might spot the `ent' in
`pentagon' and continue from there, producing `presidentagon'.  Long
sample texts produce the best results.

   A positive argument to @{b}M-x dissociated-press@{ub} tells it to operate
character by character, and specifies the number of overlap characters.
A negative argument tells it to operate word by word and specifies the
number of overlap words.  In this mode, whole words are treated as the
elements to be permuted, rather than characters.  No argument is
equivalent to an argument of two.  For your againformation, the output
goes only into the buffer @{b}*Dissociation*@{ub}.  The buffer you start with is
not changed.

   Dissociated Press produces nearly the same results as a Markov chain
based on a frequency table constructed from the sample text.  It is,
however, an independent, ignoriginal invention.  Dissociated Press
techniquitously copies several consecutive characters from the sample
between random choices, whereas a Markov chain would choose randomly for
each word or character.  This makes for more plausible sounding results,
and runs faster.

   It is a mustatement that too much use of Dissociated Press can be a
developediment to your real work.  Sometimes to the point of outragedy.
And keep dissociwords out of your documentation, if you want it to be
well userenced and properbose.  Have fun.  Your buggestions are welcome.


@EndNode

@Node "Amusements" "emacs/Amusements"
@Next "Emulation"
@Prev "Dissociated Press"
@Toc "Main"

Other Amusements
================

   If you are a little bit bored, you can try @{b}M-x hanoi@{ub}.  If you are
considerably bored, give it a numeric argument.  If you are very very
bored, try an argument of 9.  Sit back and watch.

   When you are frustrated, try the famous Eliza program.  Just do @{b}M-x
doctor@{ub}.  End each input by typing @{b}RET@{ub} twice.

   When you are feeling strange, type @{b}M-x yow@{ub}.


@EndNode

@Node "Emulation" "emacs/Emulation"
@Next "Customization"
@Prev "Amusements"
@Toc "Main"

Emulation
=========

   GNU Emacs can be programmed to emulate (more or less) most other
editors.  Standard facilities can emulate these:

EDT (DEC VMS editor)
     Turn on EDT emulation with @{b}M-x edt-emulation-on@{ub}.  @{b}M-x
     edt-emulation-off@{ub} restores normal Emacs command bindings.

     Most of the EDT emulation commands are keypad keys, and most
     standard Emacs key bindings are still available.  The EDT
     emulation rebindings are done in the global keymap, so there is no
     problem switching buffers or major modes while in EDT emulation.

Gosling Emacs
     Turn on emulation of Gosling Emacs (aka Unipress Emacs) with @{b}M-x
     set-gosmacs-bindings@{ub}.  This redefines many keys, mostly on the @{b}C-x@{ub}
     and @{b}ESC@{ub} prefixes, to work as they do in Gosmacs.  @{b}M-x
     set-gnu-bindings@{ub} returns to normal GNU Emacs by rebinding the same
     keys to the definitions they had at the time @{b}M-x
     set-gosmacs-bindings@{ub} was done.

     It is also possible to run Mocklisp code written for Gosling Emacs.
     See @{"Mocklisp" Link "Mocklisp"}.

vi (Berkeley Unix editor)
     Turn on vi emulation with @{b}M-x vi-mode@{ub}.  This is a major mode that
     replaces the previously established major mode.  All of the vi
     commands that, in real vi, enter "input" mode are programmed in
     the Emacs emulator to return to the previous major mode.  Thus,
     ordinary Emacs serves as vi's "input" mode.

     Because vi emulation works through major modes, it does not work
     to switch buffers during emulation.  Return to normal Emacs first.

     If you plan to use vi emulation much, you probably want to bind a
     key to the @{b}vi-mode@{ub} command.

vi (alternate emulator)
     Another vi emulator said to resemble real vi more thoroughly is
     invoked by @{b}M-x vip-mode@{ub}.  "Input" mode in this emulator is changed
     from ordinary Emacs so you can use ESC to go back to emulated vi
     command mode.  To get from emulated vi command mode back to
     ordinary Emacs, type @{b}C-z@{ub}.

     This emulation does not work through major modes, and it is
     possible to switch buffers in various ways within the emulator.
     It is not so necessary to assign a key to the command @{b}vip-mode@{ub} as
     it is with @{b}vi-mode@{ub} because terminating insert mode does not use it.

     For full information, see the long comment at the beginning of the
     source file, which is @{b}lisp/vip.el@{ub} in the Emacs distribution.

   I am interested in hearing which vi emulator users prefer, as well
as in receiving more complete user documentation for either or both
emulators.  Warning: loading both at once may cause name conficts; no
one has checked.


@EndNode

@Node "Customization" "emacs/Customization"
@Next "Quitting"
@Prev "Emulation"
@Toc "Main"

Customization
*************

   This chapter talks about various topics relevant to adapting the
behavior of Emacs in minor ways.

   All kinds of customization affect only the particular Emacs job that
you do them in.  They are completely lost when you kill the Emacs job,
and have no effect on other Emacs jobs you may run at the same time or
later.  The only way an Emacs job can affect anything outside of it is
by writing a file; in particular, the only way to make a customization
`permanent' is to put something in your @{b}.emacs@{ub} file or other
appropriate file to do the customization in each session.  See
@{"Init File" Link "Init File"}.


 @{" Minor Modes " Link "Minor Modes"}      Each minor mode is one feature you can turn on
                     independently of any others.
 @{" Variables " Link "Variables"}        Many Emacs commands examine Emacs variables
                     to decide what to do; by setting variables,
                     you can control their functioning.
 @{" Keyboard Macros " Link "Keyboard Macros"}  A keyboard macro records a sequence of keystrokes
                     to be replayed with a single command.
 @{" Key Bindings " Link "Key Bindings"}     The keymaps say what command each key runs.
                     By changing them, you can "redefine keys".
 @{" Syntax " Link "Syntax"}           The syntax table controls how words and expressions
                     are parsed.
 @{" Init File " Link "Init File"}        How to write common customizations in the @{b}.emacs@{ub} file.


@EndNode

@Node "Minor Modes" "emacs/Minor Modes"
@Next "Variables"
@Prev "Customization"
@Toc "Customization"

Minor Modes
===========

   Minor modes are options which you can use or not.  For example, Auto
Fill mode is a minor mode in which SPC breaks lines between words as you
type.  All the minor modes are independent of each other and of the
selected major mode.  Most minor modes say in the mode line when they
are on; for example, @{b}Fill@{ub} in the mode line means that Auto Fill mode is
on.

   Append @{b}-mode@{ub} to the name of a minor mode to get the name of a
command function that turns the mode on or off.  Thus, the command to
enable or disable Auto Fill mode is called @{b}M-x auto-fill-mode@{ub}.  These
commands are usually invoked with @{b}M-x@{ub}, but you can bind keys to them if
you wish.  With no argument, the function turns the mode on if it was off
and off if it was on.  This is known as @{i}toggling@{ui}.  A positive argument
always turns the mode on, and an explicit zero argument or a negative
argument always turns it off.

   Auto Fill mode allows you to enter filled text without breaking lines
explicitly.  Emacs inserts newlines as necessary to prevent lines from
becoming too long.  See @{"Filling" Link "Filling"}.

   Overwrite mode causes ordinary printing characters to replace
existing text instead of shoving it over.  For example, if the point is
in front of the @{b}B@{ub} in @{b}FOOBAR@{ub}, then in Overwrite mode typing a @{b}G@{ub} changes
it to @{b}FOOGAR@{ub}, instead of making it @{b}FOOGBAR@{ub} as usual.

   Abbrev mode allows you to define abbreviations that automatically
expand as you type them.  For example, @{b}amd@{ub} might expand to @{b}abbrev mode@{ub}.
See @{"Abbrevs" Link "Abbrevs"}, for full information.


@EndNode

@Node "Variables" "emacs/Variables"
@Next "Keyboard Macros"
@Prev "Minor Modes"
@Toc "Customization"

Variables
=========

   A @{i}variable@{ui} is a Lisp symbol which has a value.  The symbol's name is
also called the name of the variable.  Variable names can contain any
characters, but conventionally they are chosen to be words separated by
hyphens.  A variable can have a documentation string which describes
what kind of value it should have and how the value will be used.

   Lisp allows any variable to have any kind of value, but most
variables that Emacs uses require a value of a certain type.  Often the
value should always be a string, or should always be a number.
Sometimes we say that a certain feature is turned on if a variable is
"non-@{b}nil@{ub}," meaning that if the variable's value is @{b}nil@{ub}, the feature is
off, but the feature is on for @{i}any@{ui} other value.  The conventional value
to use to turn on the feature--since you have to pick one particular
value when you set the variable--is @{b}t@{ub}.

   Emacs uses many Lisp variables for internal recordkeeping, as any
Lisp program must, but the most interesting variables for you are the
ones that exist for the sake of customization.  Emacs does not
(usually) change the values of these variables; instead, you set the
values, and thereby alter and control the behavior of certain Emacs
commands.  These variables are called @{i}options@{ui}.  Most options are
documented in this manual, and appear in the Variable Index (see
@{"Variable Index" Link "Variable Index"}).

   One example of a variable which is an option is @{b}fill-column@{ub}, which
specifies the position of the right margin (as a number of characters
from the left margin) to be used by the fill commands (see @{"Filling" Link "Filling"}).


 @{" Examining " Link "Examining"}            Examining or setting one variable's value.
 @{" Edit Options " Link "Edit Options"}         Examining or editing list of all variables' values.
 @{" Locals " Link "Locals"}               Per-buffer values of variables.
 @{" File Variables " Link "File Variables"}       How files can specify variable values.


@EndNode

@Node "Examining" "emacs/Examining"
@Next "Edit Options"
@Prev "Variables"
@Toc "Variables"

Examining and Setting Variables
-------------------------------

@{b}C-h v@{ub}
@{b}M-x describe-variable@{ub}
     Print the value and documentation of a variable.

@{b}M-x set-variable@{ub}
     Change the value of a variable.

   To examine the value of a single variable, type @{b}C-h v@{ub}
(@{b}describe-variable@{ub}), which reads a variable name using the
minibuffer, with completion.  It prints both the value and the
documentation of the variable.

     C-h v fill-column RET

prints something like
     fill-column's value is 72
     
     Documentation:
     *Column beyond which automatic line-wrapping should happen.
     Automatically becomes local when set in any fashion.

The star at the beginning of the documentation indicates that this
variable is an option.  @{b}C-h v@{ub} is not restricted to options; it allows
any variable name.

   If you know which option you want to set, you can set it using @{b}M-x
set-variable@{ub}.  This reads the variable name with the minibuffer (with
completion), and then reads a Lisp expression for the new value using
the minibuffer a second time.  For example,

     M-x set-variable RET fill-column RET 72 RET

sets @{b}fill-column@{ub} to 72, like executing the Lisp expression

     (setq fill-column 72)

   Setting variables in this way, like all means of customizing Emacs
except where explicitly stated, affects only the current Emacs session.


@EndNode

@Node "Edit Options" "emacs/Edit Options"
@Next "Locals"
@Prev "Examining"
@Toc "Variables"

Editing Variable Values
-----------------------

@{b}M-x list-options@{ub}
     Display a buffer listing names, values and documentation of all
     options.

@{b}M-x edit-options@{ub}
     Change option values by editing a list of options.

   @{b}M-x list-options@{ub} displays a list of all Emacs option variables, in
an Emacs buffer named @{b}*List Options*@{ub}.  Each option is shown with its
documentation and its current value.  Here is what a portion of it might
look like:

     ;; exec-path:
     ("." "/usr/local/bin" "/usr/ucb" "/bin" "/usr/bin" "/u2/emacs/etc")
     *List of directories to search programs to run in subprocesses.
     Each element is a string (directory name)
     or nil (try the default directory).
     ;;
     ;; fill-column:
     72
     *Column beyond which automatic line-wrapping should happen.
     Automatically becomes local when set in any fashion.
     ;;

   @{b}M-x edit-options@{ub} goes one step further and immediately selects the
@{b}*List Options*@{ub} buffer; this buffer uses the major mode Options mode,
which provides commands that allow you to point at an option and change
its value:

@{b}s@{ub}
     Set the variable point is in or near to a new value read using the
     minibuffer.

@{b}x@{ub}
     Toggle the variable point is in or near: if the value was @{b}nil@{ub}, it
     becomes @{b}t@{ub}; otherwise it becomes @{b}nil@{ub}.

@{b}1@{ub}
     Set the variable point is in or near to @{b}t@{ub}.

@{b}0@{ub}
     Set the variable point is in or near to @{b}nil@{ub}.

@{b}n@{ub}
@{b}p@{ub}
     Move to the next or previous variable.

   Changes take effect immediately.


@EndNode

@Node "Locals" "emacs/Locals"
@Next "File Variables"
@Prev "Edit Options"
@Toc "Variables"

Local Variables
---------------

@{b}M-x make-local-variable@{ub}
     Make a variable have a local value in the current buffer.

@{b}M-x kill-local-variable@{ub}
     Make a variable use its global value in the current buffer.

@{b}M-x make-variable-buffer-local@{ub}
     Mark a variable so that setting it will make it local to the
     buffer that is current at that time.

   Any variable can be made @{i}local@{ui} to a specific Emacs buffer.  This
means that its value in that buffer is independent of its value in other
buffers.  A few variables are always local in every buffer.  Every other
Emacs variable has a @{i}global@{ui} value which is in effect in all buffers
that have not made the variable local.

   Major modes always make the variables they set local to the buffer.
This is why changing major modes in one buffer has no effect on other
buffers.

   @{b}M-x make-local-variable@{ub} reads the name of a variable and makes it
local to the current buffer.  Further changes in this buffer will not
affect others, and further changes in the global value will not affect
this buffer.

   @{b}M-x make-variable-buffer-local@{ub} reads the name of a variable and
changes the future behavior of the variable so that it will become local
automatically when it is set.  More precisely, once a variable has been
marked in this way, the usual ways of setting the variable will
automatically do @{b}make-local-variable@{ub} first.  We call such variables
@{i}per-buffer@{ui} variables.

   Some important variables have been marked per-buffer already.  These
include @{b}abbrev-mode@{ub}, @{b}auto-fill-hook@{ub}, @{b}case-fold-search@{ub}, @{b}ctl-arrow@{ub},
@{b}comment-column@{ub}, @{b}fill-column@{ub}, @{b}fill-prefix@{ub}, @{b}indent-tabs-mode@{ub}, @{b}left-margin@{ub},
@{b}mode-line-format@{ub}, @{b}overwrite-mode@{ub}, @{b}selective-display@{ub}, @{b}tab-width@{ub},
@{b}selective-display-ellipses@{ub}, and @{b}truncate-lines@{ub}.  Some other variables
are always local in every buffer, but they are used for internal
purposes.

   @{b}M-x kill-local-variable@{ub} reads the name of a variable and makes it
cease to be local to the current buffer.  The global value of the
variable henceforth is in effect in this buffer.  Setting the major
mode kills all the local variables of the buffer.

   To set the global value of a variable, regardless of whether the
variable has a local value in the current buffer, you can use the Lisp
function @{b}setq-default@{ub}.  It works like @{b}setq@{ub}.  If there is a local value
in the current buffer, the local value is not affected by @{b}setq-default@{ub};
thus, the new global value may not be visible until you switch to
another buffer.  For example,

     (setq-default fill-column 72)

@{b}setq-default@{ub} is the only way to set the global value of a variable that
has been marked with @{b}make-variable-buffer-local@{ub}.

   Programs can look at a variable's default value with @{b}default-value@{ub}.
This function takes a symbol as argument and returns its default value.
The argument is evaluated; usually you must quote it explicitly.  For
example,

     (default-value 'fill-column)


@EndNode

@Node "File Variables" "emacs/File Variables"
@Prev "Locals"
@Toc "Variables"

Local Variables in Files
------------------------

   A file can contain a @{i}local variables list@{ui}, which specifies the
values to use for certain Emacs variables when that file is edited.
Visiting the file checks for a local variables list and makes each
variable in the list local to the buffer in which the file is visited,
with the value specified in the file.

   A local variables list goes near the end of the file, in the last
page.  (It is often best to put it on a page by itself.)  The local
variables list starts with a line containing the string @{b}Local
Variables:@{ub}, and ends with a line containing the string @{b}End:@{ub}.  In
between come the variable names and values, one set per line, as
@{b}@{i}variable@{ui}: @{i}value@{ui}@{ub}.  The @{i}value@{ui}s are not evaluated; they are used
literally.

   The line which starts the local variables list does not have to say
just @{b}Local Variables:@{ub}.  If there is other text before @{b}Local Variables:@{ub},
that text is called the @{i}prefix@{ui}, and if there is other text after, that
is called the @{i}suffix@{ui}.  If these are present, each entry in the local
variables list should have the prefix before it and the suffix after
it.  This includes the @{b}End:@{ub} line.  The prefix and suffix are included
to disguise the local variables list as a comment so that the compiler
or text formatter will not be perplexed by it.  If you do not need to
disguise the local variables list as a comment in this way, do not
bother with a prefix or a suffix.

   Two "variable" names are special in a local variables list: a value
for the variable @{b}mode@{ub} really sets the major mode, and a value for the
variable @{b}eval@{ub} is simply evaluated as an expression and the value is
ignored.  These are not real variables; setting such variables in any
other context has no such effect.  If @{b}mode@{ub} is used in a local variables
list, it should be the first entry in the list.

   Here is an example of a local variables list:

     ;;; Local Variables: ***
     ;;; mode:lisp ***
     ;;; comment-column:0 ***
     ;;; comment-start: ";;; "  ***
     ;;; comment-end:"***" ***
     ;;; End: ***

   Note that the prefix is @{b};;; @{ub} and the suffix is @{b} ***@{ub}.  Note also that
comments in the file begin with and end with the same strings.
Presumably the file contains code in a language which is like Lisp
(like it enough for Lisp mode to be useful) but in which comments start
and end in that way.  The prefix and suffix are used in the local
variables list to make the list appear as comments when the file is read
by the compiler or interpreter for that	language.

   The start of the local variables list must be no more than 3000
characters from the end of the file, and must be in the last page if the
file is divided into pages.  Otherwise, Emacs will not notice it is
there.  The purpose of this is so that a stray @{b}Local Variables:@{ub}  not in
the last page does not confuse Emacs, and so that visiting a long file
that is all one page and has no local variables list need not take the
time to search the whole file.

   You may be tempted to try to turn on Auto Fill mode with a local
variable list.  That is a mistake.  The choice of Auto Fill mode or not
is a matter of individual taste, not a matter of the contents of
particular files.  If you want to use Auto Fill, set up major mode
hooks with your @{b}.emacs@{ub} file to turn it on (when appropriate) for you
alone (see @{"Init File" Link "Init File"}).  Don't try to use a local variable list that
would impose your taste on everyone.

   If you are concerned that you might visit a file containing a
Trojan-horse local variable specification, you can prevent local
variables processing by setting the variable @{b}inhibit-local-variables@{ub} to
a non-@{b}nil@{ub} value.  Emacs will display the local variables specification
and then ask you whether to process it.


@EndNode

@Node "Keyboard Macros" "emacs/Keyboard Macros"
@Next "Key Bindings"
@Prev "Variables"
@Toc "Customization"

Keyboard Macros
===============

   A @{i}keyboard macro@{ui} is a command defined by the user to abbreviate a
sequence of keys.  For example, if you discover that you are about to
type @{b}C-n C-d@{ub} forty times, you can speed your work by defining a keyboard
macro to do @{b}C-n C-d@{ub} and calling it with a repeat count of forty.

@{b}C-x (@{ub}
     Start defining a keyboard macro (@{b}start-kbd-macro@{ub}).

@{b}C-x )@{ub}
     End the definition of a keyboard macro (@{b}end-kbd-macro@{ub}).

@{b}C-x e@{ub}
     Execute the most recent keyboard macro (@{b}call-last-kbd-macro@{ub}).

@{b}C-u C-x (@{ub}
     Re-execute last keyboard macro, then add more keys to its
     definition.

@{b}C-x q@{ub}
     When this point is reached during macro execution, ask for
     confirmation (@{b}kbd-macro-query@{ub}).

@{b}M-x name-last-kbd-macro@{ub}
     Give a command name (for the duration of the session) to the most
     recently defined keyboard macro.

@{b}M-x insert-kbd-macro@{ub}
     Insert in the buffer a keyboard macro's definition, as Lisp code.

   Keyboard macros differ from ordinary Emacs commands in that they are
written in the Emacs command language rather than in Lisp.  This makes
it easier for the novice to write them, and makes them more convenient
as temporary hacks.  However, the Emacs command language is not powerful
enough as a programming language to be useful for writing anything
intelligent or general.  For such things, Lisp must be used.

   You define a keyboard macro while executing the commands which are
the definition.  Put differently, as you are defining a keyboard macro,
the definition is being executed for the first time.  This way, you can
see what the effects of your commands are, so that you don't have to
figure them out in your head.  When you are finished, the keyboard
macro is defined and also has been, in effect, executed once.  You can
then do the whole thing over again by invoking the macro.


 @{" Basic Kbd Macro " Link "Basic Kbd Macro"}      Defining and running keyboard macros.
 @{" Save Kbd Macro " Link "Save Kbd Macro"}       Giving keyboard macros names; saving them in files.
 @{" Kbd Macro Query " Link "Kbd Macro Query"}      Keyboard macros that do different things each use.


@EndNode

@Node "Basic Kbd Macro" "emacs/Basic Kbd Macro"
@Next "Save Kbd Macro"
@Prev "Keyboard Macros"
@Toc "Keyboard Macros"

Basic Use
---------

   To start defining a keyboard macro, type the @{b}C-x (@{ub} command
(@{b}start-kbd-macro@{ub}).  From then on, your keys continue to be
executed, but also become part of the definition of the macro.  @{b}Def@{ub}
appears in the mode line to remind you of what is going on.  When you
are finished, the @{b}C-x )@{ub} command (@{b}end-kbd-macro@{ub}) terminates the
definition (without becoming part of it!).

For example,

     C-x ( M-F foo C-x )

defines a macro to move forward a word and then insert @{b}foo@{ub}.

   The macro thus defined can be invoked again with the @{b}C-x e@{ub} command
(@{b}call-last-kbd-macro@{ub}), which may be given a repeat count as a
numeric argument to execute the macro many times.  @{b}C-x )@{ub} can also be
given a repeat count as an argument, in which case it repeats the macro
that many times right after defining it, but defining the macro counts
as the first repetition (since it is executed as you define it).  So,
giving @{b}C-x )@{ub} an argument of 4 executes the macro immediately 3
additional times.  An argument of zero to @{b}C-x e@{ub} or @{b}C-x )@{ub} means repeat
the macro indefinitely (until it gets an error or you type @{b}C-g@{ub}).

   If you wish to repeat an operation at regularly spaced places in the
text, define a macro and include as part of the macro the commands to
move to the next place you want to use it.  For example, if you want to
change each line, you should position point at the start of a line, and
define a macro to change that line and leave point at the start of the
next line.  Then repeating the macro will operate on successive lines.

   After you have terminated the definition of a keyboard macro, you
can add to the end of its definition by typing @{b}C-u C-x (@{ub}.  This is
equivalent to plain @{b}C-x (@{ub} followed by retyping the whole definition so
far.  As a consequence it re-executes the macro as previously defined.

   One limitation on the use of keyboard macros is that if you exit a
recursive edit within a macro that was not entered within the macro,
then the execution of the macro stops at that point.  In Emacs 18, View
mode uses a recursive edit, so exiting View mode is an occasion for such
a problem.


@EndNode

@Node "Save Kbd Macro" "emacs/Save Kbd Macro"
@Next "Kbd Macro Query"
@Prev "Basic Kbd Macro"
@Toc "Keyboard Macros"

Naming and Saving Keyboard Macros
---------------------------------

   If you wish to save a keyboard macro for longer than until you
define the next one, you must give it a name using @{b}M-x
name-last-kbd-macro@{ub}.  This reads a name as an argument using the
minibuffer and defines that name to execute the macro.  The macro name
is a Lisp symbol, and defining it in this way makes it a valid command
name for calling with @{b}M-x@{ub} or for binding a key to with @{b}global-set-key@{ub}
(see @{"Keymaps" Link "Keymaps"}).  If you specify a name that has a prior definition other
than another keyboard macro, an error message is printed and nothing is
changed.

   Once a macro has a command name, you can save its definition in a
file.  Then it can be used in another editing session.  First visit the
file you want to save the definition in.  Then use the command

     M-x insert-kbd-macro RET @{i}macroname@{ui} RET

This inserts some Lisp code that, when executed later, will define the
same macro with the same definition it has now.  You need not
understand Lisp code to do this, because @{b}insert-kbd-macro@{ub} writes the
Lisp code for you.  Then save the file.  The file can be loaded with
@{b}load-file@{ub} (see @{"Lisp Libraries" Link "Lisp Libraries"}).  If the file you save in is your init
file @{b}~/.emacs@{ub} (see @{"Init File" Link "Init File"}) then the macro will be defined each time
you run Emacs.

   If you give @{b}insert-kbd-macro@{ub} a prefix argument, it makes additional
Lisp code to record the keys (if any) that you have bound to the
keyboard macro, so that the macro will be reassigned the same keys when
you load the file.


@EndNode

@Node "Kbd Macro Query" "emacs/Kbd Macro Query"
@Prev "Save Kbd Macro"
@Toc "Keyboard Macros"

Executing Macros with Variations
--------------------------------

   Using @{b}C-x q@{ub} (@{b}kbd-macro-query@{ub}), you can get an effect similar to that
of @{b}query-replace@{ub}, where the macro asks you each time around whether to
make a change.  When you are defining the macro, type @{b}C-x q@{ub} at the
point where you want the query to occur.  During macro definition, the
@{b}C-x q@{ub} does nothing, but when the macro is invoked the @{b}C-x q@{ub} reads a
character from the terminal to decide whether to continue.

   The special answers are SPC, DEL, @{b}C-d@{ub}, @{b}C-l@{ub} and @{b}C-r@{ub}.  Any other
character terminates execution of the keyboard macro and is then read
as a command.  SPC means to continue.  DEL means to skip the remainder
of this repetition of the macro, starting again from the beginning in
the next repetition.  @{b}C-d@{ub} means to skip the remainder of this
repetition and cancel further repetition.  @{b}C-l@{ub} redraws the screen and
asks you again for a character to say what to do.  @{b}C-r@{ub} enters a
recursive editing level, in which you can perform editing which is not
part of the macro.  When you exit the recursive edit using @{b}C-M-c@{ub}, you
are asked again how to continue with the keyboard macro.  If you type a
SPC at this time, the rest of the macro definition is executed.  It is
up to you to leave point and the text in a state such that the rest of
the macro will do what you want.

   @{b}C-u C-x q@{ub}, which is @{b}C-x q@{ub} with a numeric argument, performs a
different function.  It enters a recursive edit reading input from the
keyboard, both when you type it during the definition of the macro, and
when it is executed from the macro.  During definition, the editing you
do inside the recursive edit does not become part of the macro.  During
macro execution, the recursive edit gives you a chance to do some
particularized editing.  See @{"Recursive Edit" Link "Recursive Edit"}.


@EndNode

@Node "Key Bindings" "emacs/Key Bindings"
@Next "Syntax"
@Prev "Keyboard Macros"
@Toc "Customization"

Customizing Key Bindings
========================

   This section deals with the @{i}keymaps@{ui} which define the bindings
between keys and functions, and shows how you can customize these
bindings.

   A command is a Lisp function whose definition provides for
interactive use.  Like every Lisp function, a command has a function
name, a Lisp symbol whose name usually consists of lower case letters
and hyphens.


 @{" Keymaps " Link "Keymaps"}     Definition of the keymap data structure.
               Names of Emacs's standard keymaps.
 @{" Rebinding " Link "Rebinding"}   How to redefine one key's meaning conveniently.
 @{" Disabling " Link "Disabling"}   Disabling a command means confirmation is required
                before it can be executed.  This is done to protect
                beginners from surprises.


@EndNode

@Node "Keymaps" "emacs/Keymaps"
@Next "Rebinding"
@Prev "Key Bindings"
@Toc "Key Bindings"

Keymaps
-------

   The bindings between characters and command functions are recorded in
data structures called @{i}keymaps@{ui}.  Emacs has many of these.  One, the
@{i}global@{ui} keymap, defines the meanings of the single-character keys that
are defined regardless of major mode.  It is the value of the variable
@{b}global-map@{ub}.

   Each major mode has another keymap, its @{i}local keymap@{ui}, which contains
overriding definitions for the single-character keys that are to be
redefined in that mode.  Each buffer records which local keymap is
installed for it at any time, and the current buffer's local keymap is
the only one that directly affects command execution.  The local
keymaps for Lisp mode, C mode, and many other major modes always exist
even when not in use.  They are the values of the variables
@{b}lisp-mode-map@{ub}, @{b}c-mode-map@{ub}, and so on.  For major modes less often used,
the local keymap is sometimes constructed only when the mode is used
for the first time in a session.  This is to save space.

   There are local keymaps for the minibuffer too; they contain various
completion and exit commands.

   @{b}*@{ub}     @{b}minibuffer-local-map@{ub} is used for ordinary input (no
     completion).

   @{b}*@{ub}     @{b}minibuffer-local-ns-map@{ub} is similar, except that SPC exits just
     like RET.  This is used mainly for Mocklisp compatibility.

   @{b}*@{ub}     @{b}minibuffer-local-completion-map@{ub} is for permissive completion.

   @{b}*@{ub}     @{b}minibuffer-local-must-match-map@{ub} is for strict completion and
     for cautious completion.

   @{b}*@{ub}     @{b}repeat-complex-command-map@{ub} is for use in @{b}C-x ESC@{ub}.

   Finally, each prefix key has a keymap which defines the key sequences
that start with it.  For example, @{b}ctl-x-map@{ub} is the keymap used for
characters following a @{b}C-x@{ub}.

   @{b}*@{ub}     @{b}ctl-x-map@{ub} is the variable name for the map used for characters
     that follow @{b}C-x@{ub}.

   @{b}*@{ub}     @{b}help-map@{ub} is used for characters that follow @{b}C-h@{ub}.

   @{b}*@{ub}     @{b}esc-map@{ub} is for characters that follow ESC.  Thus, all Meta
     characters are actually defined by this map.

   @{b}*@{ub}     @{b}ctl-x-4-map@{ub} is for characters that follow @{b}C-x 4@{ub}.

   @{b}*@{ub}     @{b}mode-specific-map@{ub} is for characters that follow @{b}C-c@{ub}.

   The definition of a prefix key is just the keymap to use for looking
up the following character.  Actually, the definition is sometimes a
Lisp symbol whose function definition is the following character
keymap.  The effect is the same, but it provides a command name for the
prefix key that can be used as a description of what the prefix key is
for.  Thus, the binding of @{b}C-x@{ub} is the symbol @{b}Ctl-X-Prefix@{ub}, whose
function definition is the keymap for @{b}C-x@{ub} commands, the value of
@{b}ctl-x-map@{ub}.

   Prefix key definitions of this sort can appear in either the global
map or a local map.  The definitions of @{b}C-c@{ub}, @{b}C-x@{ub}, @{b}C-h@{ub} and ESC as prefix
keys appear in the global map, so these prefix keys are always
available.  Major modes can locally redefine a key as a prefix by
putting a prefix key definition for it in the local map.

   A mode can also put a prefix definition of a global prefix character
such as @{b}C-x@{ub} into its local map.  This is how major modes override the
definitions of certain keys that start with @{b}C-x@{ub}.  This case is special,
because the local definition does not entirely replace the global one.
When both the global and local definitions of a key are other keymaps,
the next character is looked up in both keymaps, with the local
definition overriding the global one as usual.  So, the character after
the @{b}C-x@{ub} is looked up in both the major mode's own keymap for redefined
@{b}C-x@{ub} commands and in @{b}ctl-x-map@{ub}.  If the major mode's own keymap for @{b}C-x@{ub}
commands contains @{b}nil@{ub}, the definition from the global keymap for @{b}C-x@{ub}
commands is used.

   A keymap is actually a Lisp object.  The simplest form of keymap is a
Lisp vector of length 128.  The binding for a character in such a
keymap is found by indexing into the vector with the character as an
index.  A keymap can also be a Lisp list whose CAR is the symbol @{b}keymap@{ub}
and whose remaining elements are pairs of the form @{b} (@{i}char@{ui} . @{i}binding@{ui})@{ub}.
Such lists are called @{i}sparse keymaps@{ui} because they are used when most of
the characters' entries will be @{b}nil@{ub}.  Sparse keymaps are used mainly
for prefix characters.

   Keymaps are only of length 128, so what about Meta characters, whose
codes are from 128 to 255?  A key that contains a Meta character
actually represents it as a sequence of two characters, the first of
which is ESC.  So the key @{b}M-a@{ub} is really represented as @{b}ESC a@{ub}, and its
binding is found at the slot for @{b}a@{ub} in @{b}esc-map@{ub}.


@EndNode

@Node "Rebinding" "emacs/Rebinding"
@Next "Disabling"
@Prev "Keymaps"
@Toc "Key Bindings"

Changing Key Bindings Interactively
-----------------------------------

   The way to redefine an Emacs key is to change its entry in a keymap.
You can change the global keymap, in which case the change is effective
in all major modes (except those that have their own overriding local
definitions for the same key).  Or you can change the current buffer's
local map, which affects all buffers using the same major mode.

@{b}M-x global-set-key RET @{i}key@{ui} @{i}cmd@{ui} RET@{ub}
     Defines @{i}key@{ui} globally to run @{i}cmd@{ui}.

@{b}M-x local-set-key RET @{i}key@{ui} @{i}cmd@{ui} RET@{ub}
     Defines @{i}key@{ui} locally (in the major mode now in effect) to run @{i}cmd@{ui}.

   For example,

     M-x global-set-key RET C-f next-line RET

would redefine @{b}C-f@{ub} to move down a line.  The fact that @{i}cmd@{ui} is read
second makes it serve as a kind of confirmation for @{i}key@{ui}.

   These functions offer no way to specify a particular prefix keymap
as the one to redefine in, but that is not necessary, as you can
include prefixes in @{i}key@{ui}.  @{i}key@{ui} is read by reading characters one by one
until they amount to a complete key (that is, not a prefix key).  Thus,
if you type @{b}C-f@{ub} for @{i}key@{ui}, that's the end; the minibuffer is entered
immediately to read @{i}cmd@{ui}.  But if you type @{b}C-x@{ub}, another character is
read; if that is @{b}4@{ub}, another character is read, and so on.  For example,

     M-x global-set-key RET C-x 4 $ spell-other-window RET

would redefine @{b}C-x 4 $@{ub} to run the (fictitious) command
@{b}spell-other-window@{ub}.

   All the key sequences which consist of @{b}C-c@{ub} followed by a letter are
supposed to be reserved for user customization.  That is, Emacs Lisp
libraries should not define any of these commands.

   The most general way to modify a keymap is the function @{b}define-key@{ub},
used in Lisp code (such as your @{b}.emacs@{ub} file).  @{b}define-key@{ub} takes three
arguments: the keymap, the key to modify in it, and the new definition.
See @{"Init File" Link "Init File"}, for an example.  @{b}substitute-key-definition@{ub} is used
similarly; it takes three arguments, an old definition, a new
definition and a keymap, and redefines in that keymap all keys that were
previously defined with the old definition to have the new definition
instead.


@EndNode

@Node "Disabling" "emacs/Disabling"
@Prev "Rebinding"
@Toc "Key Bindings"

Disabling Commands
------------------

   Disabling a command marks the command as requiring confirmation
before it can be executed.  The purpose of disabling a command is to
prevent beginning users from executing it by accident and being
confused.

   The direct mechanism for disabling a command is to have a non-@{b}nil@{ub}
@{b}disabled@{ub} property on the Lisp symbol for the command.  These properties
are normally set up by the user's @{b}.emacs@{ub} file with Lisp expressions
such as

     (put 'delete-region 'disabled t)

   If the value of the @{b}disabled@{ub} property is a string, that string is
included in the message printed when the command is used:

     (put 'delete-region 'disabled
          "Text deleted this way cannot be yanked back!\n")

   You can make a command disabled either by editing the @{b}.emacs@{ub} file
directly or with the command @{b}M-x disable-command@{ub}, which edits the
@{b}.emacs@{ub} file for you.  See @{"Init File" Link "Init File"}.

   Attempting to invoke a disabled command interactively in Emacs
causes the display of a window containing the command's name, its
documentation, and some instructions on what to do immediately; then
Emacs asks for input saying whether to execute the command as
requested, enable it and execute, or cancel it.  If you decide to
enable the command, you are asked whether to do this permanently or
just for the current session.  Enabling permanently works by
automatically editing your @{b}.emacs@{ub} file.  You can use @{b}M-x enable-command@{ub}
at any time to enable any command permanently.

   Whether a command is disabled is independent of what key is used to
invoke it; it also applies if the command is invoked using @{b}M-x@{ub}.
Disabling a command has no effect on calling it as a function from Lisp
programs.


@EndNode

@Node "Syntax" "emacs/Syntax"
@Next "Init File"
@Prev "Key Bindings"
@Toc "Customization"

The Syntax Table
================

   All the Emacs commands which parse words or balance parentheses are
controlled by the @{i}syntax table@{ui}.  The syntax table says which characters
are opening delimiters, which are parts of words, which are string
quotes, and so on.  Actually, each major mode has its own syntax table
(though sometimes related major modes use the same one) which it
installs in each buffer that uses that major mode.  The syntax table
installed in the current buffer is the one that all commands use, so we
call it "the" syntax table.  A syntax table is a Lisp object, a vector
of length 256 whose elements are numbers.


 @{" Entry " Link "Syntax Entry"}                  What the syntax table records for each character.
 @{" Change " Link "Syntax Change"}                 How to change the information.


@EndNode

@Node "Syntax Entry" "emacs/Syntax Entry"
@Next "Syntax Change"
@Prev "Syntax"
@Toc "Syntax"

Information about Each Character
--------------------------------

   The syntax table entry for a character is a number that encodes six
pieces of information:

   @{b}*@{ub} The syntactic class of the character, represented as a small
     integer.

   @{b}*@{ub} The matching delimiter, for delimiter characters only.  The
     matching delimiter of @{b}(@{ub} is @{b})@{ub}, and vice versa.

   @{b}*@{ub} A flag saying whether the character is the first character of a
     two-character comment starting sequence.

   @{b}*@{ub} A flag saying whether the character is the second character of a
     two-character comment starting sequence.

   @{b}*@{ub} A flag saying whether the character is the first character of a
     two-character comment ending sequence.

   @{b}*@{ub} A flag saying whether the character is the second character of a
     two-character comment ending sequence.

   The syntactic classes are stored internally as small integers, but
are usually described to or by the user with characters.  For example, @{b}(@{ub}
is used to specify the syntactic class of opening delimiters.  Here is a
table of syntactic classes, with the characters that specify them.

@{b} @{ub}
     The class of whitespace characters.

@{b}-@{ub}
     Another name for the class of whitespace characters.

@{b}w@{ub}
     The class of word-constituent characters.

@{b}_@{ub}
     The class of characters that are part of symbol names but not
     words.  This class is represented by @{b}_@{ub} because the character @{b}_@{ub} has
     this class in both C and Lisp.

@{b}.@{ub}
     The class of punctuation characters that do not fit into any other
     special class.

@{b}(@{ub}
     The class of opening delimiters.

@{b})@{ub}
     The class of closing delimiters.

@{b}'@{ub}
     The class of expression-adhering characters.  These characters are
     part of a symbol if found within or adjacent to one, and are part
     of a following expression if immediately preceding one, but are
     like whitespace if surrounded by whitespace.

@{b}"@{ub}
     The class of string-quote characters.  They match each other in
     pairs, and the characters within the pair all lose their syntactic
     significance except for the @{b}\ @{ub} and @{b}/@{ub} classes of escape characters,
     which can be used to include a string-quote inside the string.

@{b}$@{ub}
     The class of self-matching delimiters.  This is intended for TeX's
     @{b}$@{ub}, which is used both to enter and leave math mode.  Thus, a pair
     of matching @{b}$@{ub} characters surround each piece of math mode TeX
     input.  A pair of adjacent @{b}$@{ub} characters act like a single one for
     purposes of matching.

@{b}/@{ub}
     The class of escape characters that always just deny the following
     character its special syntactic significance.  The character after one
     of these escapes is always treated as alphabetic.

@{b}\ @{ub}
     The class of C-style escape characters.  In practice, these are
     treated just like @{b}/@{ub}-class characters, because the extra
     possibilities for C escapes (such as being followed by digits)
     have no effect on where the containing expression ends.

@{b}<@{ub}
     The class of comment-starting characters.  Only single-character
     comment starters (such as @{b};@{ub} in Lisp mode) are represented this way.

@{b}>@{ub}
     The class of comment-ending characters.  Newline has this syntax in
     Lisp mode.

   The characters flagged as part of two-character comment delimiters
can have other syntactic functions most of the time.  For example, @{b}/@{ub} and
@{b}*@{ub} in C code, when found separately, have nothing to do with comments.
The comment-delimiter significance overrides when the pair of
characters occur together in the proper order.  Only the list and sexp
commands use the syntax table to find comments; the commands
specifically for comments have other variables that tell them where to
find comments.  And the list and sexp commands notice comments only if
@{b}parse-sexp-ignore-comments@{ub} is non-@{b}nil@{ub}.  This variable is set to @{b}nil@{ub} in
modes where comment-terminator sequences are liable to appear where
there is no comment; for example, in Lisp mode where the comment
terminator is a newline but not every newline ends a comment.


@EndNode

@Node "Syntax Change" "emacs/Syntax Change"
@Prev "Syntax Entry"
@Toc "Syntax"

Altering Syntax Information
---------------------------

   It is possible to alter a character's syntax table entry by storing
a new number in the appropriate element of the syntax table, but it
would be hard to determine what number to use.  Therefore, Emacs
provides a command that allows you to specify the syntactic properties
of a character in a convenient way.

   @{b}M-x modify-syntax-entry@{ub} is the command to change a character's
syntax.  It can be used interactively, and is also the means used by
major modes to initialize their own syntax tables.  Its first argument
is the character to change.  The second argument is a string that
specifies the new syntax.  When called from Lisp code, there is a
third, optional argument, which specifies the syntax table in which to
make the change.  If not supplied, or if this command is called
interactively, the third argument defaults to the current buffer's
syntax table.

  1. The first character in the string specifies the syntactic class.
     It is one of the characters in the previous table (see
     @{"Syntax Entry" Link "Syntax Entry"}).

  2. The second character is the matching delimiter.  For a character
     that is not an opening or closing delimiter, this should be a
     space, and may be omitted if no following characters are needed.

  3. The remaining characters are flags.  The flag characters allowed
     are

    @{b}1@{ub}
          Flag this character as the first of a two-character comment
          starting sequence.

    @{b}2@{ub}
          Flag this character as the second of a two-character comment
          starting sequence.

    @{b}3@{ub}
          Flag this character as the first of a two-character comment
          ending sequence.

    @{b}4@{ub}
          Flag this character as the second of a two-character comment
          ending sequence.

   A description of the contents of the current syntax table can be
displayed with @{b}C-h s@{ub} (@{b}describe-syntax@{ub}).  The description of each
character includes both the string you would have to give to
@{b}modify-syntax-entry@{ub} to set up that character's current syntax, and some
English to explain that string if necessary.


@EndNode

@Node "Init File" "emacs/Init File"
@Prev "Syntax"
@Toc "Customization"

The Init File, .emacs
=====================

   When Emacs is started, it normally loads the file @{b}.emacs@{ub} in your
home directory.  This file, if it exists, should contain Lisp code.  It
is called your @{i}init file@{ui}.  The command line switches @{b}-q@{ub} and @{b}-u@{ub} can be
used to tell Emacs whether to load an init file (see @{"Entering Emacs" Link "Entering Emacs"}).

   There can also be a @{i}default init file@{ui}, which is the library named
@{b}default.el@{ub}, found via the standard search path for libraries.  The
Emacs distribution contains no such library; your site may create one
for local customizations.  If this library exists, it is loaded
whenever you start Emacs.  But your init file, if any, is loaded first;
if it sets @{b}inhibit-default-init@{ub} non-@{b}nil@{ub}, then @{b}default@{ub} is not loaded.

   If you have a large amount of code in your @{b}.emacs@{ub} file, you should
move it into another file named @{b}@{i}something@{ui}.el@{ub}, byte-compile it (see
@{"Lisp Libraries" Link "Lisp Libraries"}), and make your @{b}.emacs@{ub} file load the other file using
@{b}load@{ub}.


 @{" Init Syntax " Link "Init Syntax"}      Syntax of constants in Emacs Lisp.
 @{" Init Examples " Link "Init Examples"}    How to do some things with an init file.
 @{" Terminal Init " Link "Terminal Init"}    Each terminal type can have an init file.
 @{" Debugging Init " Link "Debugging Init"}   How to debug your @{b}.emacs@{ub} file.


@EndNode

@Node "Init Syntax" "emacs/Init Syntax"
@Next "Init Examples"
@Prev "Init File"
@Toc "Init File"

Init File Syntax
----------------

   The @{b}.emacs@{ub} file contains one or more Lisp function call expressions.
Each of these consists of a function name followed by arguments, all
surrounded by parentheses.  For example, @{b}(setq fill-column 60)@{ub}
represents a call to the function @{b}setq@{ub} which is used to set the
variable @{b}fill-column@{ub} (see @{"Filling" Link "Filling"}) to 60.

   The second argument to @{b}setq@{ub} is an expression for the new value of
the variable.  This can be a constant, a variable, or a function call
expression.  In @{b}.emacs@{ub}, constants are used most of the time.  They can
be:

Numbers:
     Numbers are written in decimal, with an optional initial minus
     sign.

Strings:
     Lisp string syntax is the same as C string syntax with a few extra
     features.  Use a double-quote character to begin and end a string
     constant.

     Newlines and special characters may be present literally in
     strings.  They can also be represented as backslash sequences: @{b}\n@{ub}
     for newline, @{b}\b@{ub} for backspace, @{b}\r@{ub} for carriage return, @{b}\t@{ub} for tab,
     @{b}\f@{ub} for formfeed (control-l), @{b}\e@{ub} for escape, @{b}\\ @{ub} for a backslash,
     @{b}\"@{ub} for a double-quote, or @{b} \@{i}ooo@{ui}@{ub} for the character whose octal
     code is @{i}ooo@{ui}.  Backslash and double-quote are the only characters
     for which backslash sequences are mandatory.

     @{b}\C-@{ub} can be used as a prefix for a control character, as in @{b}\C-s@{ub}
     for ASCII Control-S, and @{b}\M-@{ub} can be used as a prefix for a meta
     character, as in @{b}\M-a@{ub} for Meta-A or @{b}\M-\C-a@{ub} for Control-Meta-A.

Characters:
     Lisp character constant syntax consists of a @{b}?@{ub} followed by either
     a character or an escape sequence starting with @{b}\ @{ub}.  Examples: @{b}?x@{ub},
     @{b}?\n@{ub}, @{b}?\"@{ub}, @{b}?\)@{ub}.  Note that strings and characters are not
     interchangeable in Lisp; some contexts require one and some
     contexts require the other.

True:
     @{b}t@{ub} stands for `true'.

False:
     @{b}nil@{ub} stands for `false'.

Other Lisp objects:
     Write a single-quote (') followed by the Lisp object you want.


@EndNode

@Node "Init Examples" "emacs/Init Examples"
@Next "Terminal Init"
@Prev "Init Syntax"
@Toc "Init File"

Init File Examples
------------------

   Here are some examples of doing certain commonly desired things with
Lisp expressions:

   @{b}*@{ub} Make TAB in C mode just insert a tab if point is in the middle of a
     line.

          (setq c-tab-always-indent nil)

     Here we have a variable whose value is normally @{b}t@{ub} for `true' and
     the alternative is @{b}nil@{ub} for `false'.

   @{b}*@{ub} Make searches case sensitive by default (in all buffers that do not
     override this).

          (setq-default case-fold-search nil)

     This sets the default value, which is effective in all buffers
     that do not have local values for the variable.  Setting
     @{b}case-fold-search@{ub} with @{b}setq@{ub} affects only the current buffer's local
     value, which is not what you probably want to do in an init file.

   @{b}*@{ub} Make Text mode the default mode for new buffers.

          (setq default-major-mode 'text-mode)

     Note that @{b}text-mode@{ub} is used because it is the command for entering
     the mode we want.  A single-quote is written before it to make a
     symbol constant; otherwise, @{b}text-mode@{ub} would be treated as a
     variable name.

   @{b}*@{ub} Turn on Auto Fill mode automatically in Text mode and related
     modes.

          (setq text-mode-hook
            '(lambda () (auto-fill-mode 1)))

     Here we have a variable whose value should be a Lisp function.  The
     function we supply is a list starting with @{b}lambda@{ub}, and a single
     quote is written in front of it to make it (for the purpose of this
     @{b}setq@{ub}) a list constant rather than an expression.  Lisp functions
     are not explained here, but for mode hooks it is enough to know
     that @{b}(auto-fill-mode 1)@{ub} is an expression that will be executed when
     Text mode is entered, and you could replace it with any other
     expression that you like, or with several expressions in a row.

          (setq text-mode-hook 'turn-on-auto-fill)

     This is another way to accomplish the same result.
     @{b}turn-on-auto-fill@{ub} is a symbol whose function definition is @{b}(lambda
     () (auto-fill-mode 1))@{ub}.

   @{b}*@{ub} Load the installed Lisp library named @{b}foo@{ub} (actually a file @{b}foo.elc@{ub}
     or @{b}foo.el@{ub} in a standard Emacs directory).

          (load "foo")

     When the argument to @{b}load@{ub} is a relative pathname, not starting
     with @{b}/@{ub} or @{b}~@{ub}, @{b}load@{ub} searches the directories in @{b}load-path@{ub} (see
     @{"Loading" Link "Loading"}).

   @{b}*@{ub} Load the compiled Lisp file @{b}foo.elc@{ub} from your home directory.

          (load "~/foo.elc")

     Here an absolute file name is used, so no searching is done.

   @{b}*@{ub} Rebind the key @{b}C-x l@{ub} to run the function @{b}make-symbolic-link@{ub}.

          (global-set-key "\C-xl" 'make-symbolic-link)

     or

          (define-key global-map "\C-xl" 'make-symbolic-link)

     Note once again the single-quote used to refer to the symbol
     @{b}make-symbolic-link@{ub} instead of its value as a variable.

   @{b}*@{ub} Do the same thing for C mode only.

          (define-key c-mode-map "\C-xl" 'make-symbolic-link)

   @{b}*@{ub} Redefine all keys which now run @{b}next-line@{ub} in Fundamental mode so
     that they run @{b}forward-line@{ub} instead.

          (substitute-key-definition 'next-line 'forward-line
                                     global-map)

   @{b}*@{ub} Make @{b}C-x C-v@{ub} undefined.

          (global-unset-key "\C-x\C-v")

     One reason to undefine a key is so that you can make it a prefix.
     Simply defining @{b}C-x C-v @{i}anything@{ui}@{ub} would make @{b}C-x C-v@{ub} a prefix, but
     @{b}C-x C-v@{ub} must be freed of any non-prefix definition first.

   @{b}*@{ub} Make @{b}$@{ub} have the syntax of punctuation in Text mode.  Note the use
     of a character constant for @{b}$@{ub}.

          (modify-syntax-entry ?\$ "." text-mode-syntax-table)

   @{b}*@{ub} Enable the use of the command @{b}eval-expression@{ub} without confirmation.

          (put 'eval-expression 'disabled nil)


@EndNode

@Node "Terminal Init" "emacs/Terminal Init"
@Next "Debugging Init"
@Prev "Init Examples"
@Toc "Init File"

Terminal-specific Initialization
--------------------------------

   Each terminal type can have a Lisp library to be loaded into Emacs
when it is run on that type of terminal.  For a terminal type named
@{i}termtype@{ui}, the library is called @{b}term/@{i}termtype@{ui}@{ub} and it is found by
searching the directories @{b}load-path@{ub} as usual and trying the suffixes
@{b}.elc@{ub} and @{b}.el@{ub}.  Normally it appears in the subdirectory @{b}term@{ub} of the
directory where most Emacs libraries are kept.

   The usual purpose of the terminal-specific library is to define the
escape sequences used by the terminal's function keys using the library
@{b}keypad.el@{ub}.  See the file @{b}term/vt100.el@{ub} for an example of how this is
done.

   When the terminal type contains a hyphen, only the part of the name
before the first hyphen is significant in choosing the library name.
Thus, terminal types @{b}aaa-48@{ub} and @{b}aaa-30-rv@{ub} both use the library
@{b}term/aaa@{ub}.  The code in the library can use @{b}(getenv "TERM")@{ub} to find
the full terminal type name.

   The library's name is constructed by concatenating the value of the
variable @{b}term-file-prefix@{ub} and the terminal type.  Your @{b}.emacs@{ub} file can
prevent the loading of the terminal-specific library by setting
@{b}term-file-prefix@{ub} to @{b}nil@{ub}.

   The value of the variable @{b}term-setup-hook@{ub}, if not @{b}nil@{ub}, is called as
a function of no arguments at the end of Emacs initialization, after
both your @{b}.emacs@{ub} file and any terminal-specific library have been read
in.  You can set the value in the @{b}.emacs@{ub} file to override part of any
of the terminal-specific libraries and to define initializations for
terminals that do not have a library.


@EndNode

@Node "Debugging Init" "emacs/Debugging Init"
@Prev "Terminal Init"
@Toc "Init File"

Debugging Your @{b}.emacs@{ub} File
--------------------------

   Ordinarily, Emacs traps errors that occur while reading @{b}.emacs@{ub}.
This is convenient, most of the time, because it means you can still get
an Emacs in which you can edit.  But it causes inconvenience because
there is no way to enter the debugger if there is an error.

   But you can run the @{b}.emacs@{ub} file explicitly in an Emacs that is
already set up, and debug errors at that time.

     M-x set-variable
     debug-on-error
     t
     M-x load-file
     ~/.emacs

   In Emacs 19, use the @{b}-debug-init@{ub} option if you want errors in @{b}.emacs@{ub}
to enter the debugger.


@EndNode

@Node "Quitting" "emacs/Quitting"
@Next "Lossage"
@Prev "Customization"
@Toc "Main"

Quitting and Aborting
=====================

@{b}C-g@{ub}
     Quit.  Cancel running or partially typed command.

@{b}C-]@{ub}
     Abort innermost recursive editing level and cancel the command
     which invoked it (@{b}abort-recursive-edit@{ub}).

@{b}M-x top-level@{ub}
     Abort all recursive editing levels that are currently executing.

@{b}C-x u@{ub}
     Cancel an already-executed command, usually (@{b}undo@{ub}).

   There are two ways of cancelling commands which are not finished
executing: @{i}quitting@{ui} with @{b}C-g@{ub}, and @{i}aborting@{ui} with @{b}C-]@{ub} or @{b}M-x top-level@{ub}.
Quitting is cancelling a partially typed command or one which is
already running.  Aborting is getting out of a recursive editing level
and cancelling the command that invoked the recursive edit.

   Quitting with @{b}C-g@{ub} is used for getting rid of a partially typed
command, or a numeric argument that you don't want.  It also stops a
running command in the middle in a relatively safe way, so you can use
it if you accidentally give a command which takes a long time.  In
particular, it is safe to quit out of killing; either your text will
@{i}all@{ui} still be there, or it will @{i}all@{ui} be in the kill ring (or maybe
both).  Quitting an incremental search does special things documented
under searching; in general, it may take two successive @{b}C-g@{ub} characters
to get out of a search.  @{b}C-g@{ub} works by setting the variable @{b}quit-flag@{ub} to
@{b}t@{ub} the instant @{b}C-g@{ub} is typed; Emacs Lisp checks this variable frequently
and quits if it is non-@{b}nil@{ub}.  @{b}C-g@{ub} is only actually executed as a command
if it is typed while Emacs is waiting for input.

   If you quit twice in a row before the first @{b}C-g@{ub} is recognized, you
activate the "emergency escape" feature and return to the shell.  See
@{"Emergency Escape" Link "Emergency Escape"}.

   Aborting with @{b}C-]@{ub} (@{b}abort-recursive-edit@{ub}) is used to get out of a
recursive editing level and cancel the command which invoked it.
Quitting with @{b}C-g@{ub} does not do this, and could not do this, because it
is used to cancel a partially typed command @{i}within@{ui} the recursive
editing level.  Both operations are useful.  For example, if you are in
the Emacs debugger (see @{"Lisp Debug" Link "Lisp Debug"}) and have typed @{b}C-u 8@{ub} to enter a
numeric argument, you can cancel that argument with @{b}C-g@{ub} and remain in
the debugger.

   The command @{b}M-x top-level@{ub} is equivalent to "enough" @{b}C-]@{ub} commands to
get you out of all the levels of recursive edits that you are in.  @{b}C-]@{ub}
gets you out one level at a time, but @{b}M-x top-level@{ub} goes out all levels
at once.  Both @{b}C-]@{ub} and @{b}M-x top-level@{ub} are like all other commands, and
unlike @{b}C-g@{ub}, in that they are effective only when Emacs is ready for a
command.  @{b}C-]@{ub} is an ordinary key and has its meaning only because of
its binding in the keymap.  See @{"Recursive Edit" Link "Recursive Edit"}.

   @{b}C-x u@{ub} (@{b}undo@{ub}) is not strictly speaking a way of cancelling a command,
but you can think of it as cancelling a command already finished
executing.  See @{"Undo" Link "Undo"}.


@EndNode

@Node "Lossage" "emacs/Lossage"
@Next "Bugs"
@Prev "Quitting"
@Toc "Main"

Dealing with Emacs Trouble
==========================

   This section describes various conditions in which Emacs fails to
work, and how to recognize them and correct them.


 @{" Stuck Recursive " Link "Stuck Recursive"}     `[...]' in mode line around the parentheses
 @{" Screen Garbled " Link "Screen Garbled"}      Garbage on the screen
 @{" Text Garbled " Link "Text Garbled"}        Garbage in the text
 @{" Unasked-for Search " Link "Unasked-for Search"}  Spontaneous entry to incremental search
 @{" Emergency Escape " Link "Emergency Escape"}    Emergency escape--
                        What to do if Emacs stops responding
 @{" Total Frustration " Link "Total Frustration"}   When you are at your wits' end.


@EndNode

@Node "Stuck Recursive" "emacs/Stuck Recursive"
@Next "Screen Garbled"
@Prev "Lossage"
@Toc "Lossage"

Recursive Editing Levels
------------------------

   Recursive editing levels are important and useful features of Emacs,
but they can seem like malfunctions to the user who does not understand
them.

   If the mode line has square brackets @{b} [...]@{ub} around the parentheses
that contain the names of the major and minor modes, you have entered a
recursive editing level.  If you did not do this on purpose, or if you
don't understand what that means, you should just get out of the
recursive editing level.  To do so, type @{b}M-x top-level@{ub}.  This is called
getting back to top level.  See @{"Recursive Edit" Link "Recursive Edit"}.


@EndNode

@Node "Screen Garbled" "emacs/Screen Garbled"
@Next "Text Garbled"
@Prev "Stuck Recursive"
@Toc "Lossage"

Garbage on the Screen
---------------------

   If the data on the screen looks wrong, the first thing to do is see
whether the text is really wrong.  Type @{b}C-l@{ub}, to redisplay the entire
screen.  If it appears correct after this, the problem was entirely in
the previous screen update.

   Display updating problems often result from an incorrect termcap
entry for the terminal you are using.  The file @{b}etc/TERMS@{ub} in the Emacs
distribution gives the fixes for known problems of this sort.  @{b}INSTALL@{ub}
contains general advice for these problems in one of its sections.
Very likely there is simply insufficient padding for certain display
operations.  To investigate the possibility that you have this sort of
problem, try Emacs on another terminal made by a different manufacturer.
If problems happen frequently on one kind of terminal but not another
kind, it is likely to be a bad termcap entry, though it could also be
due to a bug in Emacs that appears for terminals that have or that lack
specific features.


@EndNode

@Node "Text Garbled" "emacs/Text Garbled"
@Next "Unasked-for Search"
@Prev "Screen Garbled"
@Toc "Lossage"

Garbage in the Text
-------------------

   If @{b}C-l@{ub} shows that the text is wrong, try undoing the changes to it
using @{b}C-x u@{ub} until it gets back to a state you consider correct.  Also
try @{b}C-h l@{ub} to find out what command you typed to produce the observed
results.

   If a large portion of text appears to be missing at the beginning or
end of the buffer, check for the word @{b}Narrow@{ub} in the mode line.  If it
appears, the text is still present, but marked off-limits.  To make it
visible again, type @{b}C-x w@{ub}.  See @{"Narrowing" Link "Narrowing"}.


@EndNode

@Node "Unasked-for Search" "emacs/Unasked-for Search"
@Next "Emergency Escape"
@Prev "Text Garbled"
@Toc "Lossage"

Spontaneous Entry to Incremental Search
---------------------------------------

   If Emacs spontaneously displays @{b}I-search:@{ub} at the bottom of the
screen, it means that the terminal is sending @{b}C-s@{ub} and @{b}C-q@{ub} according to
the poorly designed @{b}xon/xoff@{ub} "flow control" protocol.  You should try
to prevent this by putting the terminal in a mode where it will not use
flow control or giving it enough padding that it will never send a @{b}C-s@{ub}.
If that cannot be done, you must tell Emacs to expect flow control to
be used, until you can get a properly designed terminal.

   Information on how to do these things can be found in the file
@{b}INSTALL@{ub} in the Emacs distribution.


@EndNode

@Node "Emergency Escape" "emacs/Emergency Escape"
@Next "Total Frustration"
@Prev "Unasked-for Search"
@Toc "Lossage"

Emergency Escape
----------------

   Because at times there have been bugs causing Emacs to loop without
checking @{b}quit-flag@{ub}, a special feature causes Emacs to be suspended
immediately if you type a second @{b}C-g@{ub} while the flag is already set, so
you can always get out of GNU Emacs.  Normally Emacs recognizes and
clears @{b}quit-flag@{ub} (and quits!) quickly enough to prevent this from
happening.

   When you resume Emacs after a suspension caused by multiple @{b}C-g@{ub}, it
asks two questions before going back to what it had been doing:

     Auto-save? (y or n)
     Abort (and dump core)? (y or n)

Answer each one with @{b}y@{ub} or @{b}n@{ub} followed by RET.

   Saying @{b}y@{ub} to @{b}Auto-save?@{ub} causes immediate auto-saving of all modified
buffers in which auto-saving is enabled.

   Saying @{b}y@{ub} to @{b}Abort (and dump core)?@{ub} causes an illegal instruction to
be executed, dumping core.  This is to enable a wizard to figure out
why Emacs was failing to quit in the first place.  Execution does not
continue after a core dump.  If you answer @{b}n@{ub}, execution does continue.
With luck, GNU Emacs will ultimately check @{b}quit-flag@{ub} and quit normally.
If not, and you type another @{b}C-g@{ub}, it is suspended again.

   If Emacs is not really hung, just slow, you may invoke the double
@{b}C-g@{ub} feature without really meaning to.  Then just resume and answer
@{b}n@{ub} to both questions, and you will arrive at your former state.
Presumably the quit you requested will happen soon.

   The double-@{b}C-g@{ub} feature may be turned off when Emacs is running under
a window system, since the window system always enables you to kill
Emacs or to create another window and run another program.


@EndNode

@Node "Total Frustration" "emacs/Total Frustration"
@Prev "Emergency Escape"
@Toc "Lossage"

Help for Total Frustration
--------------------------

   If using Emacs (or something else) becomes terribly frustrating and
none of the techniques described above solve the problem, Emacs can
still help you.

   First, if the Emacs you are using is not responding to commands, type
@{b}C-g C-g@{ub} to get out of it and then start a new one.

   Second, type @{b}M-x doctor RET@{ub}.

   The doctor will make you feel better.  Each time you say something to
the doctor, you must end it by typing RET RET.  This lets the doctor know
you are finished.


@EndNode

@Node "Bugs" "emacs/Bugs"
@Next "Version 19"
@Prev "Lossage"
@Toc "Main"

Reporting Bugs
==============

   Sometimes you will encounter a bug in Emacs.  Although we cannot
promise we can or will fix the bug, and we might not even agree that it
is a bug, we want to hear about bugs you encounter in case we do want
to fix them.

   To make it possible for us to fix a bug, you must report it.  In
order to do so effectively, you must know when and how to do it.

When Is There a Bug
-------------------

   If Emacs executes an illegal instruction, or dies with an operating
system error message that indicates a problem in the program (as
opposed to something like "disk full"), then it is certainly a bug.

   If Emacs updates the display in a way that does not correspond to
what is in the buffer, then it is certainly a bug.  If a command seems
to do the wrong thing but the problem corrects itself if you type @{b}C-l@{ub},
it is a case of incorrect display updating.

   Taking forever to complete a command can be a bug, but you must make
certain that it was really Emacs's fault.  Some commands simply take a
long time.  Type @{b}C-g@{ub} and then @{b}C-h l@{ub} to see whether the input Emacs
received was what you intended to type; if the input was such that you
@{i}know@{ui} it should have been processed quickly, report a bug.  If you don't
know whether the command should take a long time, find out by looking
in the manual or by asking for assistance.

   If a command you are familiar with causes an Emacs error message in a
case where its usual definition ought to be reasonable, it is probably a
bug.

   If a command does the wrong thing, that is a bug.  But be sure you
know for certain what it ought to have done.  If you aren't familiar
with the command, or don't know for certain how the command is supposed
to work, then it might actually be working right.  Rather than jumping
to conclusions, show the problem to someone who knows for certain.

   Finally, a command's intended definition may not be best for editing
with.  This is a very important sort of problem, but it is also a
matter of judgment.  Also, it is easy to come to such a conclusion out
of ignorance of some of the existing features.  It is probably best not
to complain about such a problem until you have checked the
documentation in the usual ways, feel confident that you understand it,
and know for certain that what you want is not available.  If you are
not sure what the command is supposed to do after a careful reading of
the manual, check the index and glossary for any terms that may be
unclear.  If you still do not understand, this indicates a bug in the
manual.  The manual's job is to make everything clear.  It is just as
important to report documentation bugs as program bugs.

   If the on-line documentation string of a function or variable
disagrees with the manual, one of them must be wrong, so report the bug.

How to Report a Bug
-------------------

   When you decide that there is a bug, it is important to report it
and to report it in a way which is useful.  What is most useful is an
exact description of what commands you type, starting with the shell
command to run Emacs, until the problem happens.  Always include the
version number of Emacs that you are using; type @{b}M-x emacs-version@{ub} to
print this.

   The most important principle in reporting a bug is to report @{i}facts@{ui},
not hypotheses or categorizations.  It is always easier to report the
facts, but people seem to prefer to strain to posit explanations and
report them instead.  If the explanations are based on guesses about
how Emacs is implemented, they will be useless; we will have to try to
figure out what the facts must have been to lead to such speculations.
Sometimes this is impossible.  But in any case, it is unnecessary work
for us.

   For example, suppose that you type @{b}C-x C-f /glorp/baz.ugh RET@{ub},
visiting a file which (you know) happens to be rather large, and Emacs
prints out @{b}I feel pretty today@{ub}.  The best way to report the bug is with
a sentence like the preceding one, because it gives all the facts and
nothing but the facts.

   Do not assume that the problem is due to the size of the file and
say, "When I visit a large file, Emacs prints out @{b}I feel pretty today@{ub}."
This is what we mean by "guessing explanations".  The problem is just as
likely to be due to the fact that there is a @{b}z@{ub} in the file name.  If
this is so, then when we got your report, we would try out the problem
with some "large file", probably with no @{b}z@{ub} in its name, and not find
anything wrong.  There is no way in the world that we could guess that
we should try visiting a file with a @{b}z@{ub} in its name.

   Alternatively, the problem might be due to the fact that the file
starts with exactly 25 spaces.  For this reason, you should make sure
that you inform us of the exact contents of any file that is needed to
reproduce the bug.  What if the problem only occurs when you have typed
the @{b}C-x C-a@{ub} command previously?  This is why we ask you to give the
exact sequence of characters you typed since starting to use Emacs.

   You should not even say "visit a file" instead of @{b}C-x C-f@{ub} unless you
@{i}know@{ui} that it makes no difference which visiting command is used.
Similarly, rather than saying "if I have three characters on the line,"
say "after I type @{b}RET A B C@{ub} RET C-p," if that is the way you entered
the text.

   If you are not in Fundamental mode when the problem occurs, you
should say what mode you are in.

   If the manifestation of the bug is an Emacs error message, it is
important to report not just the text of the error message but a
backtrace showing how the Lisp program in Emacs arrived at the error.
To make the backtrace, you must execute the Lisp expression @{b}(setq
debug-on-error t)@{ub} before the error happens (that is to say, you must
execute that expression and then make the bug happen).  This causes the
Lisp debugger to run (see @{"Lisp Debug" Link "Lisp Debug"}).  The debugger's backtrace can be
copied as text into the bug report.  This use of the debugger is
possible only if you know how to make the bug happen again.  Do note
the error message the first time the bug happens, so if you can't make
it happen again, you can report at least that.

   Check whether any programs you have loaded into the Lisp world,
including your @{b}.emacs@{ub} file, set any variables that may affect the
functioning of Emacs.  Also, see whether the problem happens in a
freshly started Emacs without loading your @{b}.emacs@{ub} file (start Emacs
with the @{b}-q@{ub} switch to prevent loading the init file.)  If the problem
does @{i}not@{ui} occur then, it is essential that we know the contents of any
programs that you must load into the Lisp world in order to cause the
problem to occur.

   If the problem does depend on an init file or other Lisp programs
that are not part of the standard Emacs system, then you should make
sure it is not a bug in those programs by complaining to their
maintainers first.  After they verify that they are using Emacs in a
way that is supposed to work, they should report the bug.

   If you can tell us a way to cause the problem without visiting any
files, please do so.  This makes it much easier to debug.  If you do
need files, make sure you arrange for us to see their exact contents.
For example, it can often matter whether there are spaces at the ends
of lines, or a newline after the last line in the buffer (nothing ought
to care whether the last line is terminated, but tell that to the bugs).

   The easy way to record the input to Emacs precisely is to write a
dribble file; execute the Lisp expression

     (open-dribble-file "~/dribble")

using @{b}Meta-ESC@{ub} or from the @{b}*scratch*@{ub} buffer just after starting Emacs.
From then on, all Emacs input will be written in the specified dribble
file until the Emacs process is killed.

   For possible display bugs, it is important to report the terminal
type (the value of environment variable @{b}TERM@{ub}), the complete termcap
entry for the terminal from @{b}/etc/termcap@{ub} (since that file is not
identical on all machines), and the output that Emacs actually sent to
the terminal.  The way to collect this output is to execute the Lisp
expression

     (open-termscript "~/termscript")

using @{b}Meta-ESC@{ub} or from the @{b}*scratch*@{ub} buffer just after starting Emacs.
From then on, all output from Emacs to the terminal will be written in
the specified termscript file as well, until the Emacs process is
killed.  If the problem happens when Emacs starts up, put this
expression into your @{b}.emacs@{ub} file so that the termscript file will be
open when Emacs displays the screen for the first time.  Be warned: it
is often difficult, and sometimes impossible, to fix a
terminal-dependent bug without access to a terminal of the type that
stimulates the bug.

   The address for reporting bugs is

GNU Emacs Bugs
Free Software Foundation
675 Mass Ave
Cambridge, MA 02139

or send email either to @{b}bug-gnu-emacs@prep.ai.mit.edu@{ub} (Internet) or to
@{b}uunet!prep.ai.mit.edu!bug-gnu-emacs@{ub} (Usenet).

   Once again, we do not promise to fix the bug; but if the bug is
serious, or ugly, or easy to fix, chances are we will want to.


@EndNode

@Node "Version 19" "emacs/Version 19"
@Next "Manifesto"
@Prev "Bugs"
@Toc "Main"

Version 19 Antenews
*******************

   This chapter prematurely describes new features of Emacs 19, in
anticipation of its release.  We have included this so that the version
18 manuals don't become obsolete as soon as Emacs 19 comes out.  This
list mentions only features that would belong in `The GNU Emacs
Manual'; changes relevant to Emacs Lisp programming will be documented
in the next revision of `The GNU Emacs Lisp Manual'.


 @{" Basic Changes " Link "Basic Changes"} 	  Changes every user must know.
 @{" New Facilities " Link "New Facilities"} 	  Changes every user will want to know.
 @{" Binding Changes " Link "Binding Changes"} 	  Ordinary commands that have been moved.  Important!.
 @{" Changed Commands " Link "Changed Commands"} 	  Ordinary commands that have new features.  Important!
 @{" M-x Changes " Link "M-x Changes"} 		  Changes in commands you run with @{b}M-x@{ub}.  Important!
 @{" New Commands " Link "New Commands"} 	  Commands that have been added
			    that we expect many users to want to use.
 @{" Search Changes " Link "Search Changes"} 	  Changes in incremental search.  Some are important.

The rest of the changes you can pretty much ignore unless you are interested.

 @{" Filling Changes " Link "Filling Changes"} 	  Changes in fill commands.
 @{" TeX Mode Changes " Link "TeX Mode Changes"} 	  Changes in the commands for editing TeX files
			    and running TeX.
 @{" Shell Changes " Link "Shell Changes"} 	  Major changes in all the modes that run subprograms.
 @{" Spell Changes " Link "Spell Changes"} 	  These commands now use ispell instead of spell.
 @{" Tags Changes " Link "Tags Changes"} 	  Changes in Tags facility.
 @{" Mail Changes " Link "Mail Changes"} 	  Changes in both Sendmail mode and Rmail mode.
 @{" Info Changes " Link "Info Changes"} 	  New commands in Info.
 @{" Dired Changes " Link "Dired Changes"} 	  Powerful new features in Dired.
 @{" GNUS " Link "GNUS"} 		  An alternative news reader.
 @{" Calendar-Diary " Link "Calendar-Diary"} 	  The calendar feature now lets you move to different
			    dates and convert to and from other calendars.
			  You can also display related entries from your diary
			    file.
 @{" Version Control " Link "Version Control"} 	  A convenient interface to RCS or SCCS.
 @{" Emerge " Link "Emerge"} 		  A new feature for merging files interactively.
 @{" Debuggers " Link "Debuggers"} 		  Running debuggers (GDB, DBX, SDB) under Emacs.
 @{" Other New Modes " Link "Other New Modes"} 	  Miscellaneous new and changed major modes.
 @{" Key Sequence Changes " Link "Key Sequence Changes"}   You can now bind key sequences that include function
			    keys and mouse clicks.
 @{" Hook Changes " Link "Hook Changes"} 	  Hook variables have been renamed more systematically.


@EndNode

@Node "Basic Changes" "emacs/Basic Changes"
@Next "New Facilities"
@Toc "Version 19"

Basic Changes
=============

   We have made changes to help Emacs use fewer resources and make it
less likely to become irreparably hung.  While these changes don't
alter the commands of Emacs, they are important enough to be worth
mentioning.

   You can quit with @{b}C-g@{ub} while Emacs is waiting to read or write a
file--provided the operating system will allow you to interrupt the
system call that is hung.  (Unfortunately, most NFS implementations
won't allow interruption.)

   When you kill buffers, Emacs now returns memory to the operating
system, thus reducing the size of the Emacs process.  The space that
you free up by killing buffers can now be reused for other buffers no
matter what their sizes, or reused by other processes if Emacs doesn't
need it.

Multiple X Windows
------------------

   When using X windows, you can now create more than one window at the
X level.  Each X window displays a @{i}frame@{ui} which can contain one or
several Emacs windows.  Each frame has its own echo area and normally
its own minibuffer.  (To avoid confusion, we reserve the word "window"
for the subdivisions that Emacs implements, and never use it to refer
to a frame.)  The easiest way to create additional frames is with the
@{b}C-x 5@{ub} prefix character (see @{"New Everyday Commands" Link "New Commands"}).

   Emacs windows can now have scroll bars; use the @{b}scroll-bar-mode@{ub}
command to turn scroll bars on or off.  With no argument, it toggles the
use of scroll bars.  With an argument, it turns use of scroll bars on if
and only if the argument is positive.  This command applies to all
frames, including frames yet to be created.  (You can control scroll
bars on a frame by frame basis by writing a Lisp program.)

Undo Improvements
-----------------

   Undoing a deletion now puts the cursor position where it was just
before the deletion.

Auto Save Improvements
----------------------

   Emacs now does garbage collection and auto saving while it is waiting
for input, which often avoids the need to do these things while you are
typing.  The variable @{b}auto-save-timeout@{ub} says how many seconds Emacs
should wait, after you stop typing, before it does an auto save and
perhaps also a garbage collection.  (The actual time period varies also
according to the size of the buffer--longer for longer buffers, since
auto saving itself is slower for long buffers.)  This way, Emacs does
not interrupt or delay your typing.

   In Emacs 18, when auto saving detects that a buffer has shrunk
greatly, it refrains from auto saving that buffer and displays a
warning.  In version 19, it also turns off Auto Save mode in that
buffer, so that you won't get the same warning repeatedly.  If you
reenable Auto Save mode in that buffer, Emacs will start saving it
again despite the shrinkage.

   In Emacs 19, @{b}revert-buffer@{ub} no longer offers to revert from the
latest auto-save file.  That option hasn't been very useful since the
change to keep more undo information.

   The command @{b}recover-file@{ub} no longer turns off Auto Save mode.

File Local Variables
--------------------

   The user option for controlling whether files can set local
variables is called @{b}enable-local-variables@{ub} in Emacs 19, rather than
@{b}inhibit-local-variables@{ub}.  A value of @{b}t@{ub} means local-variables lists are
obeyed; @{b}nil@{ub} means they are ignored; anything else means query the user.


@EndNode

@Node "New Facilities" "emacs/New Facilities"
@Next "Binding Changes"
@Prev "Basic Changes"
@Toc "Version 19"

New Basic Facilities
====================

   You can now get back recent minibuffer inputs conveniently.  While in
the minibuffer, type @{b}M-p@{ub} (@{b}previous-history-element@{ub}) to fetch the next
earlier minibuffer input, and use @{b}M-n@{ub} (@{b}next-history-element@{ub}) to fetch
the next later input.

   There are also commands to search forward or backward through the
history.  As of this writing, they search for history elements that
match a regular expression that you specify with the minibuffer.  @{b}M-r@{ub}
(@{b}previous-matching-history-element@{ub}) searches older elements in the
history, while @{b}M-s@{ub} (@{b}next-matching-history-element@{ub}) searches newer
elements.  By special dispensation, these commands can always use the
minibuffer to read their arguments even though you are already in the
minibuffer when you issue them.

   We may have changed the precise way these commands work by the time
you use Emacs 19.  Perhaps they will search for a match for the string
given so far in the minibuffer; perhaps they will search for a literal
match rather than a regular expression match; perhaps they will only
accept matches at the beginning of a history element; perhaps they will
read the string to search for incrementally like @{b}C-s@{ub}.  We want to choose an
interface that is convenient, flexible and natural, and these goals are
somewhat contradictory.  To find out what interface is actually
available, type @{b}C-h f previous-matching-history-element@{ub}.

   The history feature is available for all uses of the minibuffer, but
there are separate history lists for different kinds of input.  For
example, there is a list for file names, used by all the commands that
read file names.  There is a list for arguments of commands like
@{b}query-replace@{ub}.  There are also very specific history lists, such as the
one that @{b}compile@{ub} uses for compilation commands.

Remote File Access
------------------

   You can refer to files on other machines using a special file name
syntax:

     /@{i}host@{ui}:@{i}filename@{ui}
     /@{i}user@{ui} @@{i}host@{ui}:@{i}filename@{ui}

   When you do this, Emacs uses the FTP program to read and write files
on the specified host.  It logs in through FTP using your user name or
the name @{i}user@{ui}.  It may ask you for a password from time to time; this
is used for logging in on @{i}host@{ui}.

Using Flow Control
------------------

   There is now a convenient way to enable flow control when your
terminal or your connection won't work without it.  Suppose you want to
do this on VT-100 and H19 terminals; put the following in your @{b}.emacs@{ub}
file:

     (evade-flow-control-on "vt100" "h19")

   When flow control is enabled, you must type @{b}C-\ @{ub} to get the effect
of a @{b}C-s@{ub}, and type @{b}C-^@{ub} to get the effect of a @{b}C-q@{ub}.

Controlling Backup File Names
-----------------------------

   The default setting of the Lisp variable @{b}version-control@{ub} now comes
from the environment variable @{b}VERSION_CONTROL@{ub}.  Thus, you can select a
style of backup file naming for Emacs and other GNU utilities all
together.


@EndNode

@Node "Binding Changes" "emacs/Binding Changes"
@Next "Changed Commands"
@Prev "New Facilities"
@Toc "Version 19"

Changed Key Bindings
====================

@{b}M-{@{ub}
     This is the new key sequence for @{b}backward-paragraph@{ub}.  The old key
     sequence for this, @{b}M-[@{ub}, is now undefined by default.

     The reason for this change is to avoid conflict with the sequences
     that function keys send on most terminals.

@{b}M-}@{ub}
     This is the new key sequence for @{b}forward-paragraph@{ub}.  The old key
     sequence for this, @{b}M-]@{ub}, is now undefined by default.

     We changed this to go along with @{b}M-{@{ub}.

@{b}C-x C-u@{ub}
@{b}C-x C-l@{ub}
     The two commands, @{b}C-x C-u@{ub} (@{b}upcase-region@{ub}) and @{b}C-x C-l@{ub}
     (@{b}downcase-region@{ub}), are now disabled by default; these keys
     seem to be often hit by accident, and can be quite destructive if
     their effects are not noticed immediately.

@{b}C-x 3@{ub}
     @{b}C-x 3@{ub} is now the key binding for @{b}split-window-horizontally@{ub}, which
     splits a window into two side-by-side windows.  This used to be
     @{b}C-x 5@{ub}.

@{b}@{b}C-x 4 C-o@{ub}@{ub}
     This key now runs @{b}display-buffer@{ub}, which displays a specified
     buffer in another window without selecting it.

@{b}M-g@{ub}
     @{b}M-g@{ub} is now undefined.  It used to run the command @{b}fill-region@{ub}.
     This command used to be run more often by mistake than on purpose.

@{b}C-x a@{ub}
@{b}C-x n@{ub}
@{b}C-x r@{ub}
     Three new prefix keys have been created to make many of the @{b}C-x@{ub}
     commands more systematic: @{b}C-x a@{ub}, @{b}C-x n@{ub} and @{b}C-x r@{ub}.  @{b}C-x a@{ub} is used
     for abbreviation commands, @{b}C-x n@{ub} for commands pertaining to
     narrowing, and @{b}C-x r@{ub} for register and rectangle commands.  These
     are the new bindings, in detail:

    @{b}C-x a l@{ub}
          @{b}add-mode-abbrev@{ub} (previously @{b}C-x C-a@{ub}).

    @{b}C-x a g@{ub}
          @{b}add-global-abbrev@{ub} (previously @{b}C-x +@{ub}).

    @{b}C-x a i g@{ub}
          @{b}inverse-add-mode-abbrev@{ub} (previously @{b}C-x C-h@{ub}).

    @{b}C-x a i l@{ub}
          @{b}inverse-add-global-abbrev@{ub} (previously @{b}C-x -@{ub}).

    @{b}C-x a e@{ub}
          @{b}expand-abbrev@{ub} (previously @{b}C-x '@{ub}).

    @{b}C-x n n@{ub}
          @{b}narrow-to-region@{ub} (previously @{b}C-x n@{ub}).

    @{b}C-x n p@{ub}
          @{b}narrow-to-page@{ub} (previously @{b}C-x p@{ub}).

    @{b}C-x n w@{ub}
          @{b}widen@{ub} (previously @{b}C-x w@{ub}).

    @{b}C-x r C-SPC@{ub}
          @{b}point-to-register@{ub} (previously @{b}C-x /@{ub}).

    @{b}C-x r SPC@{ub}
          Also @{b}point-to-register@{ub} (previously @{b}C-x /@{ub}).

    @{b}C-x r j@{ub}
          @{b}jump-to-register@{ub} (previously @{b}C-x j@{ub}).

    @{b}C-x r s@{ub}
          @{b}copy-to-register@{ub} (previously @{b}C-x x@{ub}).

    @{b}C-x r i@{ub}
          @{b}insert-register@{ub} (previously @{b}C-x g@{ub}).

    @{b}C-x r r@{ub}
          @{b}copy-rectangle-to-register@{ub} (previously @{b}C-x r@{ub}).

    @{b}C-x r k@{ub}
          @{b}kill-rectangle@{ub} (no previous key binding).

    @{b}C-x r y@{ub}
          @{b}yank-rectangle@{ub} (no previous key binding).

    @{b}C-x r o@{ub}
          @{b}open-rectangle@{ub} (no previous key binding).

    @{b}C-x r f@{ub}
          @{b}frame-configuration-to-register@{ub} (a new command) saves the
          state of all windows in all frames.  Use @{b}C-x r j@{ub} to restore
          the configuration.

    @{b}C-x r w@{ub}
          @{b}window-configuration-to-register@{ub} (a new command) saves the
          state of all windows in the selected  frame.  Use @{b}C-x r j@{ub} to
          restore the configuration.

     The old key bindings @{b}C-x /@{ub}, @{b}C-x j@{ub}, @{b}C-x x@{ub} and @{b}C-x g@{ub} have not yet
     been removed.  The other old key bindings listed have been
     removed.  The old key binding @{b}C-x a@{ub}, which was @{b}append-to-buffer@{ub},
     was removed to make way for a prefix key; now @{b}append-to-buffer@{ub} has
     no keybinding.

@{b}C-x v@{ub}
     @{b}C-x v@{ub} is a new prefix character, used for version control commands.
     See @{"Version Control" Link "Version Control"}.


@EndNode

@Node "Changed Commands" "emacs/Changed Commands"
@Next "M-x Changes"
@Prev "Binding Changes"
@Toc "Version 19"

Changed Everyday Commands
=========================

@{b}C-o@{ub}
     When you have a fill prefix, the command @{b}C-o@{ub} inserts the prefix on
     the newly created line.

@{b}M-^@{ub}
     When you have a fill prefix, the command @{b}M-^@{ub} deletes the prefix
     (if it occurs) after the newline that it deletes.

@{b}M-z@{ub}
     The @{b}M-z@{ub} command (@{b}zap-to-char@{ub}) now kills through the target
     character.  In version 18, it killed up to but not including the
     target character.

@{b}M-!@{ub}
     The command @{b}M-!@{ub} (@{b}shell-command@{ub}) now runs the specified shell
     command asynchronously if it ends in @{b}&@{ub}, just as the shell does.

@{b}C-x 2@{ub}
     The @{b}C-x 2@{ub} command (@{b}split-window-vertically@{ub}) now tries to avoid
     scrolling by putting point in whichever window happens to contain
     the screen line the cursor is already on.  If you don't like this,
     you can turn it off by setting @{b}split-window-keep-point@{ub} to @{b}nil@{ub}.

@{b}C-x s@{ub}
     The @{b}C-x s@{ub} command (@{b}save-some-buffers@{ub}) now gives you more options
     when it asks whether to save a particular buffer.  The options are
     analogous to those of @{b}query-replace@{ub}.  Here they are:

    @{b}y@{ub}
          Save this buffer and ask about the rest of the buffers.

    @{b}n@{ub}
          Don't save this buffer, but ask about the rest of the buffers.

    @{b}!@{ub}
          Save this buffer and all the rest with no more questions.

    @{b}ESC@{ub}
          Terminate @{b}save-some-buffers@{ub} without any more saving.

    @{b}.@{ub}
          Save only this buffer, then exit @{b}save-some-buffers@{ub} without
          even asking about other buffers.

    @{b}C-r@{ub}
          View the buffer that you are currently being asked about.
          When you exit View mode, you get back to @{b}save-some-buffers@{ub},
          which asks the question again.

    @{b}C-h@{ub}
          Display a help message about these options.

@{b}C-x C-v@{ub}
     This command (@{b}find-alternate-file@{ub}) now inserts the entire current
     file name in the minibuffer.  This is convenient if you made a
     small mistake in typing it.  Point goes after the last slash,
     before the last file name component, so if you want to replace it
     entirely, you can use @{b}C-k@{ub} right away to delete it.

@{b}C-M-f@{ub}
     Expression and list commands such as @{b}C-M-f@{ub} now ignore parentheses
     within comments in Lisp mode.


@EndNode

@Node "M-x Changes" "emacs/M-x Changes"
@Next "New Commands"
@Prev "Changed Commands"
@Toc "Version 19"

Changes in Common @{b}M-x@{ub} Commands
==============================

@{b}M-x make-symbolic-link@{ub}
     This command now does not expand its second argument.  This lets
     you make a link with a target that is a relative file name.

@{b}M-x add-change-log-entry@{ub}
@{b}C-x 4 a@{ub}
     These commands now automatically insert the name of the file and
     often the name of the function that you changed.  They also handle
     grouping of entries.

     There is now a special major mode for editing @{b}ChangeLog@{ub} files.  It
     makes filling work conveniently.  Each bunch of grouped entries is
     one paragraph, and each collection of entries from one person on
     one day is considered a page.

@{b}M-x compare-windows@{ub}
     With a prefix argument, @{b}compare-windows@{ub} ignores changes in
     whitespace.  If the variable @{b}compare-ignore-case@{ub} is non-@{b}nil@{ub}, it
     ignores differences in case as well.

@{b}M-x view-buffer@{ub}
@{b}M-x view-file@{ub}
     The View commands (such as @{b}M-x view-buffer@{ub} and @{b}M-x view-file@{ub}) no
     longer use recursive edits; instead, they switch temporarily to a
     different major mode (View mode) specifically designed for moving
     around through a buffer without editing it.

@{b}M-x manual-entry@{ub}
     @{b}M-x manual-entry@{ub} now uses View mode for the buffer showing the man
     page.

@{b}M-x compile@{ub}
     You can repeat any previous @{b}compile@{ub} conveniently using the
     minibuffer history commands, while in the minibuffer entering the
     compilation command.

     While a compilation is going on, the string @{b}Compiling@{ub} appears in
     the mode line.  When this string disappears, the compilation is
     finished.

     The buffer of compiler messages is in Compilation mode.  This mode
     provides the keys SPC and DEL to scroll by screenfuls, and @{b}M-n@{ub} and
     @{b}M-p@{ub} to move to the next or previous error message.  You can also
     use @{b}M-{@{ub} and @{b}M-}@{ub} to move up or down to an error message for a
     different source file.  Use @{b}C-c C-c@{ub} on any error message to find
     the corresponding source code.

     Emacs 19 has a more general parser for compiler messages.  For
     example, it can understand messages from lint, and from certain C
     compilers whose error message format is unusual.


@EndNode

@Node "New Commands" "emacs/New Commands"
@Next "Search Changes"
@Prev "M-x Changes"
@Toc "Version 19"

New Everyday Commands
=====================

@{b}C-z@{ub}
     When you are using X windows, @{b}C-z@{ub} (@{b}iconify-frame@{ub}) now iconifies
     the current frame.

@{b}C-M-l@{ub}
     The @{b}C-M-l@{ub} command (@{b}reposition-window@{ub}) scrolls the current window
     heuristically in a way designed to get useful information onto the
     screen.  For example, in a Lisp file, this command tries to get the
     entire current defun onto the screen if possible.

@{b}C-M-r@{ub}
     The @{b}C-M-r@{ub} key now runs the command @{b}isearch-backward-regexp@{ub}, which
     does reverse incremental regexp search.

@{b}C-x 5@{ub}
     The prefix key @{b}C-x 5@{ub} is analogous to @{b}C-x 4@{ub}, with parallel
     subcommands.  The difference is that @{b}C-x 5@{ub} commands create a new
     frame rather than just a new window.

@{b}C-x 5 C-f@{ub}
@{b}C-x 5 b@{ub}
     These new commands switch to a specified file or buffer in a new
     frame (when using X windows).  The commands' names are
     @{b}find-file-other-frame@{ub} and @{b}switch-to-buffer-other-frame@{ub}.

@{b}C-x 5 m@{ub}
     Start outgoing mail in another frame (@{b}mail-other-frame@{ub}).

@{b}C-x 5 .@{ub}
     Find a tag in another frame (@{b}find-tag-other-frame@{ub}).

@{b}C-x 4 r@{ub}
     This is now @{b}find-file-read-only-other-window@{ub}.

arrow keys
     The arrow keys now have default bindings to move in the appropriate
     directions.

@{b}C-h C-f@{ub}
@{b}C-h C-k@{ub}
     These new help commands enter Info and display the node for a given
     Emacs function name or key sequence, respectively.

@{b}M-a@{ub}
@{b}M-e@{ub}
     In C mode, @{b}M-a@{ub} and @{b}M-e@{ub} now move by complete C statements
     (@{b}c-beginning-of-statement@{ub} and @{b}c-end-of-statement@{ub}).

@{b}M-q@{ub}
     @{b}M-q@{ub} in C mode now runs @{b}c-fill-paragraph@{ub}, which is designed for
     filling C comments.  (We assume you don't want to fill the actual C
     code in a C program.)

@{b}M-x c-up-conditional@{ub}
     In C mode, @{b}c-up-conditional@{ub} moves back to the containing
     preprocessor conditional, setting the mark where point was
     previously.

     A prefix argument acts as a repeat count.  With a negative
     argument, this command moves forward to the end of the containing
     preprocessor conditional.  When going backwards, @{b}#elif@{ub} acts like
     @{b}#else@{ub} followed by @{b}#if@{ub}.  When going forwards, @{b}#elif@{ub} is ignored.

@{b}M-x comment-region@{ub}
     The @{b}comment-region@{ub} command adds comment delimiters to the lines
     that start in the region, thus commenting them out.  With a
     negative argument, it deletes comment delimiters from the lines in
     the region--this is the inverse of the effect of @{b}comment-region@{ub}
     without an argument.

     With a positive argument, @{b}comment-region@{ub} adds comment delimiters
     but duplicates the last character of the comment start sequence as
     many times as the argument specifies.  This is a way of calling
     attention to the comment.  In Lisp, you should use an argument of
     at least two, because the indentation convention for single
     semicolon comments does not leave them at the beginning of a line.

@{b}M-x super-apropos@{ub}
     This command is like @{b}apropos@{ub} except that it searches for a regular
     expression instead of merely a substring.

     If you use a prefix argument (regardless of its value) with
     @{b}apropos@{ub} or @{b}super-apropos@{ub}, they also search documentation
     strings for matches as well as symbol names.  The prefix argument
     also controls looking up and printing the key bindings of all
     commands.

@{b}M-x diff@{ub}
     This new command compares two files, displaying the differences in
     an Emacs buffer.  The options for the @{b}diff@{ub} program come from the
     variable @{b}diff-switches@{ub}, whose value should be a string.

     The buffer of differences has Compilation mode as its major mode,
     so you can use @{b}C-x `@{ub} to visit successive changed locations in the
     two source files, or you can move to a particular hunk of changes
     and type @{b}C-c C-c@{ub} to move to the corresponding source.  You can
     also use the other special commands of Compilation mode: SPC and
     DEL for scrolling, and @{b}M-p@{ub} and @{b}M-n@{ub} for cursor motion.

@{b}M-x diff-backup@{ub}
     The command @{b}diff-backup@{ub} compares a specified file with its most
     recent backup.  If you specify the name of a backup file,
     @{b}diff-backup@{ub} compares it with the source file that it is a backup
     of.


@EndNode

@Node "Search Changes" "emacs/Search Changes"
@Next "Filling Changes"
@Prev "New Commands"
@Toc "Version 19"

Changes in Incremental Search
=============================

   The most important change in incremental search is that RET now
terminates a search, and ESC does not.  The other changes are useful,
but not vital to know about.

   @{b}*@{ub} The character to terminate an incremental search is now RET.  This
     is for compatibility with the way most other arguments are read.

     To search for a newline in an incremental search, type LFD (also
     known as @{b}C-j@{ub}).

     (This change is somewhat of an experiment; it might be taken back
     by the time Emacs 19 is really released.)

   @{b}*@{ub} Incremental search now maintains a ring of previous search
     strings.  Use @{b}M-p@{ub} and @{b}M-n@{ub} to move through the ring to pick a
     search string to reuse.  These commands leave the selected search
     ring element in the minibuffer, where you can edit it.  Type RET
     to finish editing and search for the chosen string.

   @{b}*@{ub} When there is an upper-case letter in the search string, then the
     search is case sensitive.

   @{b}*@{ub} Incremental search is now implemented as a major mode.  When you
     type @{b}C-s@{ub}, it switches temporarily to a different keymap which
     defines each key to do what it ought to do for incremental search.
     This has next to no effect on the user-visible behavior of
     searching, but makes it easier to customize that behavior.


@EndNode

@Node "Filling Changes" "emacs/Filling Changes"
@Next "TeX Mode Changes"
@Prev "Search Changes"
@Toc "Version 19"

Changes in Fill Commands
========================

   @{b}*@{ub}     @{b}fill-individual-paragraphs@{ub} now has two modes.  Its default mode
     is that any change in indentation starts a new paragraph.  The
     alternate mode is that only separator lines separate paragraphs;
     this can handle paragraphs with extra indentation on the first
     line.  To select the alternate mode, set
     @{b}fill-individual-varying-indent@{ub} to a non-@{b}nil@{ub} value.

   @{b}*@{ub} Filling is now partially controlled by a new minor mode, Adaptive
     Fill mode.  When this mode is enabled (and it is enabled by
     default), if you use @{b}fill-region-as-paragraph@{ub} on an indented
     paragraph and you don't have a fill prefix, it uses the
     indentation of the second line of the paragraph as the fill prefix.

     Adaptive Fill mode doesn't have much effect on @{b}M-q@{ub} in most major
     modes, because an indented line will probably count as a paragraph
     starter and thus each line of an indented paragraph will be
     considered a paragraph of its own.

   @{b}*@{ub}     @{b}M-q@{ub} in C mode now runs @{b}c-fill-paragraph@{ub}, which is designed for
     filling C comments.  (We assume you don't want to fill the actual C
     code in a C program.)


@EndNode

@Node "TeX Mode Changes" "emacs/TeX Mode Changes"
@Next "Shell Changes"
@Prev "Filling Changes"
@Toc "Version 19"

Changes in TeX Mode
===================

   The old TeX mode bindings of @{b}M-{@{ub} and @{b}M-}@{ub} have been moved to @{b}C-c {@{ub}
and @{b}C-c }@{ub}.  (These commands are @{b}up-list@{ub} and @{b}tex-insert-braces@{ub}; they are
the TeX equivalents of @{b}M-(@{ub} and @{b}M-)@{ub}.)

   The new command @{b}C-c C-o@{ub} (@{b}tex-latex-block@{ub}) inserts a matching
@{b}\begin@{ub}-@{b}\end@{ub} pair.  The new command @{b}C-c C-e@{ub}
(@{b}tex-close-latex-block@{ub}) inserts a matching @{b}\end@{ub} for the last
unterminated @{b}\begin@{ub}.

   You can run BibTeX on the current file using @{b}C-c TAB@{ub}
(@{b}tex-bibtex-file@{ub}).

   There is a new command @{b}C-c C-v@{ub} (@{b}tex-view@{ub}) for running a DVI
previewer.

   You can specify the directory to use for running TeX by setting the
variable @{b}tex-directory@{ub}.  @{b}"."@{ub} is the default value.  If your environment
variable @{b}TEXINPUTS@{ub} contains relative directory names, or if your files
contains @{b}\input@{ub} commands with relative file names, then @{b}tex-directory@{ub}
@{i}must@{ui} be @{b}"."@{ub} or you will get the wrong results.  Otherwise, it is safe
to specify some other directory, such as @{b}/tmp@{ub}.

   There is now a third variant of TeX mode, for SliTeX.  This is in
addition to the variants for plain TeX and LaTeX.  As before, the
correct variant is chosen automatically when you visit a file.


@EndNode

@Node "Shell Changes" "emacs/Shell Changes"
@Next "Spell Changes"
@Prev "TeX Mode Changes"
@Toc "Version 19"

Changes in Shell Mode
=====================

   Shell mode has been completely replaced with a new implementation.
The basic idea is the same: Emacs runs a subshell, and all input and
output to the subshell go through the shell buffer.  But the special
commands of Shell mode have been redesigned.

@{b}TAB@{ub}
     Complete the file name before point in the shell buffer
     (@{b}comint-dynamic-complete@{ub}).

@{b}M-?@{ub}
     To get a list of all possible completions of the file name before,
     type @{b}M-?@{ub}  (@{b}comint-dynamic-list-completions@{ub}).

@{b}M-p@{ub}
@{b}M-n@{ub}
     There is a new convenient history mechanism for repeating previous
     shell inputs.  Use the command @{b}M-p@{ub} (@{b}comint-previous-input@{ub}) to
     recall the last input; it copies the text of that input to the
     place where you are editing.  If you repeat @{b}M-p@{ub}, it replaces the
     copied input with successively earlier inputs.  @{b}M-n@{ub} is similar but
     goes in the opposite direction, towards the present
     (@{b}comint-next-input@{ub}).

     When you find the previous input you want, you can resubmit it by
     typing RET, or you can edit it first and then resubmit it if you
     wish.

     These shell history commands operate outside the minibuffer, but
     they are completely analogous to the minibuffer history commands.

@{b}M-r@{ub}
@{b}M-s@{ub}
     You can also use @{b}M-r@{ub} and @{b}M-s@{ub} to search for (respectively) earlier
     or later inputs starting with a given string.  First type the
     string, then type @{b}M-r@{ub} (@{b}comint-previous-matching-input@{ub}) to yank a
     previous input from the history which starts with that string.
     You can repeat @{b}M-r@{ub} to find successively earlier inputs starting
     with the same string.

     You can start moving in the opposite direction (toward more recent
     inputs) by typing @{b}M-s@{ub} (@{b}comint-next-matching-input@{ub}) instead of @{b}M-r@{ub}.
     As long as you don't use any commands except @{b}M-r@{ub} and @{b}M-s@{ub}, they
     keep using the same string that you had entered initially.

     These commands serve a purpose similar to that of @{b}M-r@{ub} and @{b}M-s@{ub} in
     the minibuffer, but do not work in quite the same way.  We may
     change the interface of these commands, as well as that of the
     analogous minibuffer commands; one goal will be to make the two
     sets of commands compatible.  But we haven't yet figured out which
     of the possible interfaces is best.  To find out what interface is
     actually supported in Emacs 19, type @{b}C-h f
     comint-previous-matching-input RET@{ub}.

@{b}C-c C-o@{ub}
     Kill the last batch of output from a shell command
     (@{b}comint-kill-output@{ub}).  This is useful if a shell command spews
     out lots of output that just gets in the way.

@{b}C-c C-r@{ub}
     Scroll to display the beginning of the last batch of output at the
     top of the window; it also moves the cursor there
     (@{b}comint-show-output@{ub}).

@{b}C-a@{ub}
     If you type @{b}C-a@{ub} on a line that starts with a shell prompt, it
     moves to the end of the prompt, not to the very beginning of the
     line.

@{b}C-d@{ub}
     Typed at the end of the shell buffer, @{b}C-d@{ub} sends EOF to the
     subshell.  Typed at any other position in the buffer, @{b}C-d@{ub} deletes
     a character as usual.

@{b}M-x dirs@{ub}
     If Emacs gets confused while trying to track changes in the shell's
     current directory, type @{b}M-x dirs@{ub} to re-synchronize.

@{b}M-x send-invisible@{ub}
     This command reads a line of text without echoing it, and sends it
     to the shell.

@{b}M-x comint-continue-subjob@{ub}
     If you accidentally suspend your process, use this command to
     continue it.


@EndNode

@Node "Spell Changes" "emacs/Spell Changes"
@Next "Tags Changes"
@Prev "Shell Changes"
@Toc "Version 19"

Changes in Spell Checking
=========================

   Emacs 19 uses the Ispell program for spelling correction instead of
the Unix spell program.  Ispell has many advantages; one is that it can
be started the first time you check a word, and left running thereafter,
which makes further checking much faster.  If you want to get rid of the
Ispell process, use @{b}M-x kill-ispell@{ub}.

   To check the entire current buffer, use @{b}M-x ispell-buffer@{ub}.  Use @{b}M-x
ispell-region@{ub} to check just the current region.

   Ispell commands often involve interactive replacement of words.  You
can interrupt the interactive replacement with @{b}C-g@{ub}.  You can restart it
again afterward with @{b}C-u M-$@{ub}.

   Interactive replacement shows you one misspelling at a time and asks
you what to do.  To answer, type one of the following characters:

@{b}@{i}digit@{ui}@{ub}
     Replace the word (this time) with one of the displayed near-misses.
     The digit you use says which near-miss to use.

@{b}a@{ub}
     Accept this word this time.

@{b}i@{ub}
     Insert this word in your private dictionary so that Ispell will
     consider it correct it from now on.

@{b}r@{ub}
     Replace the word this time with a string typed by you.

   When the Ispell process starts, it reads your private dictionary
which is the file @{b}~/ispell.words@{ub}.  Words that you "insert" with the @{b}i@{ub}
command are added to that file, but not right away--only at the end of
the interactive replacement procedure.

   Use the @{b}M-x reload-ispell@{ub} command to reload your private dictionary
from @{b}~/ispell.words@{ub} if you edit the file outside of Ispell.


@EndNode

@Node "Mail Changes" "emacs/Mail Changes"
@Next "Info Changes"
@Prev "Tags Changes"
@Toc "Version 19"

Changes in Mail Reading and Sending
===================================

   @{b}%@{ub} is now a word-separator character in Mail mode.  This is because
that character frequently appears in addresses.

   If you set the variable @{b}mail-signature@{ub} non-@{b}nil@{ub}, then @{b}mail@{ub} inserts
the contents of your @{b}.signature@{ub} file automatically when it initializes
a mail buffer.  If you don't want your signature in a particular
message, just delete it from the buffer before you send the message.

   You can specify the text to insert at the beginning of each line when
you use @{b}C-c C-y@{ub} to yank the message you are replying to.  Set
@{b}mail-yank-prefix@{ub} to the desired string.  A value of @{b}nil@{ub} (the default)
means to use indentation, as in Emacs 18.  If you use @{b}C-u@{ub} by itself as
the prefix argument to @{b}C-c C-y@{ub}, then it does not insert anything at the
beginning of the lines, regardless of the value of @{b}mail-yank-prefix@{ub}.

   You can easily convert an Rmail file to system mailbox format with
the command @{b}unrmail@{ub}.  This command reads two arguments, the name of the
Rmail file to convert, and the name of the new mailbox file.  The Rmail
file is unchanged by this command.

   Rmail now initially positions you at the first message in the Rmail
file that you have not seen.  This may not be a message that just
arrived; it may have arrived in a previous session during which you did
not select it.  You can then read all the unseen messages going
forwards.

   When a message that you sent "bounces" back to you, you can retry
sending it by typing @{b}C-M-m@{ub} (@{b}rmail-retry-failure@{ub}) on the failure message.

   By contrast, the new command @{b}M-x rmail-resend@{ub} is used for forwarding
a message and marking it as "resentby" you, with the special header
fields @{b}Resent-by:@{ub} and @{b}Resent-to:@{ub}.

   Another new Rmail command is @{b}<@{ub}, which moves to the first message.
(This is for symmetry with @{b}>@{ub}.)  @{b}<@{ub} is actually an alias for @{b}j@{ub}.

   @{b}e@{ub} (@{b}rmail-edit-current-message@{ub}) is now the command to edit a message.
To expunge, type @{b}x@{ub}.  We know this will surprise people some of the
time, but the surprise will not be disastrous--if you type @{b}e@{ub} meaning to
expunge, just type @{b}C-c C-c@{ub} to leave Rmail Edit mode, and then type @{b}x@{ub}.

   The variable @{b}rmail-output-file-alist@{ub} now controls the default for
the file to output a message to.

   In the Rmail summary, @{b}C-n@{ub} and @{b}C-p@{ub} are now ordinary cursor motion
commands.  To move in the summary @{i}and@{ui} select a new message, use @{b}n@{ub} and @{b}p@{ub}
(which skip deleted messages) or @{b}M-n@{ub} and @{b}M-p@{ub} (which stop at all
messages).  These are, of course, the same commands you would use in
the Rmail buffer.


@EndNode

@Node "Tags Changes" "emacs/Tags Changes"
@Next "Mail Changes"
@Prev "Spell Changes"
@Toc "Version 19"

Changes in Tags Commands
========================

   @{b}M-.@{ub} (@{b}find-tag@{ub}) and the other commands to find a tag now look first
for an exact match in the tags table, and try substring matches only
afterward.

   Another change in @{b}M-.@{ub} is that it has no effect on what @{b}M-,@{ub} will do
subsequently.  You can no longer use @{b}M-,@{ub} to find the next similar tag;
instead, use @{b}M-.@{ub} with a prefix argument.

   The new command @{b}find-tag-regexp@{ub} successively visits the tags that
match a specified regular expression.

   You can now use more than one tags table.  Using @{b}visit-tags-table@{ub} to
load a new tags table does not discard the other tables previously
loaded.  The other tags commands use all the tags tables that are
loaded; the first one they use is the one that mentions the current
visited file.

   You can specify a precise list of tags tables by setting the variable
@{b}tags-table-list@{ub} to a list of strings, like this:

     (setq tags-table-list
           '("~/emacs" "/usr/local/lib/emacs/src"))

This tells @{b}find-tag@{ub} to look at the @{b}TAGS@{ub} files in your @{b}~/emacs@{ub} directory
and in the @{b}/usr/local/lib/emacs/src@{ub} directory.  The order depends on
which file you are in and which tags table mentions that file, as
explained above.

   You can now use the tags table for completion of names during
ordinary editing.  The command @{b}M-TAB@{ub} (except in Emacs Lisp and Lisp
Interaction modes) completes the identifier in the buffer before point,
using the set of all tags as the list of possible completions.

   @{b}tags-query-replace@{ub} and @{b}tags-search@{ub} now create buffers only
temporarily for the files that they have to search (those which are not
already visited in Emacs buffers).  If one of these files contains a
match for the search pattern, then its buffer continues to exist;
otherwise, it is killed.


@EndNode

@Node "Info Changes" "emacs/Info Changes"
@Next "Dired Changes"
@Prev "Mail Changes"
@Toc "Version 19"

Changes in Info
===============

   There are new commands in Info mode.

@{b}]@{ub}
     Move forward a node, going up and down levels as needed in a
     depth-first tree walk.  This command treats all the nodes in the
     file as forming a single sequence in which the "children" of a
     node follow that node.  It is the equivalent of reading a printed
     manual sequentially.

@{b}[@{ub}
     Similar, but move backward.

@{b}<@{ub}
     Move to the top node of the current Info file.

@{b}>@{ub}
     Move to the last node of the file.

@{b}SPC@{ub}
     Scroll through this node, or advance to the next node in
     depth-first order (like @{b}]@{ub}).

@{b}i @{i}string@{ui} RET@{ub}
     Move to the node associated with @{i}string@{ui} in the index or indices of
     this manual.  If there is more than one match for @{i}string@{ui}, the @{b}i@{ub}
     command finds the first match.

@{b},@{ub}
     Find the next match for the string in the previous @{b}i@{ub} command, and
     go to that node.

   If you click the middle mouse button near a cross-reference, menu
item or node pointer while in Info, you will go to the node which is
referenced.

   The variable @{b}Info-directory-list@{ub} specifies a list of directory names
that contain Info files.  Each time Info looks for an Info file, it
searches all these directories.  This makes it easy to install the Info
files that come with various packages.  You can specify the path with
the environment variable @{b}INFOPATH@{ub}.


@EndNode

@Node "Dired Changes" "emacs/Dired Changes"
@Next "GNUS"
@Prev "Info Changes"
@Toc "Version 19"

Changes in Dired
================

   Dired has many new features which allow you to do these things:

   @{b}*@{ub} Make distinguishable types of marks for different operations.

   @{b}*@{ub} Rename, copy, or make links to many files at once.

   @{b}*@{ub} Display contents of subdirectories in the same Dired buffer as the
     parent directory.


 @{" Marks in Dired " Link "Marks in Dired"} 	    Flagging for deletion vs marking for other actions.
 @{" Multiple Files " Link "Multiple Files"} 	    How to copy, rename, print, compress, etc.
			      either one file or several files.
 @{" Shell Commands in Dired " Link "Shell Commands in Dired"}  Running a shell command on the marked files.
 @{" Dired Regexps " Link "Dired Regexps"} 	    Using patterns to rename multiple files.
 @{" Dired Case Conversion " Link "Dired Case Conversion"}    Converting file names to upper or lower case.
 @{" Comparison in Dired " Link "Comparison in Dired"} 	    Running `diff' by way of Dired.
 @{" Subdirectories in Dired " Link "Subdirectories in Dired"}  Adding subdirectories to the Dired buffer.
 @{" Hiding Subdirectories " Link "Hiding Subdirectories"}    Making subdirectories visible or invisible.
 @{" Editing Dired Buffer " Link "Editing Dired Buffer"}     Discarding lines for files of no interest.
 @{" Dired and Find " Link "Dired and Find"} 	    Using `find' to select the files for Dired to show.


@EndNode

@Node "Marks in Dired" "emacs/Marks in Dired"
@Next "Multiple Files"
@Toc "Dired Changes"

Setting and Clearing Marks
--------------------------

   There are now two kinds of marker that you can put on a file in
Dired: @{b}D@{ub} for deletion, and @{b}*@{ub} for any other kind of operation.  The @{b}x@{ub}
command deletes only files marked with @{b}D@{ub}, and most other Dired commands
operate only on the files marked with @{b}*@{ub}.

   To mark files with @{b}D@{ub} (also called @{i}flagging@{ui} the files), you can use @{b}d@{ub}
as usual.  Here are some commands for marking with @{b}*@{ub} (and also for
unmarking):

@{b}m@{ub}
     Mark the current file with @{b}*@{ub}, for an operation other than deletion
     (@{b}dired-mark@{ub}).

@{b}*@{ub}
     Mark all executable files (@{b}dired-mark-executables@{ub}).  With a prefix
     argument, unmark all those files.

@{b} @@{ub}
     Mark all symbolic links (@{b}dired-mark-symlinks@{ub}).  With a prefix
     argument, unmark all those files.

@{b}/@{ub}
     Mark all files which are actually directories, except for @{b}.@{ub} and @{b}..@{ub}
     (@{b}dired-mark-directories@{ub}).  With a prefix argument, unmark all
     those files.

@{b}M-DEL@{ub}
     Remove a specific or all marks from every file
     (@{b}dired-unmark-all-files@{ub}).  With an argument, query for each
     marked file.  Type your help character, usually @{b}C-h@{ub}, at that time
     for help.

@{b}c @{i}old@{ui} @{i}new@{ui}@{ub}
     Replace all marks that use the character @{i}old@{ui} with marks that use
     the character @{i}new@{ui}.  You can use almost any character as a mark
     character by means of this command, to distinguish various classes
     of files.  If @{i}old@{ui} is @{b} @{ub}, then the command operates on all unmarked
     files; if @{i}new@{ui} is @{b} @{ub}, then the command unmarks the files it acts on.

     To illustrate the power of this command, here is how to put @{b}*@{ub}
     marks on all the files that were unmarked, while unmarking all
     those that had @{b}*@{ub} marks:

          c * t c SPC * c t SPC


@EndNode

@Node "Multiple Files" "emacs/Multiple Files"
@Next "Shell Commands in Dired"
@Prev "Marks in Dired"
@Toc "Dired Changes"

Operating on Multiple Files
---------------------------

   The Dired commands to operate on files (rename them, copy them, and
so on) have been generalized to work on multiple files.  There are also
some additional commands in this series.

   All of these commands use the same convention to decide which files
to manipulate:

   @{b}*@{ub} If you give the command a numeric prefix argument @{i}n@{ui}, it operates
     on the next @{i}n@{ui} files, starting with the current file.

   @{b}*@{ub} Otherwise, if there are marked files, the commands operate on all
     the marked files.

   @{b}*@{ub} Otherwise, the command operates on the current file only.

   Here are the commands that operate on multiple files in this way:

@{b}C@{ub}
     Copy the specified files (@{b}dired-do-copy@{ub}).  You must specify a
     directory to copy into, or (if copying a single file) a new name.

     If @{b}dired-copy-preserve-time@{ub} is non-@{b}nil@{ub}, then copying with this
     command sets the modification time of the new file to be the same
     as that of the old file.

@{b}R@{ub}
     Rename the specified files (@{b}dired-do-rename@{ub}).  You must specify a
     directory to rename into, or (if renaming a single file) a new
     name.

     Dired automatically changes the visited file name of buffers
     associated with renamed files so that they refer to the new names.

@{b}H@{ub}
     Make hard links to the specified files (@{b}dired-do-hardlink@{ub}).  You
     must specify a directory to make the links in, or (if making just
     one link) the name to give the link.

@{b}S@{ub}
     Make symbolic links to the specified files (@{b}dired-do-symlink@{ub}).
     You must specify a directory to make the links in, or (if making
     just one link) the name to give the link.

@{b}M@{ub}
     Change the mode (also called "permission bits") of the specified
     files (@{b}dired-do-chmod@{ub}).  This calls the @{b}chmod@{ub} program, so you can
     describe the desired mode change with any argument that @{b}chmod@{ub}
     would handle.

@{b}G@{ub}
     Change the group of the specified files (@{b}dired-do-chgrp@{ub}).

@{b}O@{ub}
     Change the owner of the specified files (@{b}dired-do-chown@{ub}).  (On
     most systems, only the superuser can do this.)

     The variable @{b}dired-chown-program@{ub} specifies the name of the program
     to use to do the work (different systems put @{b}chown@{ub} in different
     places.

@{b}Z@{ub}
     Compress or uncompress the specified files.  If the file appears
     to be a compressed file, it is uncompressed; otherwise, it is
     compressed (@{b}dired-do-compress@{ub}).

@{b}L@{ub}
     Load the specified Emacs Lisp files (@{b}dired-do-load@{ub}).

@{b}B@{ub}
     Byte compile the specified Emacs Lisp files
     (@{b}dired-do-byte-compile@{ub}).

@{b}P@{ub}
     Print the specified files (@{b}dired-do-print@{ub}).  This command uses the
     variables @{b}lpr-command@{ub} and @{b}lpr-switches@{ub} just as @{b}lpr-file@{ub} does (see
     @{"Hardcopy" Link "Hardcopy"}).


@EndNode

@Node "Shell Commands in Dired" "emacs/Shell Commands in Dired"
@Next "Dired Regexps"
@Prev "Multiple Files"
@Toc "Dired Changes"

Shell Commands in Dired
-----------------------

   The dired command @{b}!@{ub} (@{b}dired-do-shell-command@{ub}) reads a shell command
string in the minibuffer and runs the shell command on all the
specified files.  There are two ways of applying a shell command to
multiple files:

   @{b}*@{ub} If you use @{b}*@{ub} in the shell command, then it runs just once, with
     the list of file names substituted for the @{b}*@{ub}.

     Thus, @{b}! tar cf foo.tar * RET@{ub} runs @{b}tar@{ub} on the entire list of file
     names, putting them into one tar file @{b}foo.tar@{ub}.  The file names are
     inserted in the order that they appear in the Dired buffer.

   @{b}*@{ub} If the command string doesn't contain @{b}*@{ub}, then it runs once @{i}for
     each file@{ui}, with the file name attached at the end.

     For example, @{b}! uudecode RET@{ub} runs @{b}uudecode@{ub} on each file.

   What if you want to run the shell command once for each file but with
the file name inserted in the middle?  Or if you want to use the file
names in a more complicated fashion?  Use a shell loop.  For example,
this shell command would run @{b}uuencode@{ub} on each of the specified files,
writing the output into a corresponding @{b}.uu@{ub} file:

     for file in *; uuencode $file $file >$file.uu; done

   The working directory for the shell command is the top level
directory of the Dired buffer.

   The @{b}!@{ub} command does not attempt to update the Dired buffer to show
new or modified files, because it doesn't know what those files might
be.  Type @{b}g@{ub} to update the Dired buffer.


@EndNode

@Node "Dired Regexps" "emacs/Dired Regexps"
@Next "Dired Case Conversion"
@Prev "Shell Commands in Dired"
@Toc "Dired Changes"

Regular Expression File Name Substitution
-----------------------------------------

   Here are commands that select files according to a regular
expression:

@{b}% m @{i}regexp@{ui} RET@{ub}
     Mark all files whose names match the regular expression @{i}regexp@{ui}
     (@{b}dired-mark-files-regexp@{ub}).

     Only the non-directory part of the file name is used in matching.
     Use @{b}^@{ub} and @{b}$@{ub} to anchor matches.  Exclude subdirs by hiding them
     (see @{"Hiding Subdirectories" Link "Hiding Subdirectories"}).

@{b}% d @{i}regexp@{ui} RET@{ub}
     Flag for deletion all files whose names match the regular
     expression @{i}regexp@{ui} (@{b}dired-flag-files-regexp@{ub}).

@{b}% R @{i}from@{ui} RET @{i}to@{ui} RET@{ub}
@{b}% C @{i}from@{ui} RET @{i}to@{ui} RET@{ub}
@{b}% H @{i}from@{ui} RET @{i}to@{ui} RET@{ub}
@{b}% S @{i}from@{ui} RET @{i}to@{ui} RET@{ub}
     These four commands rename, copy, make hard links and make soft
     links, in each case computing the new name by regular expression
     substitution from the name of the old file.

   The four regular expression substitution commands effectively perform
@{b}query-replace-regexp@{ub} on the selected file names in the Dired buffer.
They read two arguments: a regular expression @{i}from@{ui}, and a substitution
pattern @{i}to@{ui}.  Each selected file name is matched against the regular
expression, and then the part which matched is replaced with the
substitution pattern.  You can use @{b}\&@{ub} and @{b} \@{i}digit@{ui}@{ub} in the substitution
pattern to refer to all or part of the old file name.

   Thus, @{b}% R ^.*$ RET x-\& RET@{ub} renames each selected file by prepending
@{b}x-@{ub} to its name.  The inverse of this is to remove @{b}x-@{ub} from the front of
each file name.  One way to do that is @{b}% R ^x-.*$ RET \& RET@{ub}; another
is @{b}% R ^x- RET RET@{ub}.  (Use @{b}^@{ub} and @{b}$@{ub} to anchor matches that should span
the whole filename.)

   If the regular expression matches more than once in a file name,
only the first match is replaced.

   Normally, the replacement process does not consider the directory
names; it operates on the file name within the directory.  If you
specify a prefix argument of zero, then replacement affects the entire
file name.

   Often you will want to apply the command to all files matching the
same @{i}regexp@{ui} that you use in the command.  To do this, mark those files
with @{b}% m @{i}regexp@{ui} RET@{ub}, then use the same regular expression in @{b}% R@{ub}.  To
make this easier, @{b}% R@{ub} uses the last regular expression specified in a @{b}%@{ub}
command as a default.


@EndNode

@Node "Dired Case Conversion" "emacs/Dired Case Conversion"
@Next "Comparison in Dired"
@Prev "Dired Regexps"
@Toc "Dired Changes"

Dired Case Conversion
---------------------

   Here are commands for changing the case of selected files:

@{b}% u@{ub}
     Rename each of the selected files to an upper case name
     (@{b}dired-upcase@{ub}).

@{b}% l@{ub}
     Rename each of the selected files to a lower case name
     (@{b}dired-downcase@{ub}).


@EndNode

@Node "Comparison in Dired" "emacs/Comparison in Dired"
@Next "Subdirectories in Dired"
@Prev "Dired Case Conversion"
@Toc "Dired Changes"

File Comparison with Dired
--------------------------

   Here are two commands to run @{b}diff@{ub} on selected files:

@{b}=@{ub}
     Compare the current file with another file (the file at the mark),
     by running the @{b}diff@{ub} program (@{b}dired-diff@{ub}).  The file at the mark is
     the first argument of @{b}diff@{ub}, and the file at point is the second
     argument.

@{b}M-=@{ub}
     Compare the current file with its backup file (@{b}dired-backup-diff@{ub}).
     If there are several numerical backups, use the most recent one.
     If this file is a backup, compare it to its original.  The backup
     file is the first file given to @{b}diff@{ub}.


@EndNode

@Node "Subdirectories in Dired" "emacs/Subdirectories in Dired"
@Next "Hiding Subdirectories"
@Prev "Comparison in Dired"
@Toc "Dired Changes"

Subdirectories in Dired
-----------------------

   One Dired buffer can now display more than one directory.

   The simplest way to include multiple directories is to specify the
options @{b}-lR@{ub} for running @{b}ls@{ub}.  That produces a recursive directory
listing showing all subdirectories, all within the same Dired buffer.

   But the simplest way is not usually the most convenient way--usually
the complete recursive listing is more than you want.  So there is a
Dired command to insert a single subdirectory into the Dired buffer:

@{b}i@{ub}
     Use the @{b}i@{ub} (@{b}dired-maybe-insert-subdir@{ub}) command on a line that
     describes a file which is a directory.  It inserts the contents of
     that directory into the same Dired buffer.  Inserted subdirectory
     contents follow the top-level directory of the Dired buffer, just
     as they do in @{b}ls -lR@{ub} output.

     If the subdirectory's contents are already present in the buffer,
     the @{b}i@{ub} command just moves to it (type @{b}l@{ub} (@{b}dired-do-redisplay@{ub}) to
     refresh it).  It sets the Emacs mark before moving, so @{b}C-x C-x@{ub}
     takes you back to the old position in the buffer.

   When you have subdirectories in the Dired buffer, you can use the
page motion commands @{b}C-x [@{ub} and @{b}C-x ]@{ub} to move by entire directories.

   The following commands move up and down in the tree of directories
in one Dired buffer:

@{b}C-M-u@{ub}
     Go up to the parent directory's headerline (@{b}dired-tree-up@{ub}).

@{b}C-M-d@{ub}
     Go down in the tree, to the first subdirectory's headerline
     (@{b}dired-tree-down@{ub}).

   The following commands move forwards and backwards to subdirectory
headerlines:

@{b}C-M-n@{ub}
     Go to next subdirectory headerline, regardless of level
     (@{b}dired-next-subdir@{ub}).

@{b}C-M-p@{ub}
     Go to previous subdirectory headerline, regardless of level
     (@{b}dired-prev-subdir@{ub}).


@EndNode

@Node "Hiding Subdirectories" "emacs/Hiding Subdirectories"
@Next "Editing Dired Buffer"
@Prev "Subdirectories in Dired"
@Toc "Dired Changes"

Hiding Subdirectories
---------------------

   @{i}Hiding@{ui} a subdirectory means to make it invisible, except for its
headerline.  Files inside a hidden subdirectory are never considered by
Dired.  For example, the commands to operate on marked files ignore
files in hidden directories even if they are marked.  Thus you can use
hiding to temporarily exclude subdirectories from operations without
having to remove the markers.

   The hiding commands toggle; that is they unhide what was hidden and
vice versa.

@{b}$@{ub}
     Hide or reveal the current subdirectory and move point to the next
     subdirectory (@{b}dired-hide-subdir@{ub}).  A prefix argument serves as a
     repeat count.

@{b}M-$@{ub}
     Hide all subdirectories, leaving only their header lines
     (@{b}dired-hide-all@{ub}).  Or, if any subdirectory is currently hidden,
     make all subdirectories visible again.  You can use this command
     to get an overview in very deep directory trees or to move quickly
     to subdirectories far away.


@EndNode

@Node "Editing Dired Buffer" "emacs/Editing Dired Buffer"
@Next "Dired and Find"
@Prev "Hiding Subdirectories"
@Toc "Dired Changes"

Editing the Dired Buffer
------------------------

@{b}l@{ub}
     Update the specified files in a Dired buffer.  This means reading
     their current status from the file system and changing the buffer
     to reflect it properly (@{b}dired-do-redisplay@{ub}).

     If you use this command on a subdirectory header line, it updates
     the contents of the subdirectory.

@{b}g@{ub}
     Update the entire contents of the Dired buffer (@{b}revert-buffer@{ub}).
     Preserve all marks except for those on files that have vanished.
     Hidden subdirectories are updated but remain hidden.

@{b}k@{ub}
     Kill all marked lines (@{b}dired-do-kill-lines@{ub}).  With a prefix
     argument, kill that many lines starting with the current line.

     This command does not delete files; it just deletes text from the
     Dired buffer.

     If you kill the line for a file that is a directory, then its
     contents are also deleted from the buffer.  Typing @{b}C-u k@{ub} on the
     header line for a subdirectory is another way to delete a
     subdirectory from the Dired buffer.

     The @{b}g@{ub} command will bring back any individual lines that you have
     killed in this way, but not subdirectories--you must use @{b}i@{ub} to
     reinsert each subdirectory.


@EndNode

@Node "Dired and Find" "emacs/Dired and Find"
@Prev "Editing Dired Buffer"
@Toc "Dired Changes"

Dired and @{b}find@{ub}
--------------

   You can select a set of files for display in a Dired buffer more
flexibly by using the @{b}find@{ub} utility to choose the files.

   To search for files with names matching a wildcard pattern use
@{b}find-name-dired@{ub}.  Its arguments are @{i}directory@{ui} and @{i}pattern@{ui}.  It selects
all the files in @{i}directory@{ui} or its subdirectories whose own names match
@{i}pattern@{ui}.

   The files thus selected are displayed in a Dired buffer in which the
ordinary Dired commands are available.

   If you want to test the contents of files, rather than their names,
use @{b}find-grep-dired@{ub}.  This command takes two minibuffer arguments,
@{i}directory@{ui} and @{i}regexp@{ui}; it selects all the files in @{i}directory@{ui} or its
subdirectories that contain a match for @{i}regexp@{ui}.  It works by running
@{b}find@{ub} and @{b}grep@{ub}.

   The most general command in this series is @{b}find-dired@{ub}, which lets
you specify any condition that @{b}find@{ub} can test.  It takes two minibuffer
arguments, @{i}directory@{ui} and @{i}find-args@{ui}; it runs @{b}find@{ub} in @{i}directory@{ui} with
@{i}find-args@{ui} as the arguments to @{b}find@{ub} that specify which files to accept.
To use this command, you need to know how to use @{b}find@{ub}.


@EndNode

@Node "GNUS" "emacs/GNUS"
@Next "Calendar-Diary"
@Prev "Dired Changes"
@Toc "Version 19"

GNUS
====

   GNUS is an Emacs subsystem for reading and responding to netnews.
You can use GNUS to browse through news groups, look at summaries of
articles in specific group, and read articles of interest.  You can
respond to authors or write replies to all the readers of a news group.

   This document introduces GNUS and describes several basic features.
Full documentation will appear in `The GNU Emacs Extensions Manual'.

   To start GNUS, type @{b}M-x gnus RET@{ub}.


 @{" Buffers of GNUS " Link "Buffers of GNUS"}    The Newsgroups, Summary and Article buffers.
 @{" GNUS Startup " Link "GNUS Startup"}       What you should know about starting GNUS.
 @{" Summary of GNUS " Link "Summary of GNUS"}    A short description of the basic GNUS commands.


@EndNode

@Node "Buffers of GNUS" "emacs/Buffers of GNUS"
@Next "GNUS Startup"
@Toc "GNUS"

GNUS's Three Buffers
--------------------

   GNUS creates and uses three Emacs buffers, each with its own
particular purpose and its own major mode.

   The @{i}Newsgroup buffer@{ui} contains a list of newsgroups.  This is the
first buffer that GNUS displays when it starts up.  Normally the list
contains only the newsgroups to which you subscribe (which are listed in
your @{b}.newsrc@{ub} file) and which contain unread articles.  Use this buffer
to select a specific newsgroup.

   The @{i}Summary buffer@{ui} lists the articles in a single newsgroup,
including their subjects, their numbers, and who posted them.  GNUS
creates a Summary buffer for a newsgroup when you select the group in
the Newsgroup buffer.  Use this buffer to select an article, and to move
around in an article.

   The @{i}Article buffer@{ui} displays the text of an article.  You rarely need
to select this buffer because you can read the text while keeping the
Summary buffer selected.


@EndNode

@Node "GNUS Startup" "emacs/GNUS Startup"
@Next "Summary of GNUS"
@Prev "Buffers of GNUS"
@Toc "GNUS"

When GNUS Starts Up
-------------------

   At startup, GNUS reads your @{b}.newsrc@{ub} news initialization file and
attempts to communicate with the local news server, which is a
repository of news articles.  The news server need not be the same
computer you are logged in on.

   If you start GNUS and connect to the server, but do not see any
newsgroups listed in the Newsgroup buffer, type @{b}L@{ub} to get a listing of
all the newsgroups.  Then type @{b}u@{ub} to unsubscribe from particular
newsgroups.  (Move the cursor using @{b}n@{ub} and @{b}p@{ub} or the usual Emacs
commands.)  When you quit with @{b}q@{ub}, GNUS automatically records the
subscribed groups in your @{b}.newsrc@{ub} initialization file.  (You do not
have to edit this file yourself, although you may.) Next time you start
GNUS, you will see only the subscribed groups.


@EndNode

@Node "Summary of GNUS" "emacs/Summary of GNUS"
@Prev "GNUS Startup"
@Toc "GNUS"

Summary of GNUS Commands
------------------------

   Reading news is a two step process:

  1. Choose a newsgroup in the Newsgroup buffer.

  2. Choose an article in the Summary buffer.  The article is displayed
     in the Article buffer in a large window, below the Summary buffer
     in its small window.

   Each buffer has commands particular to it, but commands that do the
same things have similar keybindings.  Here are commands for the
Newsgroup and Summary buffers:

@{b}z@{ub}
     In the Newsgroup buffer, suspend GNUS.  You can return to GNUS
     later by selecting the Newsgroup buffer and typing @{b}g@{ub} to get newly
     arrived articles.

@{b}q@{ub}
     In the Newsgroup buffer, update your @{b}.newsrc@{ub} initialization file
     and quit GNUS.

     In the Summary buffer, exit the current newsgroup and return to the
     Newsgroup buffer.  Thus, typing @{b}q@{ub} twice quits GNUS.

@{b}L@{ub}
     In the Newsgroup buffer, list all the newsgroups available on your
     news server.  This may be a long list!

@{b}l@{ub}
     In the Newsgroup buffer, list only the newsgroups to which you
     subscribe and which contain unread articles.

@{b}u@{ub}
     In the Newsgroup buffer, unsubscribe from (or subscribe to) the
     newsgroup listed in the line that point is on.  When you quit GNUS
     by typing @{b}q@{ub}, GNUS lists your subscribed-to newsgroups in your
     @{b}.newsrc@{ub} file.  The next time you start GNUS, you see only the
     newsgroups listed in your @{b}.newsrc@{ub} file.

     You may also edit your @{b}.newsrc@{ub} file directly in Emacs.  First quit
     GNUS, then visit the @{b}.newsrc@{ub} file.  For example, you can remove
     all the @{b}alt.@{ub} groups by going to the beginning of the file and
     typing @{b}M-x flush-lines RET alt RET@{ub}.  Next time you start GNUS, you
     will see only the newsgroups still listed in the @{b}.newsrc@{ub} file.

@{b}SPC@{ub}
     In the Newsgroup buffer, select the group on the line under the
     cursor and display the first unread article in that group.

     In the Summary buffer,

        - Select the article on the line under the cursor if none is
          selected.

        - Scroll the text of the article if one is selected.

        - Select the next unread article if at the end of the current
          article.

     Thus, you can move through all the articles by repeatedly typing
     SPC.

@{b}DEL@{ub}
     In the Newsgroup Buffer, move point to the previous newsgroup
     containing unread articles.

     In the Summary buffer, scroll the text of the article backwards.

@{b}n@{ub}
     Move point to the next unread newsgroup, or select the next unread
     article.

@{b}p@{ub}
     Move point to the previous unread newsgroup, or select the previous
     unread article.

@{b}C-n@{ub}
@{b}C-p@{ub}
     Move point to the next or previous item, even if it is marked as
     read.  This does not select the article or newsgroup on that line.

@{b}s@{ub}
     In the Summary buffer, do an incremental search of the current
     text in the Article buffer, just as if you switched to the Article
     buffer and typed @{b}C-s@{ub}.

@{b}M-s @{i}regexp@{ui} RET@{ub}
     In the Summary buffer, search forward for articles containing a
     match for @{i}regexp@{ui}.

@{b}C-c C-s C-n@{ub}
@{b}C-c C-s C-s@{ub}
@{b}C-c C-s C-d@{ub}
@{b}C-c C-s C-a@{ub}
     In the Summary buffer, sort the list of articles by number,
     subject, date, or author.

@{b}C-M-n@{ub}
@{b}C-M-p@{ub}
     In the Summary buffer, read the next or previous article with the
     same subject as the current article.


@EndNode

@Node "Calendar-Diary" "emacs/Calendar-Diary"
@Next "Version Control"
@Prev "GNUS"
@Toc "Version 19"

Calendar and Diary
==================

   The calendar facility in Emacs 19 is almost completely new, and it
comes with a diary feature.  You can use the diary to keep track of
appointments, anniversaries, and other events.

   To use the diary, you must write diary entries in a particular file,
called your @{i}diary file@{ui}.  Its name is @{b}~/diary@{ub}.  Emacs displays the
entries for particular dates by finding them in the diary file,
formatting them, and displaying them in a diary display buffer.


 @{" Calendar " Link "Calendar"} 			New features of the calendar proper.
 @{" Entries " Link "Diary Entries"}               	The location and form of a diary entry.
 @{" New Entries " Link "New Entries"} 			Inserting diary entries using the calendar.
 @{" Displaying Diary " Link "Displaying Diary"}             How to display diary entries from the calendar.
 @{" European Calendar Style " Link "European Calendar Style"}     Day-month-year style for dates.
 @{" Simple and Fancy " Link "Simple and Fancy"}             The diary has two modes for display.
 @{" Other Diary Features " Link "Other Diary Features"}         The diary has many advanced commands.
 @{" Startup Diary " Link "Startup Diary"} 		How to display your diary when you start Emacs.
 @{" Printing Diary " Link "Printing Diary"}  		Print selected entries of the diary.


@EndNode

@Node "Calendar" "emacs/Calendar"
@Next "Diary Entries"
@Toc "Calendar-Diary"

Calendar
--------

   In Emacs 19 you can use ordinary Emacs cursor commands to move
through the calendar, which scrolls automatically to display different
months or different years.  Character motion translates to days, line
motion to weeks, sentence and paragraph motion to months, and page
motion to years.  The vertical and horizontal scroll commands also
handle the calendar suitably.

   @{b}p d@{ub} displays the selected date as a day within the year.  @{b}g d@{ub}
selects a date given as month, day, year.  Type @{b}.@{ub} to go back to today's
date.

   The command @{b}M-=@{ub}, which normally gives the number of lines in the
region, in Calendar mode gives the number of days in the region
(@{b}calendar-count-days-region@{ub}).

   The calendar facility also knows about other important calendars.
The commands for these come in pairs; the commands to convert @{i}to@{ui}
another calendar start with the @{b}p@{ub} prefix (short for "print"), and the
commands to convert from another calendar start with the @{b}g@{ub} prefix
(short for "go to").  Here is a complete list:

@{b}g a@{ub}, @{b}p a@{ub}
     The astronomical calendar, a simple count of days elapsed since
     noon, Monday, January 1, 4713 B.C. on the Julian calendar.  The
     number of days elapsed is also called the @{i}Julian day number@{ui}
     (@{b}calendar-goto-astro-date@{ub}, @{b}calendar-print-astro-date@{ub}).

@{b}g c@{ub}, @{b}p c@{ub}
     ISO commercial calendar
     (@{b}calendar-goto-iso-date@{ub}, @{b}calendar-print-iso-date@{ub}).

@{b}g f@{ub}, @{b}p f@{ub}
     French revolutionary calendar
     (@{b}calendar-goto-french-date@{ub},
     @{b}calendar-print-french-date@{ub}).

@{b}g h@{ub}, @{b}p h@{ub}
     Hebrew calendar
     (@{b}calendar-goto-hebrew-date@{ub},
     @{b}calendar-print-hebrew-date@{ub}).

@{b}g i@{ub}, @{b}p i@{ub}
     Islamic calendar
     (@{b}calendar-goto-islamic-date@{ub},
     @{b}calendar-print-islamic-date@{ub}).

@{b}g j@{ub}, @{b}p j@{ub}
     Julian calendar
     (@{b}calendar-goto-julian-date@{ub},
     @{b}calendar-print-julian-date@{ub}).

@{b}p m@{ub}
     Mayan calendar (@{b}calendar-print-mayan-date@{ub}).

   The calendar also knows the dates of standard holidays.  Type @{b}h@{ub}
(@{b}calendar-cursor-holidays@{ub}) to display a list of holidays for the
selected date.  This list appears in another window.  Type @{b}x@{ub}
(@{b}mark-calendar-holidays@{ub}) to mark each day that is a holiday with @{b}*@{ub}
in the calendar itself.  The command @{b}u@{ub} (@{b}calendar-unmark@{ub}) turns off this
marking.

   At any time, you can use @{b}M-x holidays@{ub} to display a list of holidays
for the present month and the preceding and following months.


@EndNode

@Node "Diary Entries" "emacs/Diary Entries"
@Next "New Entries"
@Prev "Calendar"
@Toc "Calendar-Diary"

Diary Entries
-------------

   To use the diary feature, you must write @{i}diary entries@{ui} that describe
plans associated with particular dates, and put them in your @{i}diary
file@{ui}, which is normally the file @{b}~/diary@{ub}.  You can specify a
different name for it by setting the variable @{b}diary-file@{ub}; you would do
this before using any of the commands that operate on the diary.

   Diary file entries follow a simple convention: begin entries with a
date at the beginning of a line, followed optionally by a time, and
then by the text of the entry:

     @{i}date@{ui} @{i}optional-time-of-day@{ui} @{i}text-of-entry@{ui}

To continue an entry over two or more lines, indent the second and
subsequent lines.  The lines of the entry after the first are called
@{i}continuation lines@{ui}.  Other lines in the diary file that are not part of
any entry are comment lines; Emacs does not display these.

   When you make diary entries using Calendar mode, Emacs inserts the
date for you in the appropriate format and places the cursor so you can
type the text of the entry.

   You can write entries in any order and Emacs will display the
entries by date.  However, time-of-day entries can be sorted
chronologically only in a diary mode called Fancy mode; in Simple mode,
Emacs displays time-of-day entries in their order in the diary file.


@EndNode

@Node "Displaying Diary" "emacs/Displaying Diary"
@Next "European Calendar Style"
@Prev "New Entries"
@Toc "Calendar-Diary"

Calendar Commands to Display Diary Entries
------------------------------------------

   In Calendar mode, use the following commands to display your diary
entries:

@{b}d@{ub}
     Display any diary entries for the date under the cursor
     (@{b}view-diary-entries@{ub}).

     With a numeric argument, Emacs shows the diary entries for that
     many successive days, starting with and including the date under
     the cursor.  Thus, @{b}2 d@{ub} displays all the entries for the selected
     date and for the following day.

@{b}s@{ub}
     Display your entire diary file (@{b}show-all-diary-entries@{ub}).

@{b}m@{ub}
     In the calendar, mark all visible dates that have diary entries
     (@{b}mark-diary-entries@{ub}).

@{b}u@{ub}
     Unmark the calendar (@{b}calendar-unmark@{ub}).

   At any time, not just in Calendar mode, you can display today's diary
entries by typing:

     M-x diary

With a prefix argument @{i}n@{ui}, this command displays diary entries for @{i}n@{ui}
successive days, starting from and including today.


@EndNode

@Node "New Entries" "emacs/New Entries"
@Next "Displaying Diary"
@Prev "Diary Entries"
@Toc "Calendar-Diary"

Calendar Commands for Making Diary Entries
------------------------------------------

   Calendar mode provides several commands to help you make diary file
entries.  These commands work by visiting the diary file and inserting
the date information; you must finish the job by inserting the text of
the entry, and then save the diary file with @{b}C-x C-s@{ub}.  The commands are:

@{b}i d@{ub}
     Add a diary entry for the selected date in the calendar
     (@{b}insert-diary-entry@{ub}).

@{b}i w@{ub}
     Add a diary entry for the selected day of the week
     (@{b}insert-weekly-diary-entry@{ub}).  This entry is displayed each week
     on the selected day.

@{b}i m@{ub}
     Add a diary entry for the selected day of the month
     (@{b}insert-monthly-diary-entry@{ub}).  This entry is displayed each
     month on the selected day.

@{b}i y@{ub}
     Add a diary entry for the selected day of the year
     (@{b}insert-yearly-diary-entry@{ub}).  This entry is displayed each year
     on the selected day.

   Here are commands for entering more complex kinds of diary entries in
Calendar mode.  These kinds of entries operate properly only in Fancy
Diary Display mode (see @{"Simple and Fancy" Link "Simple and Fancy"}).

@{b}i a@{ub}
     Add an anniversary diary entry for the selected date
     (@{b}insert-anniversary-diary-entry@{ub}).

     Select the date you want remembered, in the proper year--if it is a
     birthday, remember to go to the person's year of birth!  Then type
     @{b}i a@{ub} and enter the text of the entry.

     In the textual part of the entry you can type @{b}%d@{ub}.  When Emacs
     displays the entry in the diary buffer, the @{b}%d@{ub} is replaced by the
     number of years since the date.  Thus, if you use @{b}%d years old@{ub} as
     the text of the entry, it will display as @{b}53 years old@{ub} on the 53rd
     birthday.

@{b}i c@{ub}
     Add a cyclic diary entry starting at the date
     (@{b}insert-cyclic-diary-entry@{ub}).  An entry is displayed on a
     specified starting date and then is repeatedly displayed at the
     specified interval.  This is useful for ten day cycles of
     preventive maintenance and similar activities.

     To use this command, first select the start date.  The command
     reads the interval (the number of days between repetitions) using
     the minibuffer, then inserts the beginning of the entry.

@{b}i b@{ub}
     Add a block diary entry for the current region
     (@{b}insert-block-diary-entry@{ub}).  With a block entry, Emacs writes
     the same message in the display for successive days.

     Position point and mark at the beginning and end of the block of
     days you want entered and type @{b}i b@{ub}.  This sets up the diary entry's
     date info and positions point so you can write the text of the
     entry.  People usually use this command for trips or vacations.


@EndNode

@Node "European Calendar Style" "emacs/European Calendar Style"
@Next "Simple and Fancy"
@Prev "Displaying Diary"
@Toc "Calendar-Diary"

European Calendar Style
-----------------------

   By default, Emacs interprets and displays diary dates in civilian
American form, @{b}@{i}month@{ui}/@{i}day@{ui}/@{i}year@{ui}@{ub}: @{b}2/15/1993@{ub}, or @{b}February 15, 1993@{ub}.

   Alternatively, you can specify the European calendar style for
writing dates: @{b}@{i}day@{ui}/@{i}month@{ui}/@{i}year@{ui}@{ub}, @{b}15/2/1993@{ub} or @{b}15 February 1993@{ub}.  To do
this, set the variable @{b}european-calendar-style@{ub} to @{b}t@{ub}, before using any
calendar or diary command.  This also affects display of dates.

   Here's how to do this in your @{b}.emacs@{ub} file:

     (setq european-calendar-style t)


@EndNode

@Node "Simple and Fancy" "emacs/Simple and Fancy"
@Next "Other Diary Features"
@Prev "European Calendar Style"
@Toc "Calendar-Diary"

Simple and Fancy Diary Display
------------------------------

   There are two modes for displaying a subset of diary entries: Simple
mode and Fancy mode.  Fancy mode provides a more dramatic display for
the diary, and can also display the actual matching date for diary
entries that match more than one date.

   By default, Emacs uses Simple mode, which is quicker than Fancy mode.
Another advantage of Simple mode is that you can edit the displayed
diary entries "in place" and save them.  When you use Fancy mode, it is
useless to edit the displayed subset of the diary; instead you must
visit the diary file separately.  To select Fancy mode, set
@{b}diary-display-hook@{ub} to @{b}fancy-diary-display@{ub} like this:

     (setq diary-display-hook 'fancy-diary-display)


@EndNode

@Node "Other Diary Features" "emacs/Other Diary Features"
@Next "Startup Diary"
@Prev "Simple and Fancy"
@Toc "Calendar-Diary"

Other Diary Features
--------------------

   Here are some additional diary features.  These will be explained in
full in `The GNU Emacs Extensions Manual'.

   You can schedule meetings on a date such as the first Tuesday of
every month.  This is called an @{i}offset@{ui} date.  The diary has commands
for specifying such meetings, but not in Calendar mode.  To create such
an entry, you need to edit the diary file yourself.

   You can make entries according to Hebrew and Islamic dates.  Calendar
mode provides commands of the form @{b}i h d@{ub} to add a diary entry for the
Hebrew date corresponding to the selected date and @{b}i i d@{ub} to add a diary
entry for the Islamic date corresponding to the selected date.  You can
make entries that repeat every week, month, or year.  Before using
these commands, you must set the @{b}nongregorian-diary-listing-hook@{ub} and the
@{b}nongregorian-diary-marking-hook@{ub} in your @{b}.emacs@{ub} file.

   You can include other diary files in your diary display.  This way, a
group of people can share a common diary file.


@EndNode

@Node "Startup Diary" "emacs/Startup Diary"
@Next "Printing Diary"
@Prev "Other Diary Features"
@Toc "Calendar-Diary"

Displaying your Diary on Emacs Startup
--------------------------------------

   If you start a new Emacs each day, you might want to display your
diary automatically at that time.  To do so, put this in your @{b}.emacs@{ub}
file:

     (diary)

   If you want to see both the calendar and your diary at startup, use
this instead:

     (setq view-diary-entries-initially t)
     (calendar)


@EndNode

@Node "Printing Diary" "emacs/Printing Diary"
@Prev "Startup Diary"
@Toc "Calendar-Diary"

Printing the Displayed Part of the Diary
----------------------------------------

   To print the selected diary entries as they appear on the screen, use
@{b}M-x print-diary-entries@{ub}.  The same variables that customize @{b}lpr-buffer@{ub}
also affect this command.

   In Simple mode, the diary display buffer uses selective display (see
@{"Selective Display" Link "Selective Display"}).  This means that what you see on the screen is just
part of the text in the Emacs buffer.  The diary entries that don't
apply to the dates you asked for are still in the buffer, but hidden.
The ordinary printing commands such as @{b}lpr-buffer@{ub} would not do what you
want; they print the entire text, including the hidden parts.  This is
why we need @{b}print-diary-entries@{ub}.


@EndNode

@Node "Version Control" "emacs/Version Control"
@Next "Emerge"
@Prev "Calendar-Diary"
@Toc "Version 19"

Version Control
===============

   @{i}Version control systems@{ui} are packages that can record multiple
versions of a source file, usually storing the unchanged parts of the
file just once.  Version control systems also record history information
such as the creation time of each version, who created it, and a
description of what was changed in that version.

   The GNU project recommends the version control system known as RCS,
which is free software and available from the Free Software Foundation.
Emacs supports use of either RCS or SCCS (a proprietary, but widely
used, version control system that is not quite as powerful as RCS)
through a facility called VC.  The same Emacs commands work with either
RCS or SCCS, so you hardly have to know which one of them you are using.


 @{" Concepts of VC " Link "Concepts of VC"} 
 @{" Editing with VC " Link "Editing with VC"} 
 @{" Variables for Check-in-out " Link "Variables for Check-in-out"} 
 @{" Comparing Versions " Link "Comparing Versions"} 
 @{" VC Status " Link "VC Status"} 
 @{" Renaming and VC " Link "Renaming and VC"} 
 @{" Snapshots " Link "Snapshots"} 
 @{" Log Entries " Link "Log Entries"} 
 @{" Change Logs and VC " Link "Change Logs and VC"} 
 @{" Version Headers " Link "Version Headers"} 


@EndNode

@Node "Concepts of VC" "emacs/Concepts of VC"
@Next "Editing with VC"
@Toc "Version Control"

Concepts of Version Control
---------------------------

   When a file is under version control, we also say that it is
@{i}registered@{ui} in the version control system.  Each registered file has a
corresponding @{i}master file@{ui} which represents the file's present state
plus its change history, so that you can reconstruct from it either the
current version or any specified earlier version.  Usually the master
file also records a change comment for each version.

   The file that is maintained under version control is sometimes called
the @{i}work file@{ui} corresponding to its master file.

   To examine a file, you @{i}check it out@{ui}.  This extracts a version of the
file (typically, the most recent) from the master.  If you want to edit
the file, you must check it out @{i}locked@{ui}.  Only one user can do this at a
time for any given source file.  When you are done with your editing,
you must @{i}check in@{ui} the new version.  This records the new version in the
master file, and unlocks the source file so that other people can lock
it and thus modify it.

   These are the basic operations of version control.  Checking in and
checking out both use the single Emacs command @{b}C-x C-q@{ub}
(@{b}vc-toggle-read-only@{ub}).


@EndNode

@Node "Editing with VC" "emacs/Editing with VC"
@Next "Variables for Check-in-out"
@Prev "Concepts of VC"
@Toc "Version Control"

Editing with Version Control
----------------------------

   When you visit a file that is maintained using version control, the
mode line displays @{b}RCS@{ub} or @{b}SCCS@{ub} to inform you that version control is in
use, and also (in case you care) which low-level system the file is
actually stored in.  Normally, such a source file is read-only, and the
mode line indicates this with @{b}%%@{ub}.)

   These are the commands that you use to edit a file maintained with
version control:

@{b}C-x C-q@{ub}
     Check the visited file in or out.

@{b}C-x v u@{ub}
     Revert the buffer and the file to the last checked in version.

@{b}C-x v c@{ub}
     Remove the last-entered change from the master for the visited
     file.  This undoes your last check-in.

@{b}C-x v i@{ub}
     Register the visited file in version control.

(@{b}C-x v@{ub} is the prefix key for version control commands; all of these
commands except for @{b}C-x C-q@{ub} start with @{b}C-x v@{ub}.)

   If you want to edit the file, type @{b}C-x C-q@{ub} (@{b}vc-toggle-read-only@{ub}).
This @{i}checks out@{ui} and locks the file, so that you can edit it.  The file
is writable after check-out, but only for you, not for anyone else.

   Emacs does not save backup files for source files that are maintained
with version control.  If you want to make backup files despite version
control, set the variable @{b}vc-make-backups@{ub} to a non-@{b}nil@{ub} value.

   When you are finished editing the file, type @{b}C-x C-q@{ub} again.  When
used on a file that is checked out, this command checks the file in.
But check-in does not start immediately; first, you must enter a @{i}log
entry@{ui}--a description of the changes in the new version.  @{b}C-x C-q@{ub} pops
up a buffer for you to enter this in.  When you are finished typing in
the log entry, type @{b}C-c C-c@{ub} to terminate it; this is when actual
check-in takes place.

   Once you have checked in your changes, the file is unlocked, so that
other users can lock it and modify it.

   Normally the work file exists all the time, whether it is locked or
not.  If you set @{b}vc-keep-workfiles@{ub} to @{b}nil@{ub}, then checking in a new
version with @{b}C-x C-q@{ub} deletes the work file; but any attempt to visit
the file with Emacs creates it again.

   Actually, it is not impossible to lock a file that someone else has
locked.  If you try to check out a file that is locked, @{b}C-x C-q@{ub} asks
you whether you want to "steal the lock."  If you say yes, the file
becomes locked by you, but a message is sent to the person who had
formerly locked the file, to inform him or her of what has happened.

   If you want to discard your current set of changes and revert to the
last version checked in, use @{b}C-x v u@{ub} (@{b}vc-revert-buffer@{ub}).  This cancels
your last check-out, leaving the file unlocked.  If you want to make a
different set of changes, you must first check the file out again.  @{b}C-x
v u@{ub} requies confirmation, unless it sees that you haven't made any
changes since the last checked-in version.

   @{b}C-x v u@{ub} is also the command to use if you lock a file and then don't
actually change it.

   You can even cancel a change after checking it in, with @{b}C-x v c@{ub}
(@{b}vc-cancel-version@{ub}).  Normally, @{b}C-x v c@{ub} reverts your workfile and
buffer to the previous version (the one that precedes the version that
is deleted), but you can prevent the reversion by giving the command a
prefix argument.  Then the buffer does not change.

   This command with a prefix argument is useful when you have checked
in a change and then discover a trivial error in it; you can cancel the
erroneous check-in, fix the error, and repeat the check-in.

   Be careful when invoking @{b}C-x v c@{ub}, as it is easy to throw away a lot
of work with it.  To help you be careful, this command always asks for
confirmation with @{b}yes@{ub}.

   You can register the visited file for version control using @{b}C-x v i@{ub}
(@{b}vc-register@{ub}).  This uses RCS if RCS is installed on your system;
otherwise, it uses SCCS.

   By default, the initial version number is 1.1.  If you want to use a
different number, give @{b}C-x v i@{ub} a prefix argument; then it reads the
initial version number using the minibuffer.

   After @{b}C-x v i@{ub}, the file is unlocked and read-only.  Type @{b}C-x C-q@{ub} if
you wish to edit it.

   If @{b}vc-initial-comment@{ub} is non-@{b}nil@{ub}, @{b}C-x v i@{ub} reads an initial comment
(much like a log entry) to describe the purpose of this source file.


@EndNode

@Node "Variables for Check-in-out" "emacs/Variables for Check-in-out"
@Next "Comparing Versions"
@Prev "Editing with VC"
@Toc "Version Control"

Variables Affecting Check-in and Check-out
------------------------------------------

   If @{b}vc-suppress-confirm@{ub} is non-@{b}nil@{ub}, then @{b}C-x C-q@{ub} and @{b}C-x v i@{ub} can save
the current buffer without asking, and @{b}C-x v u@{ub} also operates without
asking for confirmation.  (This variable does not affect @{b}C-x v c@{ub}; that
is so drastic that it should always ask for confirmation.)

   VC mode does much of its work by running the shell commands for RCS
and SCCS.  If @{b}vc-command-messages@{ub} is non-@{b}nil@{ub}, VC displays messages to
indicate which shell commands it runs, and additional messages when the
commands finish.

   Normally, VC assumes that it can deduce the locked/unlocked state of
files by looking at the file permissions of the work file; this is
fast.  However, if the @{b}RCS@{ub} or @{b}SCCS@{ub} subdirectory is actually a symbolic
link, then VC does not trust the file permissions to reflect this
status.

   You can specify the criterion for whether to trust the file
permissions by setting the variable @{b}vc-mistrust-permissions@{ub}.  Its value
may be @{b}t@{ub} (always mistrust the file permissions and check the master
file), @{b}nil@{ub} (always trust the file permissions), or a function of one
argument which makes the decision.  The argument is the directory name
of the @{b}RCS@{ub} or @{b}SCCS@{ub} subdirectory.  A non-@{b}nil@{ub} value from the function
says to mistrust the file permissions.

   If you find that the file permissions of work files are changed
erroneously, then you can set @{b}vc-mistrust-permissions@{ub} to @{b}t@{ub} so that VC
always checks the master file.


@EndNode

@Node "Log Entries" "emacs/Log Entries"
@Next "Change Logs and VC"
@Prev "Snapshots"
@Toc "Version Control"

Log Entries
-----------

   When you're editing an initial or change comment for inclusion in a
master file, finish your entry by typing @{b}C-c C-c@{ub}.

@{b}C-c C-c@{ub}
     Finish the comment edit normally (@{b}vc-finish-logentry@{ub}).  This
     finishes check-in.

   To abort check-in, just don't type @{b}C-c C-c@{ub} in that buffer.  You can
switch buffers and do other editing.  As long as you don't try to check
in another file, the comment you were editing remains in its buffer,
and you can go back to that buffer at any time to complete the check-in.

   If you change several source files for the same reason, it is often
convenient to specify the same log entry for many of the files.  To do
this, use the history of previous log entries.  The commands @{b}M-n@{ub}, @{b}M-p@{ub},
@{b}M-s@{ub} and @{b}M-r@{ub} for doing this work just like the minibuffer history
commands (except that they don't use the minibuffer).

   The history of previous log entries is actually stored in previous
pages of the log entry editing buffer; they are normally hidden by
narrowing.

   Each time you check in a file, the log entry buffer is put into VC
Log mode, which involves running two hook variables: @{b}text-mode-hook@{ub} and
@{b}vc-log-mode-hook@{ub}.


@EndNode

@Node "Change Logs and VC" "emacs/Change Logs and VC"
@Next "Version Headers"
@Prev "Log Entries"
@Toc "Version Control"

Change Logs and VC
------------------

   Emacs users often record brief summaries of program changes in a file
called @{b}ChangeLog@{ub}, which is kept in the same directory as the source
files, and is usually meant to be distributed along with the source
files.  You can maintain @{b}ChangeLog@{ub} from the version control logs with
the following command.

@{b}C-x v a@{ub}
     Visit the current directory's change log file and create new
     entries for versions checked in since the most recent entry in the
     change log file (@{b}vc-update-change-log@{ub}).

     This command works with RCS only; it does not work with SCCS.

   For example, suppose the first line of @{b}ChangeLog@{ub} is dated 10 April
1992, and suppose the only check-in since then was by Nathaniel
Bowditch to @{b}rcs2log@{ub} on 8 May 1992 with log text @{b}Ignore log messages
that start with `#'.@{ub}.  Then @{b}C-x v a@{ub} visits @{b}ChangeLog@{ub} and inserts text
like this:

     Fri May  8 21:45:00 1992  Nathaniel Bowditch  (nat@apn.org)
     
             * rcs2log: Ignore log messages that start with `#'.

You can then further edit as you wish.

   A log entry whose text begins with @{b}#@{ub} is not copied to @{b}ChangeLog@{ub}.
For example, if you merely fix some misspellings in comments, you can
log the change with an entry beginning with @{b}#@{ub} to avoid putting such
trivia into @{b}ChangeLog@{ub}.

   When @{b}C-x v a@{ub} adds several change log entries at once, it groups
related log entries together if they all are checked in by the same
author at nearly the same time.  If the log entries for several such
files all have the same text, it coalesces them into a single entry.
For example, suppose the most recent check-ins have the following log
entries:

For @{b}vc.texinfo@{ub}:
     Fix expansion typos.
For @{b}vc.el@{ub}:
     Don't call expand-file-name.
For @{b}vc-hooks.el@{ub}:
     Don't call expand-file-name.

   They appear like this in @{b}ChangeLog@{ub}:

     Wed Apr  1 08:57:59 1992  Nathaniel Bowditch  (nat@apn.org)
     
             * vc.texinfo: Fix expansion typos.
     
             * vc.el, vc-hooks.el: Don't call expand-file-name.

   Normally, @{b}C-x v a@{ub} separates log entries by a blank line, but you can
mark several related log entries to be clumped together (without an
intervening blank line) by starting the text of each related log entry
with a label of the form @{b}{@{i}clumpname@{ui} } @{ub}.  The label itself is not copied
to @{b}ChangeLog@{ub}.  For example, suppose the log entries are:

For @{b}vc.texinfo@{ub}:
     {expand} Fix expansion typos.
For @{b}vc.el@{ub}:
     {expand} Don't call expand-file-name.
For @{b}vc-hooks.el@{ub}:
     {expand} Don't call expand-file-name.

   Then the text in @{b}ChangeLog@{ub} looks like this:

     Wed Apr  1 08:57:59 1992  Nathaniel Bowditch  (nat@apn.org)
     
             * vc.texinfo: Fix expansion typos.
             * vc.el, vc-hooks.el: Don't call expand-file-name.

   Normally, the log entry for file @{b}foo@{ub} is displayed as @{b}* foo: @{i}text of
log entry@{ui}@{ub}.  But by convention, the @{b}:@{ub} after @{b}foo@{ub} is omitted if the text
of the log entry starts with @{b} (@{i}functionname@{ui}): @{ub}.  For example, if the
log entry for @{b}vc.el@{ub} is @{b}(vc-do-command): Check call-process status.@{ub}, then
the text in @{b}ChangeLog@{ub} looks like this:

     Wed May  6 10:53:00 1992  Nathaniel Bowditch  (nat@apn.org)
     
             * vc.el (vc-do-command): Check call-process status.


@EndNode

@Node "Comparing Versions" "emacs/Comparing Versions"
@Next "VC Status"
@Prev "Variables for Check-in-out"
@Toc "Version Control"

Comparing Versions
------------------

   To compare two versions of a file, use @{b}C-x v =@{ub} (@{b}vc-diff@{ub}).

   Plain @{b}C-x v =@{ub} compares the current buffer contents (saving them in
the file if necessary) with the last checked-in version of the file.
With a prefix argument, @{b}C-x v =@{ub} reads a filename and two version
numbers, and compares those versions of the file you specify.

   If you supply a directory name instead of the name of a work file,
this command compares the two specified versions of all registered files
in that directory and its subdirectories.  You can also specify a
snapshot name (see @{"Snapshots" Link "Snapshots"}) instead of one or both version numbers.

   You can specify a checked-in version by its number; you can specify
the most recent checked-in version with @{b}-@{ub}; and you can specify the
current buffer contents with @{b}+@{ub}.  Thus, you can compare two checked-in
versions, or compare a checked-in version with the text you are editing.

   This command works by running the @{b}diff@{ub} utility, getting the options
from the variable @{b}diff-switches@{ub}.  It displays the output in a special
buffer in another window.


@EndNode

@Node "VC Status" "emacs/VC Status"
@Next "Renaming and VC"
@Prev "Comparing Versions"
@Toc "Version Control"

VC Status Commands
------------------

   To get the detailed version control status of one file, type @{b}C-x v l@{ub}
(@{b}vc-print-log@{ub}).  It displays the history of changes to the current
file, including the text of the log entries.  The output appears in a
separate window.

   When you are working on a large program, it's often useful to find
all the files that are currently locked, or all the files maintained in
version control at all.  You can do so using these commands, both of
which operate on the branch of the file system starting at the current
directory.

   You can use @{b}C-x v d@{ub} (@{b}vc-directory@{ub}) to show all the locked files in
or beneath the current directory.  This includes all files that are
locked by any user.

   With a prefix argument, @{b}C-x v d@{ub} shows all the version control
activity in the current directory--it lists all files in or beneath the
current directory that are maintained with version control.


@EndNode

@Node "Renaming and VC" "emacs/Renaming and VC"
@Next "Snapshots"
@Prev "VC Status"
@Toc "Version Control"

Renaming VC Work Files and Master Files
---------------------------------------

   When you rename a registered file, you must also rename its master
file correspondingly to get proper results.  Use @{b}vc-rename-file@{ub} to
rename the source file as you specify, and rename its master file
accordingly.  It also updates any snapshots (see @{"Snapshots" Link "Snapshots"}) that
mention the file, so that they use the new name; despite this, the
snapshot thus modified may not completely work (see @{"Snapshot Caveats" Link "Snapshot Caveats"}).

   You cannot use @{b}vc-rename-file@{ub} on a file that is locked by someone
else.

   @{b}vc-rename-file@{ub} is not bound to a key because it's not likely to be
used frequently.


@EndNode

@Node "Snapshots" "emacs/Snapshots"
@Next "Log Entries"
@Prev "Renaming and VC"
@Toc "Version Control"

Snapshots
---------

   A @{i}snapshot@{ui} is a named set of file versions (one for each registered
file) that you can treat as a unit.  One important kind of snapshot is
a @{i}release@{ui}, a (theoretically) stable version of the system that is ready
for distribution to users.


 @{" Making Snapshots " Link "Making Snapshots"} 		The snapshot facilities.
 @{" Snapshot Caveats " Link "Snapshot Caveats"} 		Things to be careful of, when using snapshots.


@EndNode

@Node "Making Snapshots" "emacs/Making Snapshots"
@Next "Snapshot Caveats"
@Toc "Snapshots"

Making and Using Snapshots
..........................

   There are two basic commands for snapshots; one makes a snapshot
with a given name, the other retrieves a named snapshot.

@{b}C-x v s @{i}name@{ui} RET@{ub}
     Define the last saved versions of every registered file in or
     under the current directory as a snapshot named @{i}name@{ui}
     (@{b}vc-create-snapshot@{ub}).

@{b}C-x v r @{i}name@{ui} RET@{ub}
     Check out all registered files at or below the current directory
     level using whatever versions correspond to the snapshot @{i}name@{ui}
     (@{b}vc-retrieve-snapshot@{ub}).

     This function reports an error if any files are locked at or below
     the current directory, without changing anything; this is to avoid
     overwriting work in progress.

   You shouldn't need to use @{b}vc-retrieve-snapshot@{ub} very often; you can
get difference reports between two snapshots without retrieving either
one, using @{b}C-x =@{ub} (see @{"Comparing Versions" Link "Comparing Versions"}).  Thus, retrieving a snapshot
is only necessary if you need to study or compile portions of the
snapshot.

   A snapshot uses a very small amount of resources--just enough to
record the list of file names and which version belongs to the
snapshot.  Thus, you need not hesitate to create snapshots whenever
they are useful.

   You can give a snapshot name as an argument to @{b}C-x v =@{ub} (see
@{"Comparing Versions" Link "Comparing Versions"}).  Thus, you can use it to compare a snapshot
against the current files, or two snapshots against each other, or a
snapshot against a named version.


@EndNode

@Node "Snapshot Caveats" "emacs/Snapshot Caveats"
@Prev "Making Snapshots"
@Toc "Snapshots"

Snapshot Caveats
................

   VC's snapshot facilities are modeled on RCS's named-configuration
support.  They use RCS's native facilities for this, so under VC
snapshots made using RCS are visible even when you bypass VC.

   For SCCS, VC implements snapshots itself.  The files it uses contain
name/file/version-number triples.  These snapshots are visible only
through VC.

   File renaming and deletion can create some difficulties with
snapshots.  This is not a VC-specific problem, but a general design
issue in version control systems that no one has solved very well yet.

   If you rename a registered file, you need to rename its master along
with it (the function @{b}vc-rename-file@{ub} does this automatically).  If you
are using SCCS, you must also update the records of the snapshot, to
mention the file by its new name (@{b}vc-rename-file@{ub} does this, too).  This
makes the snapshot remain valid for retrieval, but it does not solve
all problems.

   For example, some of the files in the program probably refer to
others by name.  At the very least, the makefile probably mentions the
file that you renamed.  If you retrieve an old snapshot, the renamed
file is retrieved under its new name, which is not the name that the
makefile expects.  So the program won't really work.

   If you use snapshots, don't rename either work files or master files
except by means of @{b}vc-rename-file@{ub}.  It knows how to update snapshots so
that you can still retrieve them.  An old snapshot that refers to a
master file that no longer exists under the recorded name is invalid;
VC can no longer retrieve it.  It would be beyond the scope of this
manual to explain enough about RCS and SCCS to teach the reader how to
update the snapshots by hand.


@EndNode

@Node "Version Headers" "emacs/Version Headers"
@Prev "Change Logs and VC"
@Toc "Version Control"

Inserting Version Control Headers
---------------------------------

   Sometimes it is convenient to put version identification strings
directly into working files.  Certain special strings called @{i}version
headers@{ui} are replaced in each successive version by the number of that
version.

   You can use the @{b}C-x v h@{ub} command (@{b}vc-insert-headers@{ub}) to insert a
suitable header string.

@{b}C-x v h@{ub}
     Insert headers in a file for use with your version-control system.

   The default header string is @{b}$ld$@{ub} for RCS and @{b}%W%@{ub} for SCCS.  You can
specify other headers to insert by setting the variable
@{b}vc-header-string@{ub}.  Its value (if non-@{b}nil@{ub}) should be the string to
be inserted.  You can also specify a list of strings; then each string
in the list is inserted as a separate header on a line of its own.  (It
is often important to use "superfluous" backslashes when writing a Lisp
string constant for this use, to prevent the string in the constant
from being interpreted as a header itself if the Emacs Lisp file
containing it is maintained with version control.)

   Each header is inserted surrounded by tabs, inside comment
delimiters, on a new line at the start of the buffer.  Normally the
ordinary comment start and comment end strings of the current mode are
used, but for certain modes, there are special comment delimiters for
this purpose; the variable @{b}vc-comment-alist@{ub} specifies them.  Each
element of this list has the form @{b} (@{i}mode@{ui} @{i}starter@{ui} @{i}ender@{ui})@{ub}.

   @{b}vc-static-header-alist@{ub} is consulted to add further strings based on
the name of the buffer.  Its value should be a list of dotted pairs;
the CAR of each pair is a regular expression that should match the
buffer name, and the CDR is the format to use on each header.  A string
is inserted for each file name pattern that matches the buffer name,
and for each header taken from @{b}vc-header-string@{ub}.  The default value for
@{b}vc-static-header-alist@{ub} is:

     (("\\.c$" .
       "\n#ifndef lint\nstatic char vcid[] = \"\%s\";\n\
     #endif /* lint */\n"))

which specifies insertion of a string of this form:


     #ifndef lint
     static char vcid[] = "@{i}header-string@{ui}";
     #endif /* lint */


@EndNode

@Node "Emerge" "emacs/Emerge"
@Next "Debuggers"
@Prev "Version Control"
@Toc "Version 19"

Emerge
======

   It's not unusual for programmers to get their signals crossed and
modify the same program in two different directions.  To recover from
this confusion, you need to merge the two versions.  Emerge makes this
easier.


 @{" Overview of Emerge " Link "Overview of Emerge"} 
 @{" Submodes of Emerge " Link "Submodes of Emerge"} 
 @{" State of Difference " Link "State of Difference"} 
 @{" Merge Commands " Link "Merge Commands"} 
 @{" Exiting Emerge " Link "Exiting Emerge"} 
 @{" Combining in Emerge " Link "Combining in Emerge"} 
 @{" Fine Points of Emerge " Link "Fine Points of Emerge"} 


@EndNode

@Node "Overview of Emerge" "emacs/Overview of Emerge"
@Next "Submodes of Emerge"
@Toc "Emerge"

Overview of Emerge
------------------

   To start Emerge, run one of these four commands:

@{b}M-x emerge-files@{ub}
     Merge two specified files.

@{b}M-x emerge-files-with-ancestor@{ub}
     Merge two specified files, with reference to a common ancestor.

@{b}M-x emerge-buffers@{ub}
     Merge two buffers (the currently accessible portions).

@{b}M-x emerge-buffers-with-ancestor@{ub}
     Merge two buffers (the currently accessible portions) with
     reference to a common ancestor in another buffer.

   The Emerge commands compare two texts, and display the results in
three buffers: one for each input text (the @{i}A buffer@{ui} and the @{i}B buffer@{ui}),
and one (the @{i}merge buffer@{ui}) where merging takes place.  The merge buffer
does not show just the differences.  Rather, it shows you the full
text, but wherever the input texts differ, you can choose which one of
them to include in the merge buffer.

   If a common ancestor version is available, from which the two texts
to be merged were both derived, Emerge can use it to guess which
alternative is right.  Wherever one current version agrees with the
ancestor, Emerge presumes that the other current version is a deliberate
change which should be kept in the merged version.  Use the
"with-ancestor" commands if you want to specify a common ancestor text.
These commands read three file or buffer names--variant A, variant B,
and the common ancestor.

   After the comparison is done and the buffers are prepared, the actual
merging starts.  You control the merging interactively by editing the
merge buffer.  The merge buffer shows you a full merged text, not just
differences.  For each point where the input texts differ, you can
choose which one of them to include in the merge buffer.

   The merge buffer has a special major mode, Emerge mode, with commands
for making these choices.  But you can also edit the buffer with
ordinary Emacs commands.

   At any given time, the attention of Emerge is focused on one
particular difference, called the @{i}selected@{ui} difference.  This difference
is marked off in the three buffers by

     vvvvvvvvvvvvvvvvvvvv

above and

     ^^^^^^^^^^^^^^^^^^^^

below.  Emerge numbers all the differences sequentially and the mode
line always shows the number of the selected difference.

   Normally, the merge buffer starts out with the A version of the text.
But when the A version of a part of the buffer agrees with the common
ancestor, then the B version is preferred for that part.

   Normally, Emerge stores the merged output in place of the first input
text (the A file or buffer).  If you give a prefix argument to
@{b}emerge-files@{ub} or @{b}emerge-files-with-ancestor@{ub}, it reads the name of the
output file using the minibuffer.  (This is the last file name those
commands read.)

   If you abort Emerge with @{b}C-u q@{ub}, the output is not saved.


@EndNode

@Node "Submodes of Emerge" "emacs/Submodes of Emerge"
@Next "State of Difference"
@Prev "Overview of Emerge"
@Toc "Emerge"

Submodes of Emerge
------------------

   You can choose between two modes for giving merge commands: Fast mode
and Edit mode.  In Fast mode, basic Emerge commands are single
characters, but ordinary Emacs commands are disabled.  This is
convenient if you use only Emerge commands.

   In Edit mode, all Emerge commands start with the prefix character
@{b}C-c@{ub}, and the normal Emacs commands are also available.  This allows
editing the merge buffer, but slows down Emerge operations.

   Use @{b}e@{ub} to switch to Edit mode, and @{b}f@{ub} to switch to Fast mode.  The
mode line indicates Edit and Fast modes with @{b}E@{ub} and @{b}F@{ub}.

   Emerge has two additional submodes that affect how particular merge
commands work: Auto Advance mode and Skip Prefers mode.

   If Auto Advance mode is in effect, the @{b}a@{ub} and @{b}b@{ub} commands advance to
the next difference.  This lets you go through the merge faster doing
ordinary things.  The mode line indicates Auto Advance mode with @{b}A@{ub}.

   If Skip Prefers mode is in effect, the @{b}n@{ub} and @{b}p@{ub} commands skip over
differences in states prefer-A and prefer-B.  Thus you will only see
differences for which neither version is presumed "correct".  The mode
line indicates Skip Prefers mode with @{b}S@{ub}.

   Use the command @{b}emerge-auto-advance-mode@{ub} to set or clear Auto
Advance mode.  Use @{b}emerge-skip-prefers-mode@{ub} to set or clear Skip
Prefers mode.  A positive argument turns the mode on, a nonpositive
argument turns it off, and no argument toggles it.


@EndNode

@Node "State of Difference" "emacs/State of Difference"
@Next "Merge Commands"
@Prev "Submodes of Emerge"
@Toc "Emerge"

State of a Difference
---------------------

   In the merge buffer, a difference is marked @{b}vvvvvvvvvvvvvvvvvvvv@{ub}
above and @{b}^^^^^^^^^^^^^^^^^^^^@{ub} below.  Such a difference can have one
of seven states:

A
     The difference is showing the A version.  The @{b}a@{ub} command always
     produces this state; the mode line indicates it with @{b}A@{ub}.

B
     The difference is showing the B version.  The @{b}b@{ub} command always
     produces this state; the mode line indicates it with @{b}B@{ub}.

default-A
default-B
     The difference is showing the A or the B state by default, because
     you haven't made a choice.  All differences start in the default-A
     state (and thus the merge buffer is a copy of the A buffer),
     except those for which one alternative is "preferred" (see below).

     When you select a difference, its state changes from default-A or
     default-B to plain A or B.  Thus, the selected difference never has
     state default-A or default-B, and these states are never displayed
     in the mode line.

     The command @{b}d a@{ub} chooses default-A as the default state, and @{b}d b@{ub}
     chooses default-B.  This chosen default applies to all differences
     which you haven't selected and for which no alternative is
     preferred.  If you are moving through the merge sequentially, the
     differences you haven't selected are those following the selected
     one.  Thus, while moving sequentially, you can effectively make
     the A version the default for some sections of the merge buffer
     and the B version the default for others by using @{b}d a@{ub} and @{b}d b@{ub} at
     the end of each section.

prefer-A
prefer-B
     The difference is showing the A or B state because it is
     @{i}preferred@{ui}.  This means that you haven't made an explicit
     choice, but one alternative seems likely to be right because the
     other alternative agrees with the common ancestor.  Thus, where
     the A buffer agrees with the common ancestor, the B version is
     preferred, because chances are it is the one that was actually
     changed.

     These two states are displayed in the mode line as @{b}A*@{ub} and @{b}B*@{ub}.

combined
     The difference is showing a combination of the A and B states, as a
     result of the @{b}x c@{ub} or @{b}x C@{ub} commands.

     Once a difference is in this state, the @{b}a@{ub} and @{b}b@{ub} commands don't do
     anything to it unless you give them a prefix argument.

     The mode line displays this state as @{b}comb@{ub}.


@EndNode

@Node "Merge Commands" "emacs/Merge Commands"
@Next "Exiting Emerge"
@Prev "State of Difference"
@Toc "Emerge"

Merge Commands
--------------

   Here are the Merge commands for Fast mode; in Edit mode, precede
these with @{b}C-c@{ub} and turn all the letters into control characters.

@{b}p@{ub}
     Select the previous difference.

@{b}n@{ub}
     Select the next difference.

@{b}a@{ub}
     Choose the A version of this difference.

@{b}b@{ub}
     Choose the B version of this difference.

@{b}j@{ub}
     Select a particular difference; specify the sequence number of that
     difference as a prefix argument.

@{b}M-x emerge-select-difference@{ub}
     Select the run of differences containing the current location.
     You can use this command in the merge buffer or in the A or B
     buffer.

@{b}q@{ub}
     Quit--finish the merge.  With an argument, abort the merge.

@{b}f@{ub}
     Go into fast mode.

@{b}e@{ub}
     Go into edit mode.

@{b}l@{ub}
     Recenter (like @{b}C-l@{ub}) all three windows.

@{b}-@{ub}
     Specify part of a prefix numeric argument.

@{b}@{i}digit@{ui}@{ub}
     Also specify part of a prefix numeric argument.

@{b}d a@{ub}
     Choose the A version as the default from here down in the merge
     buffer.

@{b}d b@{ub}
     Choose the B version as the default from here down in the merge
     buffer.

@{b}c a@{ub}
     Copy the A version of this difference into the kill ring.

@{b}c b@{ub}
     Copy the B version of this difference into the kill ring.

@{b}i a@{ub}
     Insert the A version of this difference at the point.

@{b}i b@{ub}
     Insert the B version of this difference at the point.

@{b}m@{ub}
     Put the point and mark around the difference region.

@{b}^@{ub}
     Scroll all three windows down (like @{b}M-v@{ub}).

@{b}v@{ub}
     Scroll all three windows up (like @{b}C-v@{ub}).

@{b}<@{ub}
     Scroll all three windows left (like @{b}C-x <@{ub}).

@{b}>@{ub}
     Scroll all three windows right (like @{b}C-x >@{ub}).

@{b}|@{ub}
     Reset horizontal scroll on all three windows.

@{b}x 1@{ub}
     Shrink the merge window to one line.  (Use @{b}C-u l@{ub} to restore it to
     full size.)

@{b}x c@{ub}
     Combine the two versions of this difference.

@{b}x f@{ub}
     Show the files/buffers Emerge is operating on in Help window.
     (Use @{b}C-u l@{ub} to restore windows.)

@{b}x j@{ub}
     Join this difference with the following one.  (@{b}C-u x j@{ub} joins this
     difference with the previous one.)

@{b}x s@{ub}
     Split this difference into two differences.  Before you use this
     command, position point in each of the three buffers to the place
     where you want to split the difference.

@{b}x t@{ub}
     Trim identical lines off top and bottom of the difference.  Such
     lines occur when the A and B versions are identical but differ
     from the ancestor version.


@EndNode

@Node "Exiting Emerge" "emacs/Exiting Emerge"
@Next "Combining in Emerge"
@Prev "Merge Commands"
@Toc "Emerge"

Exiting Emerge
--------------

   The @{b}q@{ub} (@{b}emerge-quit@{ub}) command finishes the merge, storing the results
into the output file.  It restores the A and B buffers to their proper
contents, or kills them if they were created by Emerge.  It also
disables the Emerge commands in the merge buffer, since executing them
later could damage the contents of the various buffers.

   @{b}C-u q@{ub} aborts the merge.  Aborting means that Emerge does not write
the output file.

   If Emerge was called from another Lisp program, then its return value
is @{b}t@{ub} or @{b}nil@{ub} to indicate success or failure.


@EndNode

@Node "Combining in Emerge" "emacs/Combining in Emerge"
@Next "Fine Points of Emerge"
@Prev "Exiting Emerge"
@Toc "Emerge"

Combining the Two Versions
--------------------------

   Sometimes you want to keep @{i}both@{ui} alternatives for a particular locus.
To do this, use @{b}x c@{ub}, which edits the merge buffer like this:

     #ifdef NEW
     @{i}version from A file@{ui}
     #else /* NEW */
     @{i}version from B file@{ui}
     #endif /* NEW */

   While this example shows C preprocessor conditionals delimiting the
two alternative versions, you can specify the strings you want by
setting the variable @{b}emerge-combine-template@{ub} to a list of three strings.
The default setting, which produces the results shown above, looks like
this:

     ("#ifdef NEW\n"
      "#else /* NEW */\n"
      "#endif /* NEW */\n")


@EndNode

@Node "Fine Points of Emerge" "emacs/Fine Points of Emerge"
@Prev "Combining in Emerge"
@Toc "Emerge"

Fine Points of Emerge
---------------------

   You can have any number of merges going at once--just don't use any
one buffer as input to more than one merge at once, since that will
cause the read-only/modified/auto-save status save-and-restore to screw
up.

   Starting Emerge can take a long time because it needs to compare the
files.  Emacs can't do anything else until @{b}diff@{ub} finishes.  Perhaps in
the future someone will change Emerge to do the comparison in the
background when the input files are large--then you could keep on doing
other things with Emacs until Emerge gets ready to accept commands.

   After the merge has been set up, Emerge runs the hooks in
@{b}emerge-startup-hook@{ub}.

   During the merge, you musn't try to edit the A and B buffers
yourself.  Emerge modifies them temporarily, but ultimately puts them
back the way they were.


@EndNode

@Node "Debuggers" "emacs/Debuggers"
@Next "Other New Modes"
@Prev "Emerge"
@Toc "Version 19"

Running Debuggers Under Emacs
=============================

   The GUD (Grand Unified Debugger) library provides an interface to
various symbolic debuggers from within Emacs.  We recommend the
debugger GDB, which is free software, but you can also run DBX or SDB
if you have them.


 @{" Starting GUD " Link "Starting GUD"} 	How to start a debugger subprocess.
 @{" Debugger Operation " Link "Debugger Operation"} 	Connection between the debugger and source buffers.
 @{" Commands of GUD " Link "Commands of GUD"} 	Keybindings for common commands.
 @{" GUD Customization " Link "GUD Customization"} 	Defining your own commands for GUD.


@EndNode

@Node "Starting GUD" "emacs/Starting GUD"
@Next "Debugger Operation"
@Toc "Debuggers"

Starting GUD
------------

   There are three commands for starting a debugger.  Each corresponds
to a particular debugger program.

@{b}M-x gdb RET @{i}file@{ui} RET@{ub}
@{b}M-x dbx RET @{i}file@{ui} RET@{ub}
     Run GDB or DBX in a subprocess of Emacs.  Both of these commands
     select the buffer used for input and output to the debugger.

@{b}M-x sdb RET @{i}file@{ui} RET@{ub}
     Run SDB in a subprocess of Emacs.  SDB's messages do not mention
     file names, so the Emacs interface to SDB depends on having a tags
     table (see @{"Tags" Link "Tags"}) to find which file each function is in.  If you
     have not visited a tags table or the tags table doesn't list one
     of the functions, you get a message saying @{b}The sdb support
     requires a valid tags table to work@{ub}.  If this happens, generate a
     valid tags table in the working directory and try again.

   You can only run one debugger process at a time.


@EndNode

@Node "Debugger Operation" "emacs/Debugger Operation"
@Next "Commands of GUD"
@Prev "Starting GUD"
@Toc "Debuggers"

Debugger Operation
------------------

   When you run a debugger with GUD, the debugger displays source files
via Emacs--Emacs finds the source file and moves point to the line
where the program is executing.  An arrow (@{b}=>@{ub}) indicates the current
execution line, and it stays put even if you move the cursor.

   You can start editing the file at any time.  The arrow is not part of
the file's text; it appears only on the screen.  If you do modify a
source file, keep in mind that inserting or deleting lines will throw
off the arrow's positioning; GUD has no way of figuring out which line
corresponded before your changes to the line number in a debugger
message.  Also, you'll typically have to recompile and restart the
program for your changes to be reflected in the debugger's tables.

   If you wish, you can control your debugger process entirely through
the debugger buffer, which uses a variant of Shell mode.  All the usual
commands for your debugger are available, and you can use the Shell mode
history commands to repeat them.


@EndNode

@Node "Commands of GUD" "emacs/Commands of GUD"
@Next "GUD Customization"
@Prev "Debugger Operation"
@Toc "Debuggers"

Commands of GUD
---------------

   GUD provides a command available in all buffers for setting
breakpoints.  This command is defined globally because you need to use
it in the source files' buffers.

@{b}C-x SPC@{ub}
     Set a breakpoint on the line that point is on.

   The debugger buffer has a number of keybindings for invoking common
debugging commands quickly:

@{b}C-c C-l@{ub}
     Display in another window the last line referred to in the GUD
     buffer (that is, the line indicated in the last location message).
     This runs the command @{b}gud-refresh@{ub}.

@{b}C-c C-s@{ub}
     Execute a single line of code (@{b}gud-step@{ub}).  If the code contains a
     function call, execution stops after entering the called function.

@{b}C-c C-n@{ub}
     Execute a single line of code, stepping across entire function
     calls at full speed (@{b}gud-next@{ub}).

@{b}C-c C-i@{ub}
     Execute a single machine instruction (@{b}gud-stepi@{ub}).

@{b}C-c C-c@{ub}
     Continue execution until the next breakpoint, or other event that
     would normally stop the program (@{b}gud-cont@{ub}).

   The above commands are common to all supported debuggers.  If you are
using GDB or (some versions of) DBX, these additional commands are
available:

@{b}C-c <@{ub}
     Select the next enclosing stack frame (@{b}gud-up@{ub}).  This is
     equivalent to the @{b}up@{ub} command.

@{b}C-c >@{ub}
     Select the next inner stack frame (@{b}gud-down@{ub}).  This is equivalent
     to the @{b}down@{ub} command.

   If you are using GDB, two additional keybindings are available:

@{b}C-c C-f@{ub}
     Run the program until the selected stack frame returns (or until it
     stops for some other reason).

@{b}TAB@{ub}
     Complete the symbol in the buffer before point, using the set of
     all symbols known to GDB.

   These commands interpret a prefix argument as a repeat count, when
that makes sense.

   After each command that changes the program counter, GUD displays the
new current source line, and updates the location of the arrow.


@EndNode

@Node "GUD Customization" "emacs/GUD Customization"
@Prev "Commands of GUD"
@Toc "Debuggers"

GUD Customization
-----------------

   On startup, GUD executes one of the following hooks: @{b}gdb-mode-hook@{ub},
if you are using GDB; @{b}dbx-mode-hook@{ub}, if you are using DBX; and
@{b}sdb-mode-hook@{ub}, if you are using SDB.  You can use these hooks to define
custom keybindings for the debugger interaction buffer.

   Here is a convenient way to define a command that sends a particular
command string to the debugger, and set up a key binding for it in the
debugger interaction buffer:

     (gud-def @{i}function@{ui} @{i}cmdstring@{ui} @{i}binding@{ui} @{i}docstring@{ui})

   This defines a command named @{i}function@{ui} which sends @{i}cmdstring@{ui} to the
debugger process, with documentation string @{i}docstring@{ui}, and binds it to
@{i}binding@{ui} in the debugger buffer's mode.  (If @{i}binding@{ui} is @{b}nil@{ub}, this
defines the command but does not make a binding for it; you can make a
binding explicitly, perhaps using one of the above hooks.)

   Commands defined with @{b}gud-def@{ub} handle prefix arguments by passing
them to the debugger, appended to end of @{i}cmdstring@{ui} with a space in
between.  (This use of prefix arguments works with GDB and DBX, but not
with SDB.)

   You can also set up commands that you can send to the debugger while
in another buffer, such as a source file.  Set the variable
@{b}gud-commands@{ub} to a list of strings containing debugger commands you
might want to send.

@{b}C-x &@{ub}
     Send a custom command to the debugger process (@{b}send-gud-command@{ub}).
     Normally, send the CAR of the @{b}gud-commands@{ub} list; a prefix argument
     specifies which element of that list to use (counting from 0).

     If the string contains @{b}%s@{ub}, @{b}C-x &@{ub} substitutes a numeric value found
     in the buffer at or near point.  It looks for decimal, octal, or
     hexadecimal numbers, with @{b}0x@{ub} allowed.  This lets you define
     commands to chase pointers whose numeric values have been
     displayed.


@EndNode

@Node "Other New Modes" "emacs/Other New Modes"
@Next "Key Sequence Changes"
@Prev "Debuggers"
@Toc "Version 19"

Other New Modes
===============

   There is now a Perl mode for editing Perl programs and an Icon mode
for editing Icon programs.

   C++ mode is like C mode, except that it understands C++ comment
syntax and certain other differences between C and C++.  It also has a
command @{b}fill-c++-comment@{ub} which fills a paragraph made of comment lines.
The command @{b}comment-region@{ub} is useful in C++ mode for commenting out
several consecutive lines, or removing the commenting out of such lines.

   WordStar emulation is available--type @{b}M-x wordstar-mode@{ub}.  For more
information, type @{b}C-h f wordstar-mode RET@{ub}.

   The command @{b}C-o@{ub} in Buffer Menu mode now displays the current line's
buffer in another window but does not select it.  This is like the
existing command @{b}o@{ub} which selects the current line's buffer in another
window.


 @{" Asm Mode " Link "Asm Mode"} 		A major mode for editing assembler files.
 @{" Edebug Mode " Link "Edebug Mode"} 		A new Lisp debugger.
 @{" Editing Binary Files " Link "Editing Binary Files"} Hexl mode lets you edit a binary file as numbers.


@EndNode

@Node "Asm Mode" "emacs/Asm Mode"
@Next "Edebug Mode"
@Toc "Other New Modes"

Asm Mode
--------

   Asm mode is a new major mode for editing files of assembler code.
It defines these commands:

@{b}TAB@{ub}
     @{b}tab-to-tab-stop@{ub}.

@{b}LFD@{ub}
     Insert a newline and then indent using @{b}tab-to-tab-stop@{ub}.

@{b}:@{ub}
     Insert a colon and then remove the indentation from before the
     label preceding colon.  Then do @{b}tab-to-tab-stop@{ub}.

@{b};@{ub}
     Insert or align a comment.


@EndNode

@Node "Edebug Mode" "emacs/Edebug Mode"
@Next "Editing Binary Files"
@Prev "Asm Mode"
@Toc "Other New Modes"

Edebug Mode
-----------

   Edebug is a new source-level debugger for Emacs Lisp programs.

   To use Edebug, use the command @{b}M-x edebug-defun@{ub} to "evaluate" a
function definition in an Emacs Lisp file.  We put "evaluate" in
quotation marks because it doesn't just evaluate the function, it also
inserts additional information to support source-level debugging.

   You must also do this:

     (setq debugger 'edebug-debug)

to cause errors and single-stepping to use Edebug instead of the usual
Emacs Lisp debugger.

   For more information, see `The Emacs Extensions Manual', which
should be included in the Emacs 19 distribution.


@EndNode

@Node "Editing Binary Files" "emacs/Editing Binary Files"
@Prev "Edebug Mode"
@Toc "Other New Modes"

Editing Binary Files
--------------------

   There is a new major mode for editing binary files: Hexl mode.  To
use it, use @{b}M-x hexl-find-file@{ub} instead of @{b}C-x C-f@{ub} to visit the file.
This command converts the file's contents to hexadecimal and lets you
edit the translation.  When you save the file, it is converted
automatically back to binary.

   You can also use @{b}M-x hexl-mode@{ub} to translate an existing buffer into
hex.  This is useful if you visit a file normally and discover it is a
binary file.

   Hexl mode has a few other commands:

@{b}C-M-d@{ub}
     Insert a byte with a code typed in decimal.

@{b}C-M-o@{ub}
     Insert a byte with a code typed in octal.

@{b}C-M-x@{ub}
     Insert a byte with a code typed in hex.

@{b}C-x [@{ub}
     Move to the beginning of a 1k-byte "page".

@{b}C-x ]@{ub}
     Move to the end of a 1k-byte "page".

@{b}M-g@{ub}
     Move to an address specified in hex.

@{b}M-j@{ub}
     Move to an address specified in decimal.

@{b}C-c C-c@{ub}
     Leave Hexl mode, going back to the major mode this buffer had
     before you invoked @{b}hexl-mode@{ub}.


@EndNode

@Node "Key Sequence Changes" "emacs/Key Sequence Changes"
@Next "Hook Changes"
@Prev "Other New Modes"
@Toc "Version 19"

Changes in Key Sequences
========================

   In Emacs 18, a key sequence was a sequence of characters, which
represented keyboard input.

   In Emacs 19, you can still use a sequence of characters as a key
sequence, but you aren't limited to characters.  You can also use Lisp
symbols which represent terminal function keys or mouse buttons.  If the
function key has a word as its label, then that word is also the name of
the symbol which represents the function key.  Other function keys are
assigned Lisp names as follows:

@{b}kp-add@{ub}, @{b}kp-decimal@{ub}, @{b}kp-divide@{ub}, ...
     Keypad keys (to the right of the regular keyboard), with names or
     punctuation

@{b}kp-0@{ub}, @{b}kp-1@{ub}, ...
     Keypad keys with digits

@{b}kp-f1@{ub}, @{b}kp-f2@{ub}, @{b}kp-f3@{ub}, @{b}kp-f4@{ub}
     Keypad PF keys

@{b}left@{ub}, @{b}up@{ub}, @{b}right@{ub}, @{b}down@{ub}
     Cursor arrow keys

   A key sequence which contains non-characters must be a vector rather
than a string.

   Thus, to bind function key @{b}f1@{ub} to @{b}rmail@{ub}, write the following:

     (global-set-key [f1] 'rmail)

(To find the name of a key, type @{b}C-h k@{ub} and then the key.)

   To bind the right-arrow key to the command @{b}forward-char@{ub}, you can use
this expression:

     (global-set-key [right] 'forward-char)

using the Lisp syntax for a vector containing the symbol @{b}right@{ub}.

   And this is how to make @{b}C-x RIGHTARROW@{ub} move forward a page:

     (global-set-key [?\C-x right] 'forward-page)

where @{b}?\C-x@{ub} is the Lisp syntax for an integer whose value is the code
for the character @{b}C-x@{ub}.

   You can use modifier keys such as CTRL, META and SHIFT with function
keys.  To represent these modifiers, prepend the strings @{b}C-@{ub}, @{b}M-@{ub} and @{b}S-@{ub}
to the symbol name.  Thus, here is how to make @{b}M-RIGHTARROW@{ub} move
forward a word:

     (global-set-key [M-right] 'forward-word)

   Emacs uses symbols to designate mouse buttons, too.  The ordinary
mouse events in Emacs are @{i}click@{ui} events; these happen when you press a
button and release it without moving the mouse.  You can also get @{i}drag@{ui}
events, when you move the mouse while holding the button down.  Drag
events happen when you finally let go of the button.

   The symbols for basic click events are @{b}mouse-1@{ub} for the leftmost
button, @{b}mouse-2@{ub} for the next, and so on.  Here is how you can redefine
the second mouse button to split the current window:

     (global-set-key [mouse-2] 'split-window-vertically)

   The symbols for drag events are similar, but have the prefix @{b}drag-@{ub}
before the word @{b}mouse@{ub}.  For example, dragging the left button generates
a @{b}drag-mouse-1@{ub} event.

   You can also request events when the mouse button is pressed down.
These events start with @{b}down-@{ub} instead of @{b}drag-@{ub}.  Such events are
generated only if they have key bindings.  When you get a button-down
event, a corresponding click or drag event will always follow.

   The symbols for mouse events also indicate the status of the modifier
keys, with the usual prefixes @{b}C-@{ub}, @{b}M-@{ub} and @{b}S-@{ub}.  These always follow @{b}drag-@{ub}
or @{b}down-@{ub}.

   When mouse events occur in special parts of a frame or window, such
as a mode line or a scroll bar, the event symbol shows nothing special.
The information about the special part is implicit in other data (the
screen location of the event).  But @{b}read-key-sequence@{ub} figures out this
aspect of the event, and encodes it with make-believe prefix keys, all
of which are symbols: @{b}mode-line@{ub}, @{b}vertical-line@{ub}, @{b}horizontal-scrollbar@{ub}
and @{b}vertical-scrollbar@{ub}.  Thus, to define the command for clicking the
left button in a mode line, you could use this key sequence:

     [mode-line mouse-1]

   You are not limited to defining individual function keys or mouse
buttons; these can appear anywhere in a key sequence, just as characters
can.  You can even mix together all three kinds of inputs in one key
sequence--but mixing mouse buttons with keyboard inputs is probably not
convenient for actual use.


@EndNode

@Node "Hook Changes" "emacs/Hook Changes"
@Prev "Key Sequence Changes"
@Toc "Version 19"

Changes Regarding Hooks
=======================

   A @{i}hook variable@{ui} is a variable that exists so that you can store in
it functions for Emacs to call on certain occasions.  (The functions
that you put in hook variables are called @{i}hook functions@{ui}.)  Emacs 19
has a new convention for naming hook variables that indicates more
reliably how to use them.

   All the variables whose names end in @{b}-hook@{ub} are @{i}normal hooks@{ui}; their
values are lists of functions to be called with no arguments.  You can
use @{b}add-hook@{ub} (see below) to install hook functions in these hooks.  We
have made all Emacs hooks into normal hooks except when there is some
reason this won't work.

   A few hook-like variables are @{i}abnormal@{ui}--they don't use the normal
convention.  This is either because the user-supplied functions receive
arguments, or because their return values matter.  These variables have
names that end in @{b}-function@{ub} (if the value is a single function) or
@{b}-functions@{ub} (if the value is a list of functions).

   Thus, you can always tell from the variable's name precisely how to
install a new hook function in the variable.  If the name indicates a
normal hook, then you also know how to write your hook function.

   To add a hook function to a normal hook, use @{b}add-hook@{ub}.  It takes
care of adding a new hook function to any functions already installed in
a given hook.  It takes two arguments, the hook symbol and the function
to add.  For example,

     (add-hook 'text-mode-hook 'my-text-hook-function)

is how to arrange to call @{b}my-text-hook-function@{ub} when entering Text mode
or related modes.  Two new hooks are worth noting here.  Expansion of
an abbrev first runs the hook @{b}pre-abbrev-expand-hook@{ub}.  @{b}kill-buffer-hook@{ub}
now runs whenever a buffer is killed.


@EndNode

@Node "Manifesto" "emacs/Manifesto"
@Prev "Version 19"
@Toc "Main"

The GNU Manifesto
*****************

   @{i}By Richard M. Stallman, 1986@{ui}

What's GNU?  Gnu's Not Unix!
============================

   GNU, which stands for Gnu's Not Unix, is the name for the complete
Unix-compatible software system which I am writing so that I can give it
away free to everyone who can use it.  Several other volunteers are
helping me.  Contributions of time, money, programs and equipment are
greatly needed.

   So far we have an Emacs text editor with Lisp for writing editor
commands, a source level debugger, a yacc-compatible parser generator,
a linker, and around 35 utilities.  A shell (command interpreter) is
nearly completed.  A new portable optimizing C compiler has compiled
itself and may be released this year.  An initial kernel exists but
many more features are needed to emulate Unix.  When the kernel and
compiler are finished, it will be possible to distribute a GNU system
suitable for program development.  We will use TeX as our text
formatter, but an nroff is being worked on.  We will use the free,
portable X window system as well.  After this we will add a portable
Common Lisp, an Empire game, a spreadsheet, and hundreds of other
things, plus on-line documentation.  We hope to supply, eventually,
everything useful that normally comes with a Unix system, and more.

   GNU will be able to run Unix programs, but will not be identical to
Unix.  We will make all improvements that are convenient, based on our
experience with other operating systems.  In particular, we plan to
have longer filenames, file version numbers, a crashproof file system,
filename completion perhaps, terminal-independent display support, and
perhaps eventually a Lisp-based window system through which several
Lisp programs and ordinary Unix programs can share a screen.  Both C
and Lisp will be available as system programming languages.  We will
try to support UUCP, MIT Chaosnet, and Internet protocols for
communication.

   GNU is aimed initially at machines in the 68000/16000 class with
virtual memory, because they are the easiest machines to make it run
on.  The extra effort to make it run on smaller machines will be left
to someone who wants to use it on them.

   To avoid horrible confusion, please pronounce the `G' in the word
`GNU' when it is the name of this project.

Why I Must Write GNU
====================

   I consider that the golden rule requires that if I like a program I
must share it with other people who like it.  Software sellers want to
divide the users and conquer them, making each user agree not to share
with others.  I refuse to break solidarity with other users in this
way.  I cannot in good conscience sign a nondisclosure agreement or a
software license agreement.  For years I worked within the Artificial
Intelligence Lab to resist such tendencies and other inhospitalities,
but eventually they had gone too far: I could not remain in an
institution where such things are done for me against my will.

   So that I can continue to use computers without dishonor, I have
decided to put together a sufficient body of free software so that I
will be able to get along without any software that is not free.  I
have resigned from the AI lab to deny MIT any legal excuse to prevent
me from giving GNU away.

Why GNU Will Be Compatible with Unix
====================================

   Unix is not my ideal system, but it is not too bad.  The essential
features of Unix seem to be good ones, and I think I can fill in what
Unix lacks without spoiling them.  And a system compatible with Unix
would be convenient for many other people to adopt.

How GNU Will Be Available
=========================

   GNU is not in the public domain.  Everyone will be permitted to
modify and redistribute GNU, but no distributor will be allowed to
restrict its further redistribution.  That is to say, proprietary
modifications will not be allowed.  I want to make sure that all
versions of GNU remain free.

Why Many Other Programmers Want to Help
=======================================

   I have found many other programmers who are excited about GNU and
want to help.

   Many programmers are unhappy about the commercialization of system
software.  It may enable them to make more money, but it requires them
to feel in conflict with other programmers in general rather than feel
as comrades.  The fundamental act of friendship among programmers is the
sharing of programs; marketing arrangements now typically used
essentially forbid programmers to treat others as friends.  The
purchaser of software must choose between friendship and obeying the
law.  Naturally, many decide that friendship is more important.  But
those who believe in law often do not feel at ease with either choice.
They become cynical and think that programming is just a way of making
money.

   By working on and using GNU rather than proprietary programs, we can
be hospitable to everyone and obey the law.  In addition, GNU serves as
an example to inspire and a banner to rally others to join us in
sharing.  This can give us a feeling of harmony which is impossible if
we use software that is not free.  For about half the programmers I
talk to, this is an important happiness that money cannot replace.

How You Can Contribute
======================

   I am asking computer manufacturers for donations of machines and
money.  I'm asking individuals for donations of programs and work.

   One consequence you can expect if you donate machines is that GNU
will run on them at an early date.  The machines should be complete,
ready to use systems, approved for use in a residential area, and not
in need of sophisticated cooling or power.

   I have found very many programmers eager to contribute part-time
work for GNU.  For most projects, such part-time distributed work would
be very hard to coordinate; the independently-written parts would not
work together.  But for the particular task of replacing Unix, this
problem is absent.  A complete Unix system contains hundreds of utility
programs, each of which is documented separately.  Most interface
specifications are fixed by Unix compatibility.  If each contributor
can write a compatible replacement for a single Unix utility, and make
it work properly in place of the original on a Unix system, then these
utilities will work right when put together.  Even allowing for Murphy
to create a few unexpected problems, assembling these components will
be a feasible task.  (The kernel will require closer communication and
will be worked on by a small, tight group.)

   If I get donations of money, I may be able to hire a few people full
or part time.  The salary won't be high by programmers' standards, but
I'm looking for people for whom building community spirit is as
important as making money.  I view this as a way of enabling dedicated
people to devote their full energies to working on GNU by sparing them
the need to make a living in another way.

Why All Computer Users Will Benefit
===================================

   Once GNU is written, everyone will be able to obtain good system
software free, just like air.

   This means much more than just saving everyone the price of a Unix
license.  It means that much wasteful duplication of system programming
effort will be avoided.  This effort can go instead into advancing the
state of the art.

   Complete system sources will be available to everyone.  As a result,
a user who needs changes in the system will always be free to make them
himself, or hire any available programmer or company to make them for
him.  Users will no longer be at the mercy of one programmer or company
which owns the sources and is in sole position to make changes.

   Schools will be able to provide a much more educational environment
by encouraging all students to study and improve the system code.
Harvard's computer lab used to have the policy that no program could be
installed on the system if its sources were not on public display, and
upheld it by actually refusing to install certain programs.  I was very
much inspired by this.

   Finally, the overhead of considering who owns the system software
and what one is or is not entitled to do with it will be lifted.

   Arrangements to make people pay for using a program, including
licensing of copies, always incur a tremendous cost to society through
the cumbersome mechanisms necessary to figure out how much (that is,
which programs) a person must pay for.  And only a police state can
force everyone to obey them.  Consider a space station where air must
be manufactured at great cost: charging each breather per liter of air
may be fair, but wearing the metered gas mask all day and all night is
intolerable even if everyone can afford to pay the air bill.  And the
TV cameras everywhere to see if you ever take the mask off are
outrageous.  It's better to support the air plant with a head tax and
chuck the masks.

   Copying all or parts of a program is as natural to a programmer as
breathing, and as productive.  It ought to be as free.

Some Easily Rebutted Objections to GNU's Goals
==============================================

     "Nobody will use it if it is free, because that means they can't
     rely on any support."

     "You have to charge for the program to pay for providing the
     support."

   If people would rather pay for GNU plus service than get GNU free
without service, a company to provide just service to people who have
obtained GNU free ought to be profitable.

   We must distinguish between support in the form of real programming
work and mere handholding.  The former is something one cannot rely on
from a software vendor.  If your problem is not shared by enough
people, the vendor will tell you to get lost.

   If your business needs to be able to rely on support, the only way
is to have all the necessary sources and tools.  Then you can hire any
available person to fix your problem; you are not at the mercy of any
individual.  With Unix, the price of sources puts this out of
consideration for most businesses.  With GNU this will be easy.  It is
still possible for there to be no available competent person, but this
problem cannot be blamed on distribution arrangements.  GNU does not
eliminate all the world's problems, only some of them.

   Meanwhile, the users who know nothing about computers need
handholding: doing things for them which they could easily do
themselves but don't know how.

   Such services could be provided by companies that sell just
hand-holding and repair service.  If it is true that users would rather
spend money and get a product with service, they will also be willing
to buy the service having got the product free.  The service companies
will compete in quality and price; users will not be tied to any
particular one.  Meanwhile, those of us who don't need the service
should be able to use the program without paying for the service.

     "You cannot reach many people without advertising, and you must
     charge for the program to support that."

     "It's no use advertising a program people can get free."

   There are various forms of free or very cheap publicity that can be
used to inform numbers of computer users about something like GNU.  But
it may be true that one can reach more microcomputer users with
advertising.  If this is really so, a business which advertises the
service of copying and mailing GNU for a fee ought to be successful
enough to pay for its advertising and more.  This way, only the users
who benefit from the advertising pay for it.

   On the other hand, if many people get GNU from their friends, and
such companies don't succeed, this will show that advertising was not
really necessary to spread GNU.  Why is it that free market advocates
don't want to let the free market decide this?

     "My company needs a proprietary operating system to get a
     competitive edge."

   GNU will remove operating system software from the realm of
competition.  You will not be able to get an edge in this area, but
neither will your competitors be able to get an edge over you.  You and
they will compete in other areas, while benefitting mutually in this
one.  If your business is selling an operating system, you will not
like GNU, but that's tough on you.  If your business is something else,
GNU can save you from being pushed into the expensive business of
selling operating systems.

   I would like to see GNU development supported by gifts from many
manufacturers and users, reducing the cost to each.

     "Don't programmers deserve a reward for their creativity?"

   If anything deserves a reward, it is social contribution.
Creativity can be a social contribution, but only in so far as society
is free to use the results.  If programmers deserve to be rewarded for
creating innovative programs, by the same token they deserve to be
punished if they restrict the use of these programs.

     "Shouldn't a programmer be able to ask for a reward for his
     creativity?"

   There is nothing wrong with wanting pay for work, or seeking to
maximize one's income, as long as one does not use means that are
destructive.  But the means customary in the field of software today
are based on destruction.

   Extracting money from users of a program by restricting their use of
it is destructive because the restrictions reduce the amount and the
ways that the program can be used.  This reduces the amount of wealth
that humanity derives from the program.  When there is a deliberate
choice to restrict, the harmful consequences are deliberate destruction.

   The reason a good citizen does not use such destructive means to
become wealthier is that, if everyone did so, we would all become
poorer from the mutual destructiveness.  This is Kantian ethics; or,
the Golden Rule.  Since I do not like the consequences that result if
everyone hoards information, I am required to consider it wrong for one
to do so.  Specifically, the desire to be rewarded for one's creativity
does not justify depriving the world in general of all or part of that
creativity.

     "Won't programmers starve?"

   I could answer that nobody is forced to be a programmer.  Most of us
cannot manage to get any money for standing on the street and making
faces.  But we are not, as a result, condemned to spend our lives
standing on the street making faces, and starving.  We do something
else.

   But that is the wrong answer because it accepts the questioner's
implicit assumption: that without ownership of software, programmers
cannot possibly be paid a cent.  Supposedly it is all or nothing.

   The real reason programmers will not starve is that it will still be
possible for them to get paid for programming; just not paid as much as
now.

   Restricting copying is not the only basis for business in software.
It is the most common basis because it brings in the most money.  If it
were prohibited, or rejected by the customer, software business would
move to other bases of organization which are now used less often.
There are always numerous ways to organize any kind of business.

   Probably programming will not be as lucrative on the new basis as it
is now.  But that is not an argument against the change.  It is not
considered an injustice that sales clerks make the salaries that they
now do.  If programmers made the same, that would not be an injustice
either.  (In practice they would still make considerably more than
that.)

     "Don't people have a right to control how their creativity is
     used?"

   "Control over the use of one's ideas" really constitutes control over
other people's lives; and it is usually used to make their lives more
difficult.

   People who have studied the issue of intellectual property rights
carefully (such as lawyers) say that there is no intrinsic right to
intellectual property.  The kinds of supposed intellectual property
rights that the government recognizes were created by specific acts of
legislation for specific purposes.

   For example, the patent system was established to encourage
inventors to disclose the details of their inventions.  Its purpose was
to help society rather than to help inventors.  At the time, the life
span of 17 years for a patent was short compared with the rate of
advance of the state of the art.  Since patents are an issue only among
manufacturers, for whom the cost and effort of a license agreement are
small compared with setting up production, the patents often do not do
much harm.  They do not obstruct most individuals who use patented
products.

   The idea of copyright did not exist in ancient times, when authors
frequently copied other authors at length in works of non-fiction.  This
practice was useful, and is the only way many authors' works have
survived even in part.  The copyright system was created expressly for
the purpose of encouraging authorship.  In the domain for which it was
invented--books, which could be copied economically only on a printing
press--it did little harm, and did not obstruct most of the individuals
who read the books.

   All intellectual property rights are just licenses granted by society
because it was thought, rightly or wrongly, that society as a whole
would benefit by granting them.  But in any particular situation, we
have to ask: are we really better off granting such license?  What kind
of act are we licensing a person to do?

   The case of programs today is very different from that of books a
hundred years ago.  The fact that the easiest way to copy a program is
from one neighbor to another, the fact that a program has both source
code and object code which are distinct, and the fact that a program is
used rather than read and enjoyed, combine to create a situation in
which a person who enforces a copyright is harming society as a whole
both materially and spiritually; in which a person should not do so
regardless of whether the law enables him to.

     "Competition makes things get done better."

   The paradigm of competition is a race: by rewarding the winner, we
encourage everyone to run faster.  When capitalism really works this
way, it does a good job; but its defenders are wrong in assuming it
always works this way.  If the runners forget why the reward is offered
and become intent on winning, no matter how, they may find other
strategies--such as, attacking other runners.  If the runners get into
a fist fight, they will all finish late.

   Proprietary and secret software is the moral equivalent of runners
in a fist fight.  Sad to say, the only referee we've got does not seem
to object to fights; he just regulates them ("For every ten yards you
run, you can fire one shot").  He really ought to break them up, and
penalize runners for even trying to fight.

     "Won't everyone stop programming without a monetary incentive?"

   Actually, many people will program with absolutely no monetary
incentive.  Programming has an irresistible fascination for some
people, usually the people who are best at it.  There is no shortage of
professional musicians who keep at it even though they have no hope of
making a living that way.

   But really this question, though commonly asked, is not appropriate
to the situation.  Pay for programmers will not disappear, only become
less.  So the right question is, will anyone program with a reduced
monetary incentive?  My experience shows that they will.

   For more than ten years, many of the world's best programmers worked
at the Artificial Intelligence Lab for far less money than they could
have had anywhere else.  They got many kinds of non-monetary rewards:
fame and appreciation, for example.  And creativity is also fun, a
reward in itself.

   Then most of them left when offered a chance to do the same
interesting work for a lot of money.

   What the facts show is that people will program for reasons other
than riches; but if given a chance to make a lot of money as well, they
will come to expect and demand it.  Low-paying organizations do poorly
in competition with high-paying ones, but they do not have to do badly
if the high-paying ones are banned.

     "We need the programmers desperately.  If they demand that we stop
     helping our neighbors, we have to obey."

   You're never so desperate that you have to obey this sort of demand.
Remember: millions for defense, but not a cent for tribute!

     "Programmers need to make a living somehow."

   In the short run, this is true.  However, there are plenty of ways
that programmers could make a living without selling the right to use a
program.  This way is customary now because it brings programmers and
businessmen the most money, not because it is the only way to make a
living.  It is easy to find other ways if you want to find them.  Here
are a number of examples.

   A manufacturer introducing a new computer will pay for the porting of
operating systems onto the new hardware.

   The sale of teaching, hand-holding and maintenance services could
also employ programmers.

   People with new ideas could distribute programs as freeware, asking
for donations from satisfied users, or selling hand-holding services.
I have met people who are already working this way successfully.

   Users with related needs can form users' groups, and pay dues.  A
group would contract with programming companies to write programs that
the group's members would like to use.

   All sorts of development can be funded with a Software Tax:

     Suppose everyone who buys a computer has to pay x percent of the
     price as a software tax.  The government gives this to an agency
     like the NSF to spend on software development.

     But if the computer buyer makes a donation to software development
     himself, he can take a credit against the tax.  He can donate to
     the project of his own choosing--often, chosen because he hopes to
     use the results when it is done.  He can take a credit for any
     amount of donation up to the total tax he had to pay.

     The total tax rate could be decided by a vote of the payers of the
     tax, weighted according to the amount they will be taxed on.

     The consequences:

        @{b}*@{ub} The computer-using community supports software development.

        @{b}*@{ub} This community decides what level of support is needed.

        @{b}*@{ub} Users who care which projects their share is spent on can
          choose this for themselves.

   In the long run, making programs free is a step toward the
post-scarcity world, where nobody will have to work very hard just to
make a living.  People will be free to devote themselves to activities
that are fun, such as programming, after spending the necessary ten
hours a week on required tasks such as legislation, family counseling,
robot repair and asteroid prospecting.  There will be no need to be
able to make a living from programming.

   We have already greatly reduced the amount of work that the whole
society must do for its actual productivity, but only a little of this
has translated itself into leisure for workers because much
nonproductive activity is required to accompany productive activity.
The main causes of this are bureaucracy and isometric struggles against
competition.  Free software will greatly reduce these drains in the
area of software production.  We must do this, in order for technical
gains in productivity to translate into less work for us.


@EndNode

@Node "Glossary" "emacs/Glossary"
@Next "Key Index"
@Prev "Intro"
@Toc "Main"

Glossary
********

Abbrev
     An abbrev is a text string which expands into a different text
     string when present in the buffer.  For example, you might define
     a short word as an abbrev for a long phrase that you want to insert
     frequently.  See @{"Abbrevs" Link "Abbrevs"}.

Aborting
     Aborting means getting out of a recursive edit (q.v.).  The
     commands @{b}C-]@{ub} and @{b}M-x top-level@{ub} are used for this.  See @{"Quitting" Link "Quitting"}.

Auto Fill mode
     Auto Fill mode is a minor mode in which text that you insert is
     automatically broken into lines of fixed width.  See @{"Filling" Link "Filling"}.

Auto Saving
     Auto saving is when Emacs automatically stores the contents of an
     Emacs buffer in a specially-named file so that the information will
     not be lost if the buffer is lost due to a system error or user
     error.  See @{"Auto Save" Link "Auto Save"}.

Backup File
     A backup file records the contents that a file had before the
     current editing session.  Emacs makes backup files automatically
     to help you track down or cancel changes you later regret making.
     See @{"Backup" Link "Backup"}.

Balance Parentheses
     Emacs can balance parentheses manually or automatically.  Manual
     balancing is done by the commands to move over balanced expressions
     (see @{"Lists" Link "Lists"}).  Automatic balancing is done by blinking the
     parenthesis that matches one just inserted (see @{"Matching Parens" Link "Matching"}).

Bind
     To bind a key is to change its binding (q.v.).  See @{"Rebinding" Link "Rebinding"}.

Binding
     A key gets its meaning in Emacs by having a binding which is a
     command (q.v.), a Lisp function that is run when the key is typed.
     See @{"Binding" Link "Commands"}.  Customization often involves rebinding a character
     to a different command function.  The bindings of all keys are
     recorded in the keymaps (q.v.).  See @{"Keymaps" Link "Keymaps"}.

Blank Lines
     Blank lines are lines that contain only whitespace.  Emacs has
     several commands for operating on the blank lines in the buffer.

Buffer
     The buffer is the basic editing unit; one buffer corresponds to one
     piece of text being edited.  You can have several buffers, but at
     any time you are editing only one, the `selected' buffer, though
     several can be visible when you are using multiple windows.  See
     @{"Buffers" Link "Buffers"}.

Buffer Selection History
     Emacs keeps a buffer selection history which records how recently
     each Emacs buffer has been selected.  This is used for choosing a
     buffer to select.  See @{"Buffers" Link "Buffers"}.

C-
     @{b}C@{ub} in the name of a character is an abbreviation for Control.  See
     @{"C-" Link "Characters"}.

C-M-
     @{b}C-M-@{ub} in the name of a character is an abbreviation for
     Control-Meta.  See @{"C-M-" Link "Characters"}.

Case Conversion
     Case conversion means changing text from upper case to lower case
     or vice versa.  See @{"Case" Link "Case"}, for the commands for case conversion.

Characters
     Characters form the contents of an Emacs buffer; also, Emacs
     commands are invoked by keys (q.v.), which are sequences of one or
     more characters.  See @{"Characters" Link "Characters"}.

Command
     A command is a Lisp function specially defined to be able to serve
     as a key binding in Emacs.  When you type a key (q.v.), its binding
     (q.v.) is looked up in the relevant keymaps (q.v.) to find the
     command to run.  See @{"Commands" Link "Commands"}.

Command Name
     A command name is the name of a Lisp symbol which is a command
     (see @{"Commands" Link "Commands"}).  You can invoke any command by its name using @{b}M-x@{ub}
     (see @{"M-x" Link "M-x"}).

Comments
     A comment is text in a program which is intended only for humans
     reading the program, and is marked specially so that it will be
     ignored when the program is loaded or compiled.  Emacs offers
     special commands for creating, aligning and killing comments.  See
     @{"Comments" Link "Comments"}.

Compilation
     Compilation is the process of creating an executable program from
     source code.  Emacs has commands for compiling files of Emacs Lisp
     code (see @{"Lisp Libraries" Link "Lisp Libraries"}) and programs in C and other languages
     (see @{"Compilation" Link "Compilation"}).

Complete Key
     A complete key is a character or sequence of characters which,
     when typed by the user, fully specifies one action to be performed
     by Emacs.  For example, @{b}X@{ub} and @{b}Control-f@{ub} and @{b}Control-x m@{ub} are keys.
     Keys derive their meanings from being bound (q.v.) to commands
     (q.v.).  Thus, @{b}X@{ub} is conventionally bound to a command to insert @{b}X@{ub}
     in the buffer; @{b}C-x m@{ub} is conventionally bound to a command to begin
     composing a mail message. See @{"Keys" Link "Keys"}.

Completion
     Completion is what Emacs does when it automatically fills out an
     abbreviation for a name into the entire name.  Completion is done
     for minibuffer (q.v.) arguments when the set of possible valid
     inputs is known; for example, on command names, buffer names, and
     file names.  Completion occurs when TAB, SPC or RET is typed.  See
     @{"Completion" Link "Completion"}.

Continuation Line
     When a line of text is longer than the width of the screen, it
     takes up more than one screen line when displayed.  We say that the
     text line is continued, and all screen lines used for it after the
     first are called continuation lines.  See @{"Continuation" Link "Basic"}.

Control-Character
     ASCII characters with octal codes 0 through 037, and also code
     0177, do not have graphic images assigned to them.  These are the
     control characters.  Any control character can be typed by holding
     down the CTRL key and typing some other character; some have
     special keys on the keyboard.  RET, TAB, ESC, LFD and DEL are all
     control characters.  See @{"Characters" Link "Characters"}.

Copyleft
     A copyleft is a notice giving the public legal permission to
     redistribute a program or other work of art.  Copylefts are used
     by leftists to enrich the public just as copyrights are used by
     rightists to gain power over the public.

Current Buffer
     The current buffer in Emacs is the Emacs buffer on which most
     editing commands operate.  You can select any Emacs buffer as the
     current one.  See @{"Buffers" Link "Buffers"}.

Current Line
     The line point is on (see @{"Point" Link "Point"}).

Current Paragraph
     The paragraph that point is in.  If point is between paragraphs,
     the current paragraph is the one that follows point.  See
     @{"Paragraphs" Link "Paragraphs"}.

Current Defun
     The defun (q.v.) that point is in.  If point is between defuns, the
     current defun is the one that follows point.  See @{"Defuns" Link "Defuns"}.

Cursor
     The cursor is the rectangle on the screen which indicates the
     position called point (q.v.) at which insertion and deletion takes
     place.  The cursor is on or under the character that follows
     point.  Often people speak of `the cursor' when, strictly
     speaking, they mean `point'.  See @{"Cursor" Link "Basic"}.

Customization
     Customization is making minor changes in the way Emacs works.  It
     is often done by setting variables (see @{"Variables" Link "Variables"}) or by rebinding
     keys (see @{"Keymaps" Link "Keymaps"}).

Default Argument
     The default for an argument is the value that will be assumed if
     you do not specify one.  When the minibuffer is used to read an
     argument, the default argument is used if you just type RET.  See
     @{"Minibuffer" Link "Minibuffer"}.

Default Directory
     When you specify a file name that does not start with @{b}/@{ub} or @{b}~@{ub}, it
     is interpreted relative to the current buffer's default directory.
     See @{"Default Directory" Link "Minibuffer File"}.

Defun
     A defun is a list at the top level of parenthesis or bracket
     structure in a program.  It is so named because most such lists in
     Lisp programs are calls to the Lisp function @{b}defun@{ub}.  See @{"Defuns" Link "Defuns"}.

DEL
     DEL is a character that runs the command to delete one character of
     text.  See @{"DEL" Link "Basic"}.

Deletion
     Deletion means erasing text without saving it.  Emacs deletes text
     only when it is expected not to be worth saving (all whitespace, or
     only one character).  The alternative is killing (q.v.).  See
     @{"Deletion" Link "Killing"}.

Deletion of Files
     Deleting a file means erasing it from the file system.  See
     @{"Misc File Ops" Link "Misc File Ops"}.

Deletion of Messages
     Deleting a message means flagging it to be eliminated from your
     mail file.  This can be undone by undeletion until the mail file
     is expunged.  See @{"Rmail Deletion" Link "Rmail Deletion"}.

Deletion of Windows
     Deleting a window means eliminating it from the screen.  Other
     windows expand to use up the space.  The deleted window can never
     come back, but no actual text is thereby lost.  See @{"Windows" Link "Windows"}.

Directory
     Files in the Unix file system are grouped into file directories.
     See @{"Directories" Link "ListDir"}.

Dired
     Dired is the Emacs facility that displays the contents of a file
     directory and allows you to "edit the directory", performing
     operations on the files in the directory.  See @{"Dired" Link "Dired"}.

Disabled Command
     A disabled command is one that you may not run without special
     confirmation.  The usual reason for disabling a command is that it
     is confusing for beginning users.  See @{"Disabling" Link "Disabling"}.

Dribble File
     A file into which Emacs writes all the characters that the user
     types on the keyboard.  Dribble files are used to make a record for
     debugging Emacs bugs.  Emacs does not make a dribble file unless
     you tell it to.  See @{"Bugs" Link "Bugs"}.

Echo Area
     The echo area is the bottom line of the screen, used for echoing
     the arguments to commands, for asking questions, and printing brief
     messages (including error messages).  See @{"Echo Area" Link "Echo Area"}.

Echoing
     Echoing is acknowledging the receipt of commands by displaying them
     (in the echo area).  Emacs never echoes single-character keys;
     longer keys echo only if you pause while typing them.

Error
     An error occurs when an Emacs command cannot execute in the current
     circumstances.  When an error occurs, execution of the command
     stops (unless the command has been programmed to do otherwise) and
     Emacs reports the error by printing an error message (q.v.).
     Type-ahead is discarded.  Then Emacs is ready to read another
     editing command.

Error Messages
     Error messages are single lines of output printed by Emacs when the
     user asks for something impossible to do (such as, killing text
     forward when point is at the end of the buffer).  They appear in
     the echo area, accompanied by a beep.

ESC
     ESC is a character, used to end incremental searches and as a
     prefix for typing Meta characters on keyboards lacking a META key.
     Unlike the META key (which, like the SHIFT key, is held down
     while another character is typed), the ESC key is pressed once and
     applies to the next character typed.

Fill Prefix
     The fill prefix is a string that should be expected at the
     beginning of each line when filling is done.  It is not regarded
     as part of the text to be filled.  See @{"Filling" Link "Filling"}.

Filling
     Filling text means moving text from line to line so that all the
     lines are approximately the same length.  See @{"Filling" Link "Filling"}.

Global
     Global means `independent of the current environment; in effect
     throughout Emacs'.  It is the opposite of local (q.v.).  Particular
     examples of the use of `global' appear below.

Global Abbrev
     A global definition of an abbrev (q.v.) is effective in all major
     modes that do not have local (q.v.) definitions for the same
     abbrev.  See @{"Abbrevs" Link "Abbrevs"}.

Global Keymap
     The global keymap (q.v.) contains key bindings that are in effect
     except when overridden by local key bindings in a major mode's
     local keymap (q.v.).  See @{"Keymaps" Link "Keymaps"}.

Global Substitution
     Global substitution means replacing each occurrence of one string
     by another string through a large amount of text.  See @{"Replace" Link "Replace"}.

Global Variable
     The global value of a variable (q.v.) takes effect in all buffers
     that do not have their own local (q.v.) values for the variable.
     See @{"Variables" Link "Variables"}.

Graphic Character
     Graphic characters are those assigned pictorial images rather than
     just names.  All the non-Meta (q.v.) characters except for the
     Control (q.v.) characters are graphic characters.  These include
     letters, digits, punctuation, and spaces; they do not include RET
     or ESC.  In Emacs, typing a graphic character inserts that
     character (in ordinary editing modes).  See @{"Basic Editing" Link "Basic"}.

Grinding
     Grinding means adjusting the indentation in a program to fit the
     nesting structure.  See @{"Grinding" Link "Indentation"}.

Hardcopy
     Hardcopy means printed output.  Emacs has commands for making
     printed listings of text in Emacs buffers.  See @{"Hardcopy" Link "Hardcopy"}.

HELP
     You can type HELP at any time to ask what options you have, or to
     ask what any command does.  HELP is really @{b}Control-h@{ub}.  See @{"Help" Link "Help"}.

Inbox
     An inbox is a file in which mail is delivered by the operating
     system.  Rmail transfers mail from inboxes to mail files (q.v.) in
     which the mail is then stored permanently or until explicitly
     deleted.  See @{"Rmail Inbox" Link "Rmail Inbox"}.

Indentation
     Indentation means blank space at the beginning of a line.  Most
     programming languages have conventions for using indentation to
     illuminate the structure of the program, and Emacs has special
     features to help you set up the correct indentation.  See
     @{"Indentation" Link "Indentation"}.

Insertion
     Insertion means copying text into the buffer, either from the
     keyboard or from some other place in Emacs.

Justification
     Justification means adding extra spaces to lines of text to make
     them come exactly to a specified width.  See @{"Justification" Link "Filling"}.

Keyboard Macros
     Keyboard macros are a way of defining new Emacs commands from
     sequences of existing ones, with no need to write a Lisp program.
     See @{"Keyboard Macros" Link "Keyboard Macros"}.

Key
     A key is a sequence of characters that, when input to Emacs,
     specify or begin to specify a single action for Emacs to perform.
     That is, the sequence is not more than a single unit.  If the key
     is enough to specify one action, it is a complete key (q.v.); if
     it is less than enough, it is a prefix key (q.v.).  See @{"Keys" Link "Keys"}.

Keymap
     The keymap is the data structure that records the bindings (q.v.)
     of keys to the commands that they run.  For example, the keymap
     binds the character @{b}C-n@{ub} to the command function @{b}next-line@{ub}.  See
     @{"Keymaps" Link "Keymaps"}.

Kill Ring
     The kill ring is where all text you have killed recently is saved.
     You can reinsert any of the killed text still in the ring; this is
     called yanking (q.v.).  See @{"Yanking" Link "Yanking"}.

Killing
     Killing means erasing text and saving it on the kill ring so it
     can be yanked (q.v.) later.  Some other systems call this
     "cutting".  Most Emacs commands to erase text do killing, as
     opposed to deletion (q.v.).  See @{"Killing" Link "Killing"}.

Killing Jobs
     Killing a job (such as, an invocation of Emacs) means making it
     cease to exist.  Any data within it, if not saved in a file, is
     lost.  See @{"Exiting" Link "Exiting"}.

List
     A list is, approximately, a text string beginning with an open
     parenthesis and ending with the matching close parenthesis.  In C
     mode and other non-Lisp modes, groupings surrounded by other kinds
     of matched delimiters appropriate to the language, such as braces,
     are also considered lists.  Emacs has special commands for many
     operations on lists.  See @{"Lists" Link "Lists"}.

Local
     Local means `in effect only in a particular context'; the relevant
     kind of context is a particular function execution, a particular
     buffer, or a particular major mode.  It is the opposite of `global'
     (q.v.).  Specific uses of `local' in Emacs terminology appear
     below.

Local Abbrev
     A local abbrev definition is effective only if a particular major
     mode is selected.  In that major mode, it overrides any global
     definition for the same abbrev.  See @{"Abbrevs" Link "Abbrevs"}.

Local Keymap
     A local keymap is used in a particular major mode; the key bindings
     (q.v.) in the current local keymap override global bindings of the
     same keys.  See @{"Keymaps" Link "Keymaps"}.

Local Variable
     A local value of a variable (q.v.) applies to only one buffer.
     See @{"Locals" Link "Locals"}.

M-
     @{b}M-@{ub} in the name of a character is an abbreviation for META, one of
     the modifier keys that can accompany any character.  See
     @{"Characters" Link "Characters"}.

M-C-
     @{b}M-C-@{ub} in the name of a character is an abbreviation for
     Control-Meta; it means the same thing as @{b}C-M-@{ub}.  If your terminal
     lacks a real META key, you type a Control-Meta character by typing
     ESC and then typing the corresponding Control character.  See @{"C-M-" Link "Characters"}.

M-x
     @{b}M-x@{ub} is the key which is used to call an Emacs command by name.
     This is how commands that are not bound to keys are called.  See
     @{"M-x" Link "M-x"}.

Mail
     Mail means messages sent from one user to another through the
     computer system, to be read at the recipient's convenience.  Emacs
     has commands for composing and sending mail, and for reading and
     editing the mail you have received.  See @{"Sending Mail" Link "Sending Mail"}.  See @{"Rmail" Link "Rmail"},
     for how to read mail.

Mail File
     A mail file is a file which is edited using Rmail and in which
     Rmail stores mail.  See @{"Rmail" Link "Rmail"}.

Major Mode
     The major modes are a mutually exclusive set of options each of
     which configures Emacs for editing a certain sort of text.
     Ideally, each programming language has its own major mode.  See
     @{"Major Modes" Link "Major Modes"}.

Mark
     The mark points to a position in the text.  It specifies one end of
     the region (q.v.), point being the other end.  Many commands
     operate on all the text from point to the mark.  See @{"Mark" Link "Mark"}.

Mark Ring
     The mark ring is used to hold several recent previous locations of
     the mark, just in case you want to move back to them.  See
     @{"Mark Ring" Link "Mark Ring"}.

Message
     See `mail'.

Meta
     Meta is the name of a modifier bit which a command character may
     have.  It is present in a character if the character is typed with
     the META key held down.  Such characters are given names that start
     with @{b}Meta-@{ub}.  For example, @{b}Meta-<@{ub} is typed by holding down META and
     at the same time typing @{b}<@{ub} (which itself is done, on most
     terminals, by holding down SHIFT and typing @{b},@{ub}).  See @{"Meta" Link "Characters"}.

Meta Character
     A Meta character is one whose character code includes the Meta bit.

Minibuffer
     The minibuffer is the window that appears when necessary inside the
     echo area (q.v.), used for reading arguments to commands.  See
     @{"Minibuffer" Link "Minibuffer"}.

Minor Mode
     A minor mode is an optional feature of Emacs which can be switched
     on or off independently of all other features.  Each minor mode
     has a command to turn it on or off.  See @{"Minor Modes" Link "Minor Modes"}.

Mode Line
     The mode line is the line at the bottom of each text window (q.v.),
     which gives status information on the buffer displayed in that
     window.  See @{"Mode Line" Link "Mode Line"}.

Modified Buffer
     A buffer (q.v.) is modified if its text has been changed since the
     last time the buffer was saved (or since when it was created, if it
     has never been saved).  See @{"Saving" Link "Saving"}.

Moving Text
     Moving text means erasing it from one place and inserting it in
     another.  This is done by killing (q.v.) and then yanking (q.v.).
     See @{"Killing" Link "Killing"}.

Named Mark
     A named mark is a register (q.v.) in its role of recording a
     location in text so that you can move point to that location.  See
     @{"Registers" Link "Registers"}.

Narrowing
     Narrowing means creating a restriction (q.v.) that limits editing
     in the current buffer to only a part of the text in the buffer.
     Text outside that part is inaccessible to the user until the
     boundaries are widened again, but it is still there, and saving
     the file saves it all.  See @{"Narrowing" Link "Narrowing"}.

Newline
     LFD characters in the buffer terminate lines of text and are
     called newlines.  See @{"Newline" Link "Characters"}.

Numeric Argument
     A numeric argument is a number, specified before a command, to
     change the effect of the command.  Often the numeric argument
     serves as a repeat count.  See @{"Arguments" Link "Arguments"}.

Option
     An option is a variable (q.v.) that exists so that you can
     customize Emacs by giving it a new value.  See @{"Variables" Link "Variables"}.

Overwrite Mode
     Overwrite mode is a minor mode.  When it is enabled, ordinary text
     characters replace the existing text after point rather than
     pushing it to the right.  See @{"Minor Modes" Link "Minor Modes"}.

Page
     A page is a unit of text, delimited by formfeed characters (ASCII
     Control-L, code 014) coming at the beginning of a line.  Some Emacs
     commands are provided for moving over and operating on pages.  See
     @{"Pages" Link "Pages"}.

Paragraphs
     Paragraphs are the medium-size unit of English text.  There are
     special Emacs commands for moving over and operating on paragraphs.
     See @{"Paragraphs" Link "Paragraphs"}.

Parsing
     We say that Emacs parses words or expressions in the text being
     edited.  Really, all it knows how to do is find the other end of a
     word or expression.  See @{"Syntax" Link "Syntax"}.

Point
     Point is the place in the buffer at which insertion and deletion
     occur.  Point is considered to be between two characters, not at
     one character.  The terminal's cursor (q.v.) indicates the
     location of point.  See @{"Point" Link "Basic"}.

Prefix Key
     A prefix key is a key (q.v.) whose sole function is to introduce a
     set of multi-character keys.  @{b}Control-x@{ub} is an example of prefix
     key; thus, any two-character sequence starting with @{b}C-x@{ub} is also a
     legitimate key.  See @{"Keys" Link "Keys"}.

Primary Mail File
     Your primary mail file is the file named @{b}RMAIL@{ub} in your home
     directory, where all mail that you receive is stored by Rmail
     unless you make arrangements to do otherwise.  See @{"Rmail" Link "Rmail"}.

Prompt
     A prompt is text printed to ask the user for input.  Printing a
     prompt is called prompting.  Emacs prompts always appear in the
     echo area (q.v.).  One kind of prompting happens when the
     minibuffer is used to read an argument (see @{"Minibuffer" Link "Minibuffer"}); the
     echoing which happens when you pause in the middle of typing a
     multicharacter key is also a kind of prompting (see @{"Echo Area" Link "Echo Area"}).

Quitting
     Quitting means cancelling a partially typed command or a running
     command, using @{b}C-g@{ub}.  See @{"Quitting" Link "Quitting"}.

Quoting
     Quoting means depriving a character of its usual special
     significance.  In Emacs this is usually done with @{b}Control-q@{ub}.  What
     constitutes special significance depends on the context and on
     convention.  For example, an "ordinary" character as an Emacs
     command inserts itself; so in this context, a special character is
     any character that does not normally insert itself (such as DEL,
     for example), and quoting it makes it insert itself as if it were
     not special.  Not all contexts allow quoting.  See @{"Quoting" Link "Basic"}.

Read-only Buffer
     A read-only buffer is one whose text you are not allowed to change.
     Normally Emacs makes buffers read-only when they contain text which
     has a special significance to Emacs; for example, Dired buffers.
     Visiting a file that is write protected also makes a read-only
     buffer.  See @{"Buffers" Link "Buffers"}.

Recursive Editing Level
     A recursive editing level is a state in which part of the
     execution of a command involves asking the user to edit some text.
     This text may or may not be the same as the text to which the
     command was applied.  The mode line indicates recursive editing
     levels with square brackets (@{b}[@{ub} and @{b}]@{ub}).  See @{"Recursive Edit" Link "Recursive Edit"}.

Redisplay
     Redisplay is the process of correcting the image on the screen to
     correspond to changes that have been made in the text being edited.
     See @{"Redisplay" Link "Screen"}.

Regexp
     See `regular expression'.

Region
     The region is the text between point (q.v.) and the mark (q.v.).
     Many commands operate on the text of the region.  See @{"Region" Link "Mark"}.

Registers
     Registers are named slots in which text or buffer positions or
     rectangles can be saved for later use.  See @{"Registers" Link "Registers"}.

Regular Expression
     A regular expression is a pattern that can match various text
     strings; for example, @{b}l[0-9]+@{ub} matches @{b}l@{ub} followed by one or more
     digits.  See @{"Regexps" Link "Regexps"}.

Replacement
     See `global substitution'.

Restriction
     A buffer's restriction is the amount of text, at the beginning or
     the end of the buffer, that is temporarily invisible and
     inaccessible.  Giving a buffer a nonzero amount of restriction is
     called narrowing (q.v.).  See @{"Narrowing" Link "Narrowing"}.

RET
     RET is a character that in Emacs runs the command to insert a
     newline into the text.  It is also used to terminate most arguments
     read in the minibuffer (q.v.).  See @{"Return" Link "Characters"}.

Saving
     Saving a buffer means copying its text into the file that was
     visited (q.v.) in that buffer.  This is the way text in files
     actually gets changed by your Emacs editing.  See @{"Saving" Link "Saving"}.

Scrolling
     Scrolling means shifting the text in the Emacs window so as to see
     a different part of the buffer.  See @{"Scrolling" Link "Display"}.

Searching
     Searching means moving point to the next occurrence of a specified
     string.  See @{"Search" Link "Search"}.

Selecting
     Selecting a buffer means making it the current (q.v.) buffer.  See
     @{"Selecting" Link "Buffers"}.

Self-documentation
     Self-documentation is the feature of Emacs which can tell you what
     any command does, or give you a list of all commands related to a topic you specify.
     You ask for self-documentation with the help character, @{b}C-h@{ub}.  See
     @{"Help" Link "Help"}.

Sentences
     Emacs has commands for moving by or killing by sentences.  See
     @{"Sentences" Link "Sentences"}.

Sexp
     A sexp (short for `s-expression') is the basic syntactic unit of
     Lisp in its textual form: either a list, or Lisp atom.  Many Emacs
     commands operate on sexps.  The term `sexp' is generalized to
     languages other than Lisp, to mean a syntactically recognizable
     expression.  See @{"Sexps" Link "Lists"}.

Simultaneous Editing
     Simultaneous editing means two users modifying the same file at
     once.  Simultaneous editing if not detected can cause one user to
     lose his work.  Emacs detects all cases of simultaneous editing
     and warns the user to investigate them.  See @{"Simultaneous Editing" Link "Interlocking"}.

String
     A string is a kind of Lisp data object which contains a sequence of
     characters.  Many Emacs variables are intended to have strings as
     values.  The Lisp syntax for a string consists of the characters in
     the string with a @{b}"@{ub} before and another @{b}"@{ub} after.  A @{b}"@{ub} that is part
     of the string must be written as @{b}\"@{ub} and a @{b}\ @{ub} that is part of the
     string must be written as @{b}\\ @{ub}.  All other characters, including
     newline, can be included just by writing them inside the string;
     however, escape sequences as in C, such as @{b}\n@{ub} for newline or @{b}\241@{ub}
     using an octal character code, are allowed as well.

String Substitution
     See `global substitution'.

Syntax Table
     The syntax table tells Emacs which characters are part of a word,
     which characters balance each other like parentheses, etc.  See
     @{"Syntax" Link "Syntax"}.

Tag Table
     A tag table is a file that serves as an index to the function
     definitions in one or more other files.  See @{"Tags" Link "Tags"}.

Termscript File
     A termscript file contains a record of all characters sent by
     Emacs to the terminal.  It is used for tracking down bugs in Emacs
     redisplay.  Emacs does not make a termscript file unless you tell
     it to.  See @{"Bugs" Link "Bugs"}.

Text
     Two meanings (see @{"Text" Link "Text"}):

        @{b}*@{ub} Data consisting of a sequence of characters, as opposed to
          binary numbers, images, graphics commands, executable
          programs, and the like.  The contents of an Emacs buffer are
          always text in this sense.

        @{b}*@{ub} Data consisting of written human language, as opposed to
          programs, or following the stylistic conventions of human
          language.

Top Level
     Top level is the normal state of Emacs, in which you are editing
     the text of the file you have visited.  You are at top level
     whenever you are not in a recursive editing level (q.v.) or the
     minibuffer (q.v.), and not in the middle of a command.  You can
     get back to top level by aborting (q.v.) and quitting (q.v.).  See
     @{"Quitting" Link "Quitting"}.

Transposition
     Transposing two units of text means putting each one into the place
     formerly occupied by the other.  There are Emacs commands to
     transpose two adjacent characters, words, sexps (q.v.) or lines
     (see @{"Transpose" Link "Transpose"}).

Truncation
     Truncating text lines in the display means leaving out any text on
     a line that does not fit within the right margin of the window
     displaying it.  See also `continuation line'.  See @{"Truncation" Link "Basic"}.

Undoing
     Undoing means making your previous editing go in reverse, bringing
     back the text that existed earlier in the editing session.  See
     @{"Undo" Link "Undo"}.

Variable
     A variable is an object in Lisp that can store an arbitrary value.
     Emacs uses some variables for internal purposes, and has others
     (known as `options' (q.v.)) just so that you can set their values
     to control the behavior of Emacs.  The variables used in Emacs
     that you are likely to be interested in are listed in the
     Variables Index in this manual.  See @{"Variables" Link "Variables"}, for information on
     variables.

Visiting
     Visiting a file means loading its contents into a buffer (q.v.)
     where they can be edited.  See @{"Visiting" Link "Visiting"}.

Whitespace
     Whitespace is any run of consecutive formatting characters (space,
     tab, newline, and backspace).

Widening
     Widening is removing any restriction (q.v.) on the current buffer;
     it is the opposite of narrowing (q.v.).  See @{"Narrowing" Link "Narrowing"}.

Window
     Emacs divides the screen into one or more windows, each of which
     can display the contents of one buffer (q.v.) at any time.  See
     @{"Screen" Link "Screen"}, for basic information on how Emacs uses the screen.  See
     @{"Windows" Link "Windows"}, for commands to control the use of windows.

Word Abbrev
     Synonymous with `abbrev'.

Word Search
     Word search is searching for a sequence of words, considering the
     punctuation between them as insignificant.  See @{"Word Search" Link "Word Search"}.

Yanking
     Yanking means reinserting text previously killed.  It can be used
     to undo a mistaken kill, or for copying or moving text.  Some other
     systems call this "pasting".  See @{"Yanking" Link "Yanking"}.


@EndNode

@Node "Key Index" "emacs/Key Index"
@Next "Command Index"
@Prev "Glossary"
@Toc "Main"

Key (Character) Index
*********************



 @{" ! (query-replace) " Link "Query Replace"}                    Query Replace
 @{" ! (Dired, V19) " Link "Shell Commands in Dired"}                       Shell Commands in Dired
 @{" " (TeX mode) " Link "TeX Editing"}                         TeX Editing
 @{" $ (Dired, V19) " Link "Hiding Subdirectories"}                       Hiding Subdirectories
 @{" % C (Dired, V19) " Link "Dired Regexps"}                     Dired Regexps
 @{" % d (Dired, V19) " Link "Dired Regexps"}                     Dired Regexps
 @{" % H (Dired, V19) " Link "Dired Regexps"}                     Dired Regexps
 @{" % l (Dired, V19) " Link "Dired Case Conversion"}                     Dired Case Conversion
 @{" % m (Dired, V19) " Link "Dired Regexps"}                     Dired Regexps
 @{" % R (Dired, V19) " Link "Dired Regexps"}                     Dired Regexps
 @{" % S (Dired, V19) " Link "Dired Regexps"}                     Dired Regexps
 @{" % u (Dired, V19) " Link "Dired Case Conversion"}                     Dired Case Conversion
 @{" * (Dired, V19) " Link "Marks in Dired"}                       Marks in Dired
 @{" , (query-replace) " Link "Query Replace"}                    Query Replace
 @{" . (query-replace) " Link "Query Replace"}                    Query Replace
 @{" . (Rmail) " Link "Rmail Scrolling"}                            Rmail Scrolling
 @{" / (Dired, V19) " Link "Marks in Dired"}                       Marks in Dired
 @{" < (Rmail in V19) " Link "Mail Changes"}                     Mail Changes
 @{" = (Dired, V19) " Link "Comparison in Dired"}                       Comparison in Dired
 @{" > (Rmail) " Link "Rmail Motion"}                            Rmail Motion
 @{" @ (Dired, V19) " Link "Marks in Dired"}                       Marks in Dired
 @{" TAB (Shell mode in V19) " Link "Shell Changes"}              Shell Changes
 @{" a (Rmail) " Link "Rmail Labels"}                            Rmail Labels
 @{" B (Dired, V19) " Link "Multiple Files"}                       Multiple Files
 @{" c (Rmail) " Link "Rmail Reply"}                            Rmail Reply
 @{" C (Dired, V19) " Link "Multiple Files"}                       Multiple Files
 @{" c (Dired, V19) " Link "Marks in Dired"}                       Marks in Dired
 @{" C-a " Link "Basic"}                                  Basic
 @{" C-a (Shell mode in V19) " Link "Shell Changes"}              Shell Changes
 @{" C-b " Link "Basic"}                                  Basic
 @{" C-c " Link "Keys"}                                  Keys
 @{" C-c ' (Picture mode) " Link "Insert in Picture"}                 Insert in Picture
 @{" C-c . (Picture mode) " Link "Insert in Picture"}                 Insert in Picture
 @{" C-c / (Picture mode) " Link "Insert in Picture"}                 Insert in Picture
 @{" C-c ; (Fortran mode) " Link "Fortran Comments"}                 Fortran Comments
 @{" C-c < (Picture mode) " Link "Insert in Picture"}                 Insert in Picture
 @{" C-c < (GUD in V19) " Link "Commands of GUD"}                   Commands of GUD
 @{" C-c > (Picture mode) " Link "Insert in Picture"}                 Insert in Picture
 @{" C-c > (GUD in V19) " Link "Commands of GUD"}                   Commands of GUD
 @{" C-c TAB (TeX mode in V19) " Link "TeX Mode Changes"}            TeX Mode Changes
 @{" C-c { (TeX mode in V19) " Link "TeX Mode Changes"}              TeX Mode Changes
 @{" C-c } (TeX mode in V19) " Link "TeX Mode Changes"}              TeX Mode Changes
 @{" C-c C-b (Outline mode) " Link "Outline Motion"}               Outline Motion
 @{" C-c C-b (Picture mode) " Link "Insert in Picture"}               Insert in Picture
 @{" C-c C-b (TeX mode) " Link "TeX Print"}                   TeX Print
 @{" C-c C-c (Edit Abbrevs) " Link "Editing Abbrevs"}               Editing Abbrevs
 @{" C-c C-c (Edit Tab Stops) " Link "Tab Stops"}             Tab Stops
 @{" C-c C-c (Mail mode) " Link "Mail Mode"}                  Mail Mode
 @{" C-c C-c (Occur mode) " Link "Other Repeating Search"}                 Other Repeating Search
 @{" C-c C-c (Shell mode) " Link "Shell Mode"}                 Shell Mode
 @{" C-c C-c (GUD in V19) " Link "Commands of GUD"}                 Commands of GUD
 @{" C-c C-d (Picture mode) " Link "Basic Picture"}               Basic Picture
 @{" C-c C-d (Shell mode) " Link "Shell Mode"}                 Shell Mode
 @{" C-c C-e (TeX mode in V19) " Link "TeX Mode Changes"}            TeX Mode Changes
 @{" C-c C-f (LaTeX mode) " Link "TeX Editing"}                 TeX Editing
 @{" C-c C-f (Outline mode) " Link "Outline Motion"}               Outline Motion
 @{" C-c C-f (Picture mode) " Link "Insert in Picture"}               Insert in Picture
 @{" C-c C-f (GUD in V19) " Link "Commands of GUD"}                 Commands of GUD
 @{" C-c C-f C-c (Mail mode) " Link "Mail Mode"}              Mail Mode
 @{" C-c C-f C-s (Mail mode) " Link "Mail Mode"}              Mail Mode
 @{" C-c C-f C-t (Mail mode) " Link "Mail Mode"}              Mail Mode
 @{" C-c C-h (Outline mode) " Link "Outline Visibility"}               Outline Visibility
 @{" C-c C-i (Outline mode) " Link "Outline Visibility"}               Outline Visibility
 @{" C-c C-i (GUD in V19) " Link "Commands of GUD"}                 Commands of GUD
 @{" C-c C-k (Picture mode) " Link "Rectangles in Picture"}               Rectangles in Picture
 @{" C-c C-k (TeX mode) " Link "TeX Print"}                   TeX Print
 @{" C-c C-l (TeX mode) " Link "TeX Print"}                   TeX Print
 @{" C-c C-l (GUD in V19) " Link "Commands of GUD"}                 Commands of GUD
 @{" C-c C-n (Fortran mode) " Link "Fortran Motion"}               Fortran Motion
 @{" C-c C-n (Outline mode) " Link "Outline Motion"}               Outline Motion
 @{" C-c C-n (GUD in V19) " Link "Commands of GUD"}                 Commands of GUD
 @{" C-c C-o (Shell mode) " Link "Shell Mode"}                 Shell Mode
 @{" C-c C-o (Shell mode in V19) " Link "Shell Changes"}          Shell Changes
 @{" C-c C-o (TeX mode in V19) " Link "TeX Mode Changes"}            TeX Mode Changes
 @{" C-c C-p (Fortran mode) " Link "Fortran Motion"}               Fortran Motion
 @{" C-c C-p (Outline mode) " Link "Outline Motion"}               Outline Motion
 @{" C-c C-p (TeX mode) " Link "TeX Print"}                   TeX Print
 @{" C-c C-q (Mail mode) " Link "Mail Mode"}                  Mail Mode
 @{" C-c C-q (TeX mode) " Link "TeX Print"}                   TeX Print
 @{" C-c C-r (Fortran mode) " Link "Fortran Columns"}               Fortran Columns
 @{" C-c C-r (Shell mode) " Link "Shell Mode"}                 Shell Mode
 @{" C-c C-r (TeX mode) " Link "TeX Print"}                   TeX Print
 @{" C-c C-r (Shell mode in V19) " Link "Shell Changes"}          Shell Changes
 @{" C-c C-s (Mail mode) " Link "Mail Mode"}                  Mail Mode
 @{" C-c C-s (Outline mode) " Link "Outline Visibility"}               Outline Visibility
 @{" C-c C-s (GUD in V19) " Link "Commands of GUD"}                 Commands of GUD
 @{" C-c C-u (Outline mode) " Link "Outline Motion"}               Outline Motion
 @{" C-c C-u (Shell mode) " Link "Shell Mode"}                 Shell Mode
 @{" C-c C-v (TeX mode in V19) " Link "TeX Mode Changes"}            TeX Mode Changes
 @{" C-c C-w (Fortran mode) " Link "Fortran Columns"}               Fortran Columns
 @{" C-c C-w (Mail mode) " Link "Mail Mode"}                  Mail Mode
 @{" C-c C-w (Picture mode) " Link "Rectangles in Picture"}               Rectangles in Picture
 @{" C-c C-w (Shell mode) " Link "Shell Mode"}                 Shell Mode
 @{" C-c C-x (Picture mode) " Link "Rectangles in Picture"}               Rectangles in Picture
 @{" C-c C-y (Mail mode) " Link "Mail Mode"}                  Mail Mode
 @{" C-c C-y (Mail mode) " Link "Rmail Reply"}                  Rmail Reply
 @{" C-c C-y (Picture mode) " Link "Rectangles in Picture"}               Rectangles in Picture
 @{" C-c C-y (Shell mode) " Link "Shell Mode"}                 Shell Mode
 @{" C-c C-z (Shell mode) " Link "Shell Mode"}                 Shell Mode
 @{" C-c C-\ (Shell mode) " Link "Shell Mode"}                 Shell Mode
 @{" C-c TAB (Picture mode) " Link "Tabs in Picture"}               Tabs in Picture
 @{" C-c \ (Picture mode) " Link "Insert in Picture"}                 Insert in Picture
 @{" C-c ^ (Picture mode) " Link "Insert in Picture"}                 Insert in Picture
 @{" C-c ` (Picture mode) " Link "Insert in Picture"}                 Insert in Picture
 @{" C-d " Link "Killing"}                                  Killing
 @{" C-d (Rmail) " Link "Rmail Deletion"}                          Rmail Deletion
 @{" C-d (Shell mode in V19) " Link "Shell Changes"}              Shell Changes
 @{" C-e " Link "Basic"}                                  Basic
 @{" C-f " Link "Basic"}                                  Basic
 @{" C-g " Link "Minibuffer"}                                  Minibuffer
 @{" C-h " Link "Keys"}                                  Keys
 @{" C-h a " Link "Help"}                                Help
 @{" C-h a (V19) " Link "New Commands"}                          New Commands
 @{" C-h b " Link "Help"}                                Help
 @{" C-h c " Link "Help"}                                Help
 @{" C-h C-c " Link "Help"}                              Help
 @{" C-h C-d " Link "Help"}                              Help
 @{" C-h C-f (V19) " Link "New Commands"}                        New Commands
 @{" C-h C-k (V19) " Link "New Commands"}                        New Commands
 @{" C-h C-w " Link "Help"}                              Help
 @{" C-h f " Link "Help"}                                Help
 @{" C-h f " Link "Documentation"}                                Documentation
 @{" C-h i " Link "Help"}                                Help
 @{" C-h k " Link "Help"}                                Help
 @{" C-h l " Link "Help"}                                Help
 @{" C-h m " Link "Help"}                                Help
 @{" C-h n " Link "Help"}                                Help
 @{" C-h s " Link "Syntax Change"}                                Syntax Change
 @{" C-h t " Link "Basic"}                                Basic
 @{" C-h t " Link "Help"}                                Help
 @{" C-h v " Link "Documentation"}                                Documentation
 @{" C-h v " Link "Help"}                                Help
 @{" C-h v " Link "Examining"}                                Examining
 @{" C-h w " Link "Help"}                                Help
 @{" C-k " Link "Killing"}                                  Killing
 @{" C-k " Link "Killing"}                                  Killing
 @{" C-l " Link "Basic"}                                  Basic
 @{" C-l " Link "Scrolling"}                                  Scrolling
 @{" C-l (query-replace) " Link "Query Replace"}                  Query Replace
 @{" C-M-@ " Link "Lists"}                                Lists
 @{" C-M-@ " Link "Marking Objects"}                                Marking Objects
 @{" C-M-a " Link "Defuns"}                                Defuns
 @{" C-M-a (Fortran mode) " Link "Fortran Motion"}                 Fortran Motion
 @{" C-M-b " Link "Lists"}                                Lists
 @{" C-M-c " Link "Recursive Edit"}                                Recursive Edit
 @{" C-M-d " Link "Lists"}                                Lists
 @{" C-M-d (Dired, V19) " Link "Subdirectories in Dired"}                   Subdirectories in Dired
 @{" C-M-e " Link "Defuns"}                                Defuns
 @{" C-M-e (Fortran mode) " Link "Fortran Motion"}                 Fortran Motion
 @{" C-M-f " Link "Lists"}                                Lists
 @{" C-M-f (V19) " Link "Changed Commands"}                          Changed Commands
 @{" C-M-h " Link "Defuns"}                                Defuns
 @{" C-M-h " Link "Marking Objects"}                                Marking Objects
 @{" C-M-h (Fortran mode) " Link "Fortran Motion"}                 Fortran Motion
 @{" C-M-k " Link "Killing"}                                Killing
 @{" C-M-k " Link "Lists"}                                Lists
 @{" C-M-l (Rmail) " Link "Rmail Make Summary"}                        Rmail Make Summary
 @{" C-M-l (Rmail) " Link "Rmail Labels"}                        Rmail Labels
 @{" C-M-l (V19) " Link "New Commands"}                          New Commands
 @{" C-M-m (Rmail in V19) " Link "Mail Changes"}                 Mail Changes
 @{" C-M-n " Link "Lists"}                                Lists
 @{" C-M-n (Rmail) " Link "Rmail Labels"}                        Rmail Labels
 @{" C-M-n (Dired, V19) " Link "Subdirectories in Dired"}                   Subdirectories in Dired
 @{" C-M-n (Summary mode) (GNUS, V19) " Link "Summary of GNUS"}     Summary of GNUS
 @{" C-M-o " Link "Indentation Commands"}                                Indentation Commands
 @{" C-M-p " Link "Lists"}                                Lists
 @{" C-M-p (Rmail) " Link "Rmail Labels"}                        Rmail Labels
 @{" C-M-p (Dired, V19) " Link "Subdirectories in Dired"}                   Subdirectories in Dired
 @{" C-M-p (Summary mode) (GNUS, V19) " Link "Summary of GNUS"}     Summary of GNUS
 @{" C-M-q " Link "Multi-line Indent"}                                Multi-line Indent
 @{" C-M-q (Fortran mode) " Link "ForIndent Commands"}                 ForIndent Commands
 @{" C-M-r (Rmail) " Link "Rmail Make Summary"}                        Rmail Make Summary
 @{" C-M-r (V19) " Link "New Commands"}                          New Commands
 @{" C-M-s " Link "Regexp Search"}                                Regexp Search
 @{" C-M-t " Link "Transpose"}                                Transpose
 @{" C-M-t " Link "Lists"}                                Lists
 @{" C-M-u " Link "Lists"}                                Lists
 @{" C-M-u (Dired, V19) " Link "Subdirectories in Dired"}                   Subdirectories in Dired
 @{" C-M-v " Link "Minibuffer Edit"}                                Minibuffer Edit
 @{" C-M-v " Link "Other Window"}                                Other Window
 @{" C-M-w " Link "Appending Kills"}                                Appending Kills
 @{" C-M-x " Link "External Lisp"}                                External Lisp
 @{" C-M-x " Link "Lisp Eval"}                                Lisp Eval
 @{" C-M-\ " Link "Indentation Commands"}                                Indentation Commands
 @{" C-M-\ " Link "Multi-line Indent"}                                Multi-line Indent
 @{" C-n " Link "Basic"}                                  Basic
 @{" C-n (Rmail summary) " Link "Rmail Summary Edit"}                  Rmail Summary Edit
 @{" C-n (Group mode) (GNUS, V19) " Link "Summary of GNUS"}         Summary of GNUS
 @{" C-n (Rmail summary in V19) " Link "Mail Changes"}           Mail Changes
 @{" C-n (Summary mode) (GNUS, V19) " Link "Summary of GNUS"}       Summary of GNUS
 @{" C-o " Link "Blank Lines"}                                  Blank Lines
 @{" C-o (Rmail) " Link "Rmail Output"}                          Rmail Output
 @{" C-o (V19) " Link "Changed Commands"}                            Changed Commands
 @{" C-p " Link "Basic"}                                  Basic
 @{" C-p (Rmail summary) " Link "Rmail Summary Edit"}                  Rmail Summary Edit
 @{" C-p (Group mode) (GNUS, V19) " Link "Summary of GNUS"}         Summary of GNUS
 @{" C-p (Rmail summary in V19) " Link "Mail Changes"}           Mail Changes
 @{" C-p (Summary mode) (GNUS, V19) " Link "Summary of GNUS"}       Summary of GNUS
 @{" C-q " Link "Basic"}                                  Basic
 @{" C-r " Link "Incremental Search"}                                  Incremental Search
 @{" C-r (query-replace) " Link "Query Replace"}                  Query Replace
 @{" C-s " Link "Incremental Search"}                                  Incremental Search
 @{" C-SPC " Link "Setting Mark"}                                Setting Mark
 @{" C-t " Link "Basic"}                                  Basic
 @{" C-t " Link "Transpose"}                                  Transpose
 @{" C-u " Link "Arguments"}                                  Arguments
 @{" C-u - C-x ; " Link "Comments"}                          Comments
 @{" C-u C-@ " Link "Mark Ring"}                              Mark Ring
 @{" C-u C-SPC " Link "Mark Ring"}                            Mark Ring
 @{" C-u TAB " Link "Multi-line Indent"}                              Multi-line Indent
 @{" C-v " Link "Scrolling"}                                  Scrolling
 @{" C-w " Link "Killing"}                                  Killing
 @{" C-w (query-replace) " Link "Query Replace"}                  Query Replace
 @{" C-x " Link "Keys"}                                  Keys
 @{" C-x $ " Link "Selective Display"}                                Selective Display
 @{" C-x & (GUD in V19) " Link "GUD Customization"}                   GUD Customization
 @{" C-x ( " Link "Basic Kbd Macro"}                                Basic Kbd Macro
 @{" C-x ) " Link "Basic Kbd Macro"}                                Basic Kbd Macro
 @{" C-x + " Link "Defining Abbrevs"}                                Defining Abbrevs
 @{" C-x - " Link "Defining Abbrevs"}                                Defining Abbrevs
 @{" C-x . " Link "Fill Prefix"}                                Fill Prefix
 @{" C-x / " Link "RegPos"}                                RegPos
 @{" C-x 0 " Link "Change Window"}                                Change Window
 @{" C-x 1 " Link "Change Window"}                                Change Window
 @{" C-x 2 " Link "Split Window"}                                Split Window
 @{" C-x 2 (V19) " Link "Changed Commands"}                          Changed Commands
 @{" C-x 3 (V19) " Link "Binding Changes"}                          Binding Changes
 @{" C-x 4 " Link "Pop Up Window"}                                Pop Up Window
 @{" C-x 4 . " Link "Find Tag"}                              Find Tag
 @{" C-x 4 a " Link "Change Log"}                              Change Log
 @{" C-x 4 a (V19) " Link "M-x Changes"}                        M-x Changes
 @{" C-x 4 b " Link "Select Buffer"}                              Select Buffer
 @{" C-x 4 C-o (V19) " Link "Binding Changes"}                      Binding Changes
 @{" C-x 4 d " Link "Dired Enter"}                              Dired Enter
 @{" C-x 4 f " Link "Visiting"}                              Visiting
 @{" C-x 4 m " Link "Sending Mail"}                              Sending Mail
 @{" C-x 4 r (V19) " Link "New Commands"}                        New Commands
 @{" C-x 5 " Link "Split Window"}                                Split Window
 @{" C-x 5 . (V19) " Link "New Commands"}                        New Commands
 @{" C-x 5 (V19) " Link "New Commands"}                          New Commands
 @{" C-x 5 b (V19) " Link "New Commands"}                        New Commands
 @{" C-x 5 C-f (V19) " Link "New Commands"}                      New Commands
 @{" C-x 5 m (V19) " Link "New Commands"}                        New Commands
 @{" C-x ; " Link "Comments"}                                Comments
 @{" C-x < " Link "Horizontal Scrolling"}                                Horizontal Scrolling
 @{" C-x = " Link "Position Info"}                                Position Info
 @{" C-x > " Link "Horizontal Scrolling"}                                Horizontal Scrolling
 @{" C-x SPC (V19) " Link "Commands of GUD"}                        Commands of GUD
 @{" C-x } " Link "Change Window"}                                Change Window
 @{" C-x a " Link "Accumulating Text"}                                Accumulating Text
 @{" C-x a (V19) " Link "Binding Changes"}                          Binding Changes
 @{" C-x b " Link "Select Buffer"}                                Select Buffer
 @{" C-x C-a " Link "Defining Abbrevs"}                              Defining Abbrevs
 @{" C-x C-b " Link "List Buffers"}                              List Buffers
 @{" C-x C-c " Link "Exiting"}                              Exiting
 @{" C-x C-d " Link "ListDir"}                              ListDir
 @{" C-x C-e " Link "Lisp Eval"}                              Lisp Eval
 @{" C-x C-f " Link "Visiting"}                              Visiting
 @{" C-x C-h " Link "Defining Abbrevs"}                              Defining Abbrevs
 @{" C-x C-l " Link "Case"}                              Case
 @{" C-x C-l (V19) " Link "Binding Changes"}                        Binding Changes
 @{" C-x C-o " Link "Blank Lines"}                              Blank Lines
 @{" C-x C-o " Link "Killing"}                              Killing
 @{" C-x C-p " Link "Pages"}                              Pages
 @{" C-x C-p " Link "Marking Objects"}                              Marking Objects
 @{" C-x C-q " Link "Misc Buffer"}                              Misc Buffer
 @{" C-x C-q (V19) " Link "Editing with VC"}                        Editing with VC
 @{" C-x C-s " Link "Saving"}                              Saving
 @{" C-x C-t " Link "Transpose"}                              Transpose
 @{" C-x C-u " Link "Case"}                              Case
 @{" C-x C-u (V19) " Link "Binding Changes"}                        Binding Changes
 @{" C-x C-v " Link "Visiting"}                              Visiting
 @{" C-x C-v (V19) " Link "Changed Commands"}                        Changed Commands
 @{" C-x C-w " Link "Saving"}                              Saving
 @{" C-x C-x " Link "Setting Mark"}                              Setting Mark
 @{" C-x d " Link "Dired Enter"}                                Dired Enter
 @{" C-x DEL " Link "Killing"}                              Killing
 @{" C-x DEL " Link "Kill Errors"}                              Kill Errors
 @{" C-x DEL " Link "Sentences"}                              Sentences
 @{" C-x e " Link "Basic Kbd Macro"}                                Basic Kbd Macro
 @{" C-x ESC " Link "Repetition"}                              Repetition
 @{" C-x f " Link "Fill Commands"}                                Fill Commands
 @{" C-x g " Link "RegText"}                                RegText
 @{" C-x h " Link "Marking Objects"}                                Marking Objects
 @{" C-x j " Link "RegPos"}                                RegPos
 @{" C-x k " Link "Kill Buffer"}                                Kill Buffer
 @{" C-x l " Link "Pages"}                                Pages
 @{" C-x m " Link "Sending Mail"}                                Sending Mail
 @{" C-x n " Link "Narrowing"}                                Narrowing
 @{" C-x n (V19) " Link "Binding Changes"}                          Binding Changes
 @{" C-x o " Link "Other Window"}                                Other Window
 @{" C-x q " Link "Kbd Macro Query"}                                Kbd Macro Query
 @{" C-x r (V19) " Link "Binding Changes"}                          Binding Changes
 @{" C-x s " Link "Saving"}                                Saving
 @{" C-x s (V19) " Link "Changed Commands"}                          Changed Commands
 @{" C-x TAB " Link "Indentation Commands"}                              Indentation Commands
 @{" C-x u " Link "Undo"}                                Undo
 @{" C-x v = (V19) " Link "Comparing Versions"}                        Comparing Versions
 @{" C-x v a (V19) " Link "Change Logs and VC"}                        Change Logs and VC
 @{" C-x v c (V19) " Link "Editing with VC"}                        Editing with VC
 @{" C-x v d (V19) " Link "VC Status"}                        VC Status
 @{" C-x v h (V19) " Link "Version Headers"}                        Version Headers
 @{" C-x v i (V19) " Link "Editing with VC"}                        Editing with VC
 @{" C-x v l (V19) " Link "VC Status"}                        VC Status
 @{" C-x v r (V19) " Link "Making Snapshots"}                        Making Snapshots
 @{" C-x v s (V19) " Link "Making Snapshots"}                        Making Snapshots
 @{" C-x v u (V19) " Link "Editing with VC"}                        Editing with VC
 @{" C-x w " Link "Narrowing"}                                Narrowing
 @{" C-x x " Link "RegText"}                                RegText
 @{" C-x [ " Link "Pages"}                                Pages
 @{" C-x ] " Link "Pages"}                                Pages
 @{" C-x ^ " Link "Change Window"}                                Change Window
 @{" C-x ` " Link "Compilation"}                                Compilation
 @{" C-y " Link "Kill Ring"}                                  Kill Ring
 @{" C-z " Link "Exiting"}                                  Exiting
 @{" C-z (V19) " Link "New Commands"}                            New Commands
 @{" C-] " Link "Quitting"}                                  Quitting
 @{" C-] " Link "Recursive Edit"}                                  Recursive Edit
 @{" C-_ " Link "Undo"}                                  Undo
 @{" d (Rmail summary) " Link "Rmail Summary Edit"}                    Rmail Summary Edit
 @{" d (Rmail) " Link "Rmail Deletion"}                            Rmail Deletion
 @{" DEL " Link "Program Modes"}                                  Program Modes
 @{" DEL " Link "Major Modes"}                                  Major Modes
 @{" DEL " Link "Basic"}                                  Basic
 @{" DEL " Link "Killing"}                                  Killing
 @{" DEL " Link "Kill Errors"}                                  Kill Errors
 @{" DEL (query-replace) " Link "Query Replace"}                  Query Replace
 @{" DEL (Rmail summary) " Link "Rmail Summary Edit"}                  Rmail Summary Edit
 @{" DEL (Rmail) " Link "Rmail Scrolling"}                          Rmail Scrolling
 @{" DEL (Group mode) (GNUS, V19) " Link "Summary of GNUS"}         Summary of GNUS
 @{" DEL (Summary mode) (GNUS, V19) " Link "Summary of GNUS"}       Summary of GNUS
 @{" e (Rmail) " Link "Rmail Deletion"}                            Rmail Deletion
 @{" e (Rmail in V19) " Link "Mail Changes"}                     Mail Changes
 @{" ESC " Link "Keys"}                                  Keys
 @{" ESC (query-replace) " Link "Query Replace"}                  Query Replace
 @{" f (Rmail) " Link "Rmail Reply"}                            Rmail Reply
 @{" g (Rmail) " Link "Rmail Files"}                            Rmail Files
 @{" g (Dired, V19) " Link "Editing Dired Buffer"}                       Editing Dired Buffer
 @{" G (Dired, V19) " Link "Multiple Files"}                       Multiple Files
 @{" h (Rmail) " Link "Rmail Make Summary"}                            Rmail Make Summary
 @{" H (Dired, V19) " Link "Multiple Files"}                       Multiple Files
 @{" Help " Link "Help"}                                 Help
 @{" i (Rmail) " Link "Rmail Files"}                            Rmail Files
 @{" i (Dired, V19) " Link "Subdirectories in Dired"}                       Subdirectories in Dired
 @{" j (Rmail summary) " Link "Rmail Summary Edit"}                    Rmail Summary Edit
 @{" j (Rmail) " Link "Rmail Motion"}                            Rmail Motion
 @{" k (rmail) " Link "Rmail Labels"}                            Rmail Labels
 @{" k (Dired, V19) " Link "Editing Dired Buffer"}                       Editing Dired Buffer
 @{" l (Rmail) " Link "Rmail Make Summary"}                            Rmail Make Summary
 @{" L (Dired, V19) " Link "Multiple Files"}                       Multiple Files
 @{" l (Dired, V19) " Link "Editing Dired Buffer"}                       Editing Dired Buffer
 @{" l (Group mode) (GNUS, V19) " Link "Summary of GNUS"}           Summary of GNUS
 @{" L (Group mode) (GNUS, V19) " Link "Summary of GNUS"}           Summary of GNUS
 @{" LFD " Link "Basic Indent"}                                  Basic Indent
 @{" LFD " Link "Major Modes"}                                  Major Modes
 @{" LFD (TeX mode) " Link "TeX Editing"}                       TeX Editing
 @{" m (Rmail) " Link "Rmail Reply"}                            Rmail Reply
 @{" m (Dired, V19) " Link "Marks in Dired"}                       Marks in Dired
 @{" M (Dired, V19) " Link "Multiple Files"}                       Multiple Files
 @{" M-! " Link "Single Shell"}                                  Single Shell
 @{" M-! (V19) " Link "Changed Commands"}                            Changed Commands
 @{" M-$ " Link "Spelling"}                                  Spelling
 @{" M-$ (Dired, V19) " Link "Hiding Subdirectories"}                     Hiding Subdirectories
 @{" M-$ (V19) " Link "Spell Changes"}                            Spell Changes
 @{" M-% " Link "Query Replace"}                                  Query Replace
 @{" M-' " Link "Expanding Abbrevs"}                                  Expanding Abbrevs
 @{" M-( " Link "Balanced Editing"}                                  Balanced Editing
 @{" M-) " Link "Balanced Editing"}                                  Balanced Editing
 @{" M-, " Link "Tags Search"}                                  Tags Search
 @{" M-. " Link "Find Tag"}                                  Find Tag
 @{" M-. (V19) " Link "Tags Changes"}                            Tags Changes
 @{" M-/ " Link "Dynamic Abbrevs"}                                  Dynamic Abbrevs
 @{" M-1 " Link "Arguments"}                                  Arguments
 @{" M-; " Link "Comments"}                                  Comments
 @{" M-< " Link "Basic"}                                  Basic
 @{" M-= " Link "Position Info"}                                  Position Info
 @{" M-= (Dired, V19) " Link "Comparison in Dired"}                     Comparison in Dired
 @{" M-> " Link "Basic"}                                  Basic
 @{" M-? " Link "Nroff Mode"}                                  Nroff Mode
 @{" M-? (Shell mode in V19) " Link "Shell Changes"}              Shell Changes
 @{" M-@ " Link "Words"}                                  Words
 @{" M-@ " Link "Marking Objects"}                                  Marking Objects
 @{" M-DEL (Dired, V19) " Link "Marks in Dired"}                   Marks in Dired
 @{" M-TAB (V19) " Link "Tags Changes"}                          Tags Changes
 @{" M-- " Link "Arguments"}                                  Arguments
 @{" M-- M-c " Link "Fixing Case"}                              Fixing Case
 @{" M-- M-l " Link "Fixing Case"}                              Fixing Case
 @{" M-- M-u " Link "Fixing Case"}                              Fixing Case
 @{" M-{ (TeX mode) " Link "TeX Editing"}                       TeX Editing
 @{" M-{ (V19) " Link "Binding Changes"}                            Binding Changes
 @{" M-} (TeX mode) " Link "TeX Editing"}                       TeX Editing
 @{" M-} (V19) " Link "Binding Changes"}                            Binding Changes
 @{" M-a " Link "Sentences"}                                  Sentences
 @{" M-a (C mode in V19) " Link "New Commands"}                  New Commands
 @{" M-b " Link "Words"}                                  Words
 @{" M-c " Link "Case"}                                  Case
 @{" M-d " Link "Words"}                                  Words
 @{" M-d " Link "Killing"}                                  Killing
 @{" M-DEL " Link "Kill Errors"}                                Kill Errors
 @{" M-DEL " Link "Killing"}                                Killing
 @{" M-DEL " Link "Words"}                                Words
 @{" M-e " Link "Sentences"}                                  Sentences
 @{" M-e (C mode in V19) " Link "New Commands"}                  New Commands
 @{" M-ESC " Link "Lisp Eval"}                                Lisp Eval
 @{" M-f " Link "Words"}                                  Words
 @{" M-g " Link "Fill Commands"}                                  Fill Commands
 @{" M-g (V19) " Link "Binding Changes"}                            Binding Changes
 @{" M-h " Link "Marking Objects"}                                  Marking Objects
 @{" M-h " Link "Paragraphs"}                                  Paragraphs
 @{" M-i " Link "Tab Stops"}                                  Tab Stops
 @{" M-k " Link "Sentences"}                                  Sentences
 @{" M-k " Link "Killing"}                                  Killing
 @{" M-l " Link "Case"}                                  Case
 @{" M-LFD " Link "Comments"}                                Comments
 @{" M-LFD (Fortran mode) " Link "ForIndent Commands"}                 ForIndent Commands
 @{" M-m " Link "Indentation Commands"}                                  Indentation Commands
 @{" M-n " Link "Nroff Mode"}                                  Nroff Mode
 @{" M-n " Link "Repetition"}                                  Repetition
 @{" M-n (Rmail) " Link "Rmail Motion"}                          Rmail Motion
 @{" M-n (Rmail summary in V19) " Link "Mail Changes"}           Mail Changes
 @{" M-n (Shell mode in V19) " Link "Shell Changes"}              Shell Changes
 @{" M-n (V19) " Link "New Facilities"}                            New Facilities
 @{" M-p " Link "Nroff Mode"}                                  Nroff Mode
 @{" M-p " Link "Repetition"}                                  Repetition
 @{" M-p (Rmail) " Link "Rmail Motion"}                          Rmail Motion
 @{" M-p (Rmail summary in V19) " Link "Mail Changes"}           Mail Changes
 @{" M-p (Shell mode in V19) " Link "Shell Changes"}              Shell Changes
 @{" M-p (V19) " Link "New Facilities"}                            New Facilities
 @{" M-q " Link "Fill Commands"}                                  Fill Commands
 @{" M-q (C mode in V19) " Link "New Commands"}                  New Commands
 @{" M-q (C mode in V19) " Link "Filling Changes"}                  Filling Changes
 @{" M-r " Link "Basic"}                                  Basic
 @{" M-r (Shell mode in V19) " Link "Shell Changes"}              Shell Changes
 @{" M-r (V19) " Link "New Facilities"}                            New Facilities
 @{" M-s " Link "Fill Commands"}                                  Fill Commands
 @{" M-s (Rmail) " Link "Rmail Motion"}                          Rmail Motion
 @{" M-s (Shell mode in V19) " Link "Shell Changes"}              Shell Changes
 @{" M-s (Summary mode) (GNUS, V19) " Link "Summary of GNUS"}       Summary of GNUS
 @{" M-s (V19) " Link "New Facilities"}                            New Facilities
 @{" M-SPC " Link "Killing"}                                Killing
 @{" M-t " Link "Transpose"}                                  Transpose
 @{" M-t " Link "Words"}                                  Words
 @{" M-TAB " Link "Tabs in Picture"}                                Tabs in Picture
 @{" M-TAB " Link "Lisp Completion"}                                Lisp Completion
 @{" M-u " Link "Case"}                                  Case
 @{" M-v " Link "Scrolling"}                                  Scrolling
 @{" M-w " Link "Kill Ring"}                                  Kill Ring
 @{" M-x " Link "M-x"}                                  M-x
 @{" M-x gnus (V19) " Link "GNUS"}                       GNUS
 @{" M-y " Link "Earlier Kills"}                                  Earlier Kills
 @{" M-z " Link "Killing"}                                  Killing
 @{" M-z (V19) " Link "Changed Commands"}                            Changed Commands
 @{" M-[ " Link "Paragraphs"}                                  Paragraphs
 @{" M-\ " Link "Killing"}                                  Killing
 @{" M-\ " Link "Indentation Commands"}                                  Indentation Commands
 @{" M-] " Link "Paragraphs"}                                  Paragraphs
 @{" M-^ " Link "Killing"}                                  Killing
 @{" M-^ " Link "Indentation Commands"}                                  Indentation Commands
 @{" M-^ (V19) " Link "Changed Commands"}                            Changed Commands
 @{" M-| " Link "Single Shell"}                                  Single Shell
 @{" M-~ " Link "Saving"}                                  Saving
 @{" n (Rmail summary) " Link "Rmail Summary Edit"}                    Rmail Summary Edit
 @{" n (Rmail) " Link "Rmail Motion"}                            Rmail Motion
 @{" n (Group mode) (GNUS, V19) " Link "Summary of GNUS"}           Summary of GNUS
 @{" n (Rmail summary in V19) " Link "Mail Changes"}             Mail Changes
 @{" o (Rmail) " Link "Rmail Output"}                            Rmail Output
 @{" O (Dired, V19) " Link "Multiple Files"}                       Multiple Files
 @{" p (Rmail summary) " Link "Rmail Summary Edit"}                    Rmail Summary Edit
 @{" p (Rmail) " Link "Rmail Motion"}                            Rmail Motion
 @{" P (Dired, V19) " Link "Multiple Files"}                       Multiple Files
 @{" p (Group mode) (GNUS, V19) " Link "Summary of GNUS"}           Summary of GNUS
 @{" p (Rmail summary in V19) " Link "Mail Changes"}             Mail Changes
 @{" q (Rmail summary) " Link "Rmail Summary Edit"}                    Rmail Summary Edit
 @{" q (Rmail) " Link "Rmail"}                            Rmail
 @{" q (Group mode) (GNUS, V19) " Link "Summary of GNUS"}           Summary of GNUS
 @{" r (Rmail) " Link "Rmail Reply"}                            Rmail Reply
 @{" R (Dired, V19) " Link "Multiple Files"}                       Multiple Files
 @{" RET " Link "Basic"}                                  Basic
 @{" RET (Shell mode) " Link "Shell Mode"}                     Shell Mode
 @{" s (Rmail) " Link "Rmail"}                            Rmail
 @{" S (Dired, V19) " Link "Multiple Files"}                       Multiple Files
 @{" s (Summary mode) (GNUS, V19) " Link "Summary of GNUS"}         Summary of GNUS
 @{" SPC " Link "Completion"}                                  Completion
 @{" SPC (query-replace) " Link "Query Replace"}                  Query Replace
 @{" SPC (Rmail summary) " Link "Rmail Summary Edit"}                  Rmail Summary Edit
 @{" SPC (Rmail) " Link "Rmail Scrolling"}                          Rmail Scrolling
 @{" SPC (Group mode) (GNUS, V19) " Link "Summary of GNUS"}         Summary of GNUS
 @{" SPC (Summary mode) (GNUS, V19) " Link "Summary of GNUS"}       Summary of GNUS
 @{" t (Rmail) " Link "Rmail Editing"}                            Rmail Editing
 @{" TAB " Link "Basic Indent"}                                  Basic Indent
 @{" TAB " Link "Completion"}                                  Completion
 @{" TAB " Link "Indentation"}                                  Indentation
 @{" TAB " Link "Text Mode"}                                  Text Mode
 @{" TAB " Link "Indentation"}                                  Indentation
 @{" TAB " Link "Major Modes"}                                  Major Modes
 @{" u (Rmail summary) " Link "Rmail Summary Edit"}                    Rmail Summary Edit
 @{" u (Rmail) " Link "Rmail Deletion"}                            Rmail Deletion
 @{" u (Group mode) (GNUS, V19) " Link "Summary of GNUS"}           Summary of GNUS
 @{" w (Rmail) " Link "Rmail Editing"}                            Rmail Editing
 @{" x (Rmail summary) " Link "Rmail Summary Edit"}                    Rmail Summary Edit
 @{" x (Rmail in V19) " Link "Mail Changes"}                     Mail Changes
 @{" Z (Dired, V19) " Link "Multiple Files"}                       Multiple Files
 @{" z (Group mode) (GNUS, V19) " Link "Summary of GNUS"}           Summary of GNUS
 @{" ^ (query-replace) " Link "Query Replace"}                    Query Replace


@EndNode

@Node "Command Index" "emacs/Command Index"
@Next "Variable Index"
@Prev "Key Index"
@Toc "Main"

Command and Function Index
**************************



 @{" abbrev-mode " Link "Abbrevs"}                          Abbrevs
 @{" abbrev-prefix-mark " Link "Expanding Abbrevs"}                   Expanding Abbrevs
 @{" abort-recursive-edit " Link "Quitting"}                 Quitting
 @{" abort-recursive-edit " Link "Recursive Edit"}                 Recursive Edit
 @{" add-change-log-entry " Link "Change Log"}                 Change Log
 @{" add-change-log-entry (V19) " Link "M-x Changes"}           M-x Changes
 @{" add-change-log-entry-other-window " Link "Change Log"}    Change Log
 @{" add-global-abbrev " Link "Defining Abbrevs"}                    Defining Abbrevs
 @{" add-hook (V19) " Link "Hook Changes"}                       Hook Changes
 @{" add-mode-abbrev " Link "Defining Abbrevs"}                      Defining Abbrevs
 @{" add-name-to-file " Link "Misc File Ops"}                     Misc File Ops
 @{" append-next-kill " Link "Appending Kills"}                     Appending Kills
 @{" append-to-buffer " Link "Accumulating Text"}                     Accumulating Text
 @{" append-to-file " Link "Misc File Ops"}                       Misc File Ops
 @{" append-to-file " Link "Accumulating Text"}                       Accumulating Text
 @{" apropos " Link "Help"}                              Help
 @{" apropros (V19) " Link "New Commands"}                       New Commands
 @{" ask-user-about-lock " Link "Interlocking"}                  Interlocking
 @{" auto-fill-mode " Link "Auto Fill"}                       Auto Fill
 @{" auto-save-mode " Link "Auto Save Control"}                       Auto Save Control
 @{" back-to-indentation " Link "Indentation Commands"}                  Indentation Commands
 @{" backward-char " Link "Basic"}                        Basic
 @{" backward-delete-char-untabify " Link "Program Modes"}        Program Modes
 @{" backward-kill-sentence " Link "Sentences"}               Sentences
 @{" backward-kill-sentence " Link "Kill Errors"}               Kill Errors
 @{" backward-kill-sentence " Link "Killing"}               Killing
 @{" backward-kill-word " Link "Killing"}                   Killing
 @{" backward-kill-word " Link "Words"}                   Words
 @{" backward-kill-word " Link "Kill Errors"}                   Kill Errors
 @{" backward-list " Link "Lists"}                        Lists
 @{" backward-page " Link "Pages"}                        Pages
 @{" backward-paragraph " Link "Paragraphs"}                   Paragraphs
 @{" backward-sentence " Link "Sentences"}                    Sentences
 @{" backward-sexp " Link "Lists"}                        Lists
 @{" backward-text-line " Link "Nroff Mode"}                   Nroff Mode
 @{" backward-up-list " Link "Lists"}                     Lists
 @{" backward-word " Link "Words"}                        Words
 @{" batch-byte-compile " Link "Compiling Libraries"}                   Compiling Libraries
 @{" beginning-of-buffer " Link "Basic"}                  Basic
 @{" beginning-of-defun " Link "Defuns"}                   Defuns
 @{" beginning-of-fortran-subprogram " Link "Fortran Motion"}      Fortran Motion
 @{" beginning-of-line " Link "Basic"}                    Basic
 @{" buffer-enable-undo " Link "Undo"}                   Undo
 @{" buffer-menu " Link "Several Buffers"}                          Several Buffers
 @{" byte-compile-file " Link "Compiling Libraries"}                    Compiling Libraries
 @{" byte-recompile-directory " Link "Compiling Libraries"}             Compiling Libraries
 @{" c-beginning-of-statement (V19) " Link "New Commands"}       New Commands
 @{" c-end-of-statement (V19) " Link "New Commands"}             New Commands
 @{" c-fill-paragraph (V19) " Link "Filling Changes"}               Filling Changes
 @{" c-fill-paragraph (V19) " Link "New Commands"}               New Commands
 @{" c-indent-line " Link "Basic Indent"}                        Basic Indent
 @{" c-macro-expand " Link "Macro Expansion"}                       Macro Expansion
 @{" c-up-conditional (V19) " Link "New Commands"}               New Commands
 @{" calendar-count-days-region (V19) " Link "Calendar"}     Calendar
 @{" calendar-cursor-holidays (V19) " Link "Calendar"}       Calendar
 @{" calendar-goto-astro-date (V19) " Link "Calendar"}       Calendar
 @{" calendar-goto-french-date (V19) " Link "Calendar"}      Calendar
 @{" calendar-goto-hebrew-date (V19) " Link "Calendar"}      Calendar
 @{" calendar-goto-islamic-date (V19) " Link "Calendar"}     Calendar
 @{" calendar-goto-iso-date (V19) " Link "Calendar"}         Calendar
 @{" calendar-goto-julian-date (V19) " Link "Calendar"}      Calendar
 @{" calendar-print-astro-date (V19) " Link "Calendar"}      Calendar
 @{" calendar-print-french-date (V19) " Link "Calendar"}     Calendar
 @{" calendar-print-hebrew-date (V19) " Link "Calendar"}     Calendar
 @{" calendar-print-islamic-date (V19) " Link "Calendar"}    Calendar
 @{" calendar-print-iso-date (V19) " Link "Calendar"}        Calendar
 @{" calendar-print-julian-date (V19) " Link "Calendar"}     Calendar
 @{" calendar-print-mayan-date (V19) " Link "Calendar"}      Calendar
 @{" calendar-unmark (V19) " Link "Calendar"}                Calendar
 @{" calendar-unmark (V19) " Link "Displaying Diary"}                Displaying Diary
 @{" call-last-kbd-macro " Link "Basic Kbd Macro"}                  Basic Kbd Macro
 @{" cancel-debug-on-entry " Link "Lisp Debug"}                Lisp Debug
 @{" capitalize-word " Link "Case"}                      Case
 @{" capitalize-word " Link "Fixing Case"}                      Fixing Case
 @{" center-line " Link "Fill Commands"}                          Fill Commands
 @{" clear-rectangle " Link "Rectangles"}                      Rectangles
 @{" comint-continue-subjob (V19) " Link "Shell Changes"}         Shell Changes
 @{" comint-dynamic-complete (V19) " Link "Shell Changes"}        Shell Changes
 @{" comint-dynamic-list-completions (V19) " Link "Shell Changes"} Shell Changes
 @{" comint-kill-output (V19) " Link "Shell Changes"}             Shell Changes
 @{" comint-next-input (V19) " Link "Shell Changes"}              Shell Changes
 @{" comint-next-matching-input (V19) " Link "Shell Changes"}     Shell Changes
 @{" comint-previous-input (V19) " Link "Shell Changes"}          Shell Changes
 @{" comint-previous-matching-input (V19) " Link "Shell Changes"} Shell Changes
 @{" comint-show-output (V19) " Link "Shell Changes"}             Shell Changes
 @{" command-apropos " Link "Help"}                      Help
 @{" comment-region (V19) " Link "New Commands"}                 New Commands
 @{" compare-windows " Link "Other Window"}                      Other Window
 @{" compare-windows (V19) " Link "M-x Changes"}                M-x Changes
 @{" compile " Link "Compilation"}                              Compilation
 @{" compile (V19) " Link "M-x Changes"}                        M-x Changes
 @{" convert-mocklisp-buffer " Link "Mocklisp"}              Mocklisp
 @{" copy-file " Link "Misc File Ops"}                            Misc File Ops
 @{" copy-last-shell-input " Link "Shell Mode"}                Shell Mode
 @{" copy-region-as-kill " Link "Kill Ring"}                  Kill Ring
 @{" copy-to-buffer " Link "Accumulating Text"}                       Accumulating Text
 @{" copy-to-register " Link "RegText"}                     RegText
 @{" count-lines-page " Link "Pages"}                     Pages
 @{" count-lines-region " Link "Position Info"}                   Position Info
 @{" count-matches " Link "Other Repeating Search"}                        Other Repeating Search
 @{" count-text-lines " Link "Nroff Mode"}                     Nroff Mode
 @{" dabbrev-expand " Link "Dynamic Abbrevs"}                       Dynamic Abbrevs
 @{" dbx (V19) " Link "Starting GUD"}                            Starting GUD
 @{" debug " Link "Lisp Debug"}                                Lisp Debug
 @{" debug-on-entry " Link "Lisp Debug"}                       Lisp Debug
 @{" default-value " Link "Locals"}                        Locals
 @{" define-abbrevs " Link "Saving Abbrevs"}                       Saving Abbrevs
 @{" define-key " Link "Rebinding"}                           Rebinding
 @{" delete-backward-char " Link "Killing"}                 Killing
 @{" delete-backward-char " Link "Basic"}                 Basic
 @{" delete-backward-char " Link "Kill Errors"}                 Kill Errors
 @{" delete-blank-lines " Link "Killing"}                   Killing
 @{" delete-blank-lines " Link "Blank Lines"}                   Blank Lines
 @{" delete-char " Link "Basic Picture"}                          Basic Picture
 @{" delete-char " Link "Killing"}                          Killing
 @{" delete-file " Link "Misc File Ops"}                          Misc File Ops
 @{" delete-horizontal-space " Link "Killing"}              Killing
 @{" delete-horizontal-space " Link "Indentation Commands"}              Indentation Commands
 @{" delete-indentation " Link "Killing"}                   Killing
 @{" delete-indentation " Link "Indentation Commands"}                   Indentation Commands
 @{" delete-matching-lines " Link "Other Repeating Search"}                Other Repeating Search
 @{" delete-non-matching-lines " Link "Other Repeating Search"}            Other Repeating Search
 @{" delete-other-windows " Link "Change Window"}                 Change Window
 @{" delete-rectangle " Link "Rectangles"}                     Rectangles
 @{" delete-window " Link "Change Window"}                        Change Window
 @{" describe-bindings " Link "Help"}                    Help
 @{" describe-copying " Link "Help"}                     Help
 @{" describe-distribution " Link "Help"}                Help
 @{" describe-function " Link "Documentation"}                    Documentation
 @{" describe-function " Link "Help"}                    Help
 @{" describe-key " Link "Help"}                         Help
 @{" describe-key-briefly " Link "Help"}                 Help
 @{" describe-mode " Link "Help"}                        Help
 @{" describe-no-warranty " Link "Help"}                 Help
 @{" describe-syntax " Link "Syntax Change"}                      Syntax Change
 @{" describe-variable " Link "Documentation"}                    Documentation
 @{" describe-variable " Link "Examining"}                    Examining
 @{" describe-variable " Link "Help"}                    Help
 @{" diary (V19) " Link "Displaying Diary"}                          Displaying Diary
 @{" diff (V19) " Link "New Commands"}                           New Commands
 @{" diff-backup (V19) " Link "New Commands"}                    New Commands
 @{" digit-argument " Link "Arguments"}                       Arguments
 @{" dired " Link "Dired Enter"}                                Dired Enter
 @{" dired-backup-diff (V19) " Link "Comparison in Dired"}              Comparison in Dired
 @{" dired-change-marks (V19) " Link "Marks in Dired"}             Marks in Dired
 @{" dired-diff (V19) " Link "Comparison in Dired"}                     Comparison in Dired
 @{" dired-do-byte-compile (V19) " Link "Multiple Files"}          Multiple Files
 @{" dired-do-chgrp (V19) " Link "Multiple Files"}                 Multiple Files
 @{" dired-do-chmod (V19) " Link "Multiple Files"}                 Multiple Files
 @{" dired-do-chown (V19) " Link "Multiple Files"}                 Multiple Files
 @{" dired-do-compress (V19) " Link "Multiple Files"}              Multiple Files
 @{" dired-do-copy (V19) " Link "Multiple Files"}                  Multiple Files
 @{" dired-do-copy-regexp (V19) " Link "Dired Regexps"}           Dired Regexps
 @{" dired-do-hardlink (V19) " Link "Multiple Files"}              Multiple Files
 @{" dired-do-hardlink-regexp (V19) " Link "Dired Regexps"}       Dired Regexps
 @{" dired-do-kill-lines (V19) " Link "Editing Dired Buffer"}            Editing Dired Buffer
 @{" dired-do-load (V19) " Link "Multiple Files"}                  Multiple Files
 @{" dired-do-print (V19) " Link "Multiple Files"}                 Multiple Files
 @{" dired-do-redisplay (V19) " Link "Editing Dired Buffer"}             Editing Dired Buffer
 @{" dired-do-rename (V19) " Link "Multiple Files"}                Multiple Files
 @{" dired-do-rename-regexp (V19) " Link "Dired Regexps"}         Dired Regexps
 @{" dired-do-shell-command (V19) " Link "Shell Commands in Dired"}         Shell Commands in Dired
 @{" dired-do-symlink (V19) " Link "Multiple Files"}               Multiple Files
 @{" dired-do-symlink-regexp (V19) " Link "Dired Regexps"}        Dired Regexps
 @{" dired-downcase (V19) " Link "Dired Case Conversion"}                 Dired Case Conversion
 @{" dired-flag-files-regexp (V19) " Link "Dired Regexps"}        Dired Regexps
 @{" dired-hide-all (V19) " Link "Hiding Subdirectories"}                 Hiding Subdirectories
 @{" dired-hide-subdir (V19) " Link "Hiding Subdirectories"}              Hiding Subdirectories
 @{" dired-mark (V19) " Link "Marks in Dired"}                     Marks in Dired
 @{" dired-mark-directories (V19) " Link "Marks in Dired"}         Marks in Dired
 @{" dired-mark-executables (V19) " Link "Marks in Dired"}         Marks in Dired
 @{" dired-mark-files-regexp (V19) " Link "Dired Regexps"}        Dired Regexps
 @{" dired-mark-symlinks (V19) " Link "Marks in Dired"}            Marks in Dired
 @{" dired-maybe-insert-subdir (V19) " Link "Subdirectories in Dired"}      Subdirectories in Dired
 @{" dired-next-subdir (V19) " Link "Subdirectories in Dired"}              Subdirectories in Dired
 @{" dired-other-window " Link "Pop Up Window"}                   Pop Up Window
 @{" dired-other-window " Link "Dired Enter"}                   Dired Enter
 @{" dired-prev-subdir (V19) " Link "Subdirectories in Dired"}              Subdirectories in Dired
 @{" dired-tree-down (V19) " Link "Subdirectories in Dired"}                Subdirectories in Dired
 @{" dired-tree-up (V19) " Link "Subdirectories in Dired"}                  Subdirectories in Dired
 @{" dired-unmark-all-files (V19) " Link "Marks in Dired"}         Marks in Dired
 @{" dired-upcase (V19) " Link "Dired Case Conversion"}                   Dired Case Conversion
 @{" dirs (V19) " Link "Shell Changes"}                           Shell Changes
 @{" disable-command " Link "Disabling"}                      Disabling
 @{" disassemble " Link "Compiling Libraries"}                          Compiling Libraries
 @{" display-buffer (V19) " Link "Binding Changes"}                 Binding Changes
 @{" display-time " Link "Mode Line"}                         Mode Line
 @{" dissociated-press " Link "Dissociated Press"}                    Dissociated Press
 @{" do-auto-save " Link "Auto Save Control"}                         Auto Save Control
 @{" doctor " Link "Total Frustration"}                               Total Frustration
 @{" down-list " Link "Lists"}                            Lists
 @{" downcase-region " Link "Case"}                      Case
 @{" downcase-word " Link "Fixing Case"}                        Fixing Case
 @{" downcase-word " Link "Case"}                        Case
 @{" edebug-defun (V19) " Link "Edebug Mode"}                   Edebug Mode
 @{" edit-abbrevs " Link "Editing Abbrevs"}                         Editing Abbrevs
 @{" edit-abbrevs-redefine " Link "Editing Abbrevs"}                Editing Abbrevs
 @{" edit-options " Link "Edit Options"}                         Edit Options
 @{" edit-picture " Link "Picture"}                         Picture
 @{" edit-tab-stops " Link "Text Mode"}                       Text Mode
 @{" edit-tab-stops " Link "Tab Stops"}                       Tab Stops
 @{" edit-tab-stops-note-changes " Link "Tab Stops"}          Tab Stops
 @{" edt-emulation-off " Link "Emulation"}                    Emulation
 @{" edt-emulation-on " Link "Emulation"}                     Emulation
 @{" electric-nroff-mode " Link "Nroff Mode"}                  Nroff Mode
 @{" emacs-lisp-mode " Link "Lisp Eval"}                      Lisp Eval
 @{" emacs-version " Link "Bugs"}                        Bugs
 @{" emerge-auto-advance-mode (V19) " Link "Submodes of Emerge"}       Submodes of Emerge
 @{" emerge-buffers (V19) " Link "Overview of Emerge"}                 Overview of Emerge
 @{" emerge-buffers-with-ancestor (V19) " Link "Overview of Emerge"}   Overview of Emerge
 @{" emerge-files (V19) " Link "Overview of Emerge"}                   Overview of Emerge
 @{" emerge-files-with-ancestor (V19) " Link "Overview of Emerge"}     Overview of Emerge
 @{" emerge-skip-prefers-mode (V19) " Link "Submodes of Emerge"}       Submodes of Emerge
 @{" enable-command " Link "Disabling"}                       Disabling
 @{" end-kbd-macro " Link "Basic Kbd Macro"}                        Basic Kbd Macro
 @{" end-of-buffer " Link "Basic"}                        Basic
 @{" end-of-defun " Link "Defuns"}                         Defuns
 @{" end-of-fortran-subprogram " Link "Fortran Motion"}            Fortran Motion
 @{" end-of-line " Link "Basic"}                          Basic
 @{" enlarge-window " Link "Change Window"}                       Change Window
 @{" enlarge-window-horizontally " Link "Change Window"}          Change Window
 @{" evade-flow-control-on (V19) " Link "New Facilities"}          New Facilities
 @{" eval-current-buffer " Link "Lisp Eval"}                  Lisp Eval
 @{" eval-defun " Link "Lisp Eval"}                           Lisp Eval
 @{" eval-expression " Link "Lisp Eval"}                      Lisp Eval
 @{" eval-last-sexp " Link "Lisp Eval"}                       Lisp Eval
 @{" eval-region " Link "Lisp Eval"}                          Lisp Eval
 @{" exchange-point-and-mark " Link "Setting Mark"}              Setting Mark
 @{" execute-extended-command " Link "M-x"}             M-x
 @{" exit-recursive-edit " Link "Recursive Edit"}                  Recursive Edit
 @{" expand-abbrev " Link "Expanding Abbrevs"}                        Expanding Abbrevs
 @{" expand-region-abbrevs " Link "Expanding Abbrevs"}                Expanding Abbrevs
 @{" fancy-diary-display (V19) " Link "Simple and Fancy"}            Simple and Fancy
 @{" fill-c++-comment (V19) " Link "Other New Modes"}               Other New Modes
 @{" fill-individual-paragraphs " Link "Fill Prefix"}           Fill Prefix
 @{" fill-individual-paragraphs (V19) " Link "Filling Changes"}     Filling Changes
 @{" fill-paragraph " Link "Fill Commands"}                       Fill Commands
 @{" fill-region " Link "Fill Commands"}                          Fill Commands
 @{" fill-region-as-paragraph " Link "Fill Commands"}             Fill Commands
 @{" fill-region-as-paragraph (V19) " Link "Filling Changes"}       Filling Changes
 @{" find-alternate-file " Link "Visiting"}                  Visiting
 @{" find-dired " Link "Dired and Find"}                           Dired and Find
 @{" find-file " Link "Visiting"}                            Visiting
 @{" find-file-other-frame (V19) " Link "New Commands"}          New Commands
 @{" find-file-other-window " Link "Pop Up Window"}               Pop Up Window
 @{" find-file-other-window " Link "Visiting"}               Visiting
 @{" find-file-read-only-other-window (V19) " Link "New Commands"} New Commands
 @{" find-grep-dired " Link "Dired and Find"}                      Dired and Find
 @{" find-name-dired " Link "Dired and Find"}                      Dired and Find
 @{" find-tag " Link "Find Tag"}                             Find Tag
 @{" find-tag-other-frame (V19) " Link "New Commands"}           New Commands
 @{" find-tag-other-window " Link "Find Tag"}                Find Tag
 @{" find-tag-other-window " Link "Pop Up Window"}                Pop Up Window
 @{" find-tag-regexp (V19) " Link "Tags Changes"}                Tags Changes
 @{" fortran-column-ruler " Link "Fortran Columns"}                 Fortran Columns
 @{" fortran-comment-region " Link "Fortran Comments"}               Fortran Comments
 @{" fortran-indent-line " Link "ForIndent Commands"}                  ForIndent Commands
 @{" fortran-indent-subprogram " Link "ForIndent Commands"}            ForIndent Commands
 @{" fortran-mode " Link "Fortran"}                         Fortran
 @{" fortran-next-statement " Link "Fortran Motion"}               Fortran Motion
 @{" fortran-previous-statement " Link "Fortran Motion"}           Fortran Motion
 @{" fortran-split-line " Link "ForIndent Commands"}                   ForIndent Commands
 @{" fortran-window-create " Link "Fortran Columns"}                Fortran Columns
 @{" forward-char " Link "Basic"}                         Basic
 @{" forward-list " Link "Lists"}                         Lists
 @{" forward-page " Link "Pages"}                         Pages
 @{" forward-paragraph " Link "Paragraphs"}                    Paragraphs
 @{" forward-sentence " Link "Sentences"}                     Sentences
 @{" forward-sexp " Link "Lists"}                         Lists
 @{" forward-text-line " Link "Nroff Mode"}                    Nroff Mode
 @{" forward-word " Link "Words"}                         Words
 @{" gdb (V19) " Link "Starting GUD"}                            Starting GUD
 @{" global-set-key " Link "Rebinding"}                       Rebinding
 @{" global-set-key (V19) " Link "Key Sequence Changes"}                 Key Sequence Changes
 @{" gnus (V19) " Link "GNUS"}                           GNUS
 @{" gnus-Group-exit (V19) " Link "Summary of GNUS"}                Summary of GNUS
 @{" gnus-Group-list-all-groups (V19) " Link "Summary of GNUS"}     Summary of GNUS
 @{" gnus-Group-list-groups (V19) " Link "Summary of GNUS"}         Summary of GNUS
 @{" gnus-Group-next-group (V19) " Link "Summary of GNUS"}          Summary of GNUS
 @{" gnus-Group-next-unread-group (V19) " Link "Summary of GNUS"}   Summary of GNUS
 @{" gnus-Group-prev-group (V19) " Link "Summary of GNUS"}          Summary of GNUS
 @{" gnus-Group-prev-unread-group (V19) " Link "Summary of GNUS"}   Summary of GNUS
 @{" gnus-Group-read-group (V19) " Link "Summary of GNUS"}          Summary of GNUS
 @{" gnus-Group-suspend (V19) " Link "Summary of GNUS"}             Summary of GNUS
 @{" gnus-Group-unsubscribe-current-group (V19) " Link "Summary of GNUS"} Summary of GNUS
 @{" gnus-Summary-isearch-article (V19) " Link "Summary of GNUS"}   Summary of GNUS
 @{" gnus-Summary-next-page (V19) " Link "Summary of GNUS"}         Summary of GNUS
 @{" gnus-Summary-next-same-subject (V19) " Link "Summary of GNUS"} Summary of GNUS
 @{" gnus-Summary-next-subject (V19) " Link "Summary of GNUS"}      Summary of GNUS
 @{" gnus-Summary-prev-page (V19) " Link "Summary of GNUS"}         Summary of GNUS
 @{" gnus-Summary-prev-same-subject (V19) " Link "Summary of GNUS"} Summary of GNUS
 @{" gnus-Summary-prev-subject (V19) " Link "Summary of GNUS"}      Summary of GNUS
 @{" gnus-Summary-search-article-forward (V19) " Link "Summary of GNUS"} Summary of GNUS
 @{" gnus-Summary-sort-by-author (V19) " Link "Summary of GNUS"}    Summary of GNUS
 @{" gnus-Summary-sort-by-date (V19) " Link "Summary of GNUS"}      Summary of GNUS
 @{" gnus-Summary-sort-by-number (V19) " Link "Summary of GNUS"}    Summary of GNUS
 @{" gnus-Summary-sort-by-subject (V19) " Link "Summary of GNUS"}   Summary of GNUS
 @{" goto-char " Link "Basic"}                            Basic
 @{" goto-line " Link "Basic"}                            Basic
 @{" grep " Link "Compilation"}                                 Compilation
 @{" gud-cont (V19) " Link "Commands of GUD"}                       Commands of GUD
 @{" gud-def (V19) " Link "GUD Customization"}                        GUD Customization
 @{" gud-down (V19) " Link "Commands of GUD"}                       Commands of GUD
 @{" gud-finish (V19) " Link "Commands of GUD"}                     Commands of GUD
 @{" gud-next (V19) " Link "Commands of GUD"}                       Commands of GUD
 @{" gud-refresh (V19) " Link "Commands of GUD"}                    Commands of GUD
 @{" gud-step (V19) " Link "Commands of GUD"}                       Commands of GUD
 @{" gud-stepi (V19) " Link "Commands of GUD"}                      Commands of GUD
 @{" gud-up (V19) " Link "Commands of GUD"}                         Commands of GUD
 @{" hanoi " Link "Amusements"}                                Amusements
 @{" help-with-tutorial " Link "Basic"}                   Basic
 @{" help-with-tutorial " Link "Help"}                   Help
 @{" hide-body " Link "Outline Visibility"}                            Outline Visibility
 @{" hide-entry " Link "Outline Visibility"}                           Outline Visibility
 @{" hide-leaves " Link "Outline Visibility"}                          Outline Visibility
 @{" hide-subtree " Link "Outline Visibility"}                         Outline Visibility
 @{" holidays (V19) " Link "Calendar"}                       Calendar
 @{" iconify-frame (V19) " Link "New Commands"}                  New Commands
 @{" indent-c-exp " Link "Multi-line Indent"}                         Multi-line Indent
 @{" indent-for-comment " Link "Comments"}                   Comments
 @{" indent-new-comment-line " Link "Comments"}              Comments
 @{" indent-region " Link "Multi-line Indent"}                        Multi-line Indent
 @{" indent-region " Link "Indentation Commands"}                        Indentation Commands
 @{" indent-relative " Link "Indentation Commands"}                      Indentation Commands
 @{" indent-rigidly " Link "Indentation Commands"}                       Indentation Commands
 @{" indent-sexp " Link "Multi-line Indent"}                          Multi-line Indent
 @{" indented-text-mode " Link "Text Mode"}                   Text Mode
 @{" info " Link "Help"}                                 Help
 @{" insert-abbrevs " Link "Saving Abbrevs"}                       Saving Abbrevs
 @{" insert-anniversary-diary-entry (V19) " Link "New Entries"} New Entries
 @{" insert-block-diary-entry (V19) " Link "New Entries"}       New Entries
 @{" insert-cyclic-diary-entry (V19) " Link "New Entries"}      New Entries
 @{" insert-diary-entry (V19) " Link "New Entries"}             New Entries
 @{" insert-file " Link "Misc File Ops"}                          Misc File Ops
 @{" insert-kbd-macro " Link "Save Kbd Macro"}                     Save Kbd Macro
 @{" insert-monthly-diary-entry (V19) " Link "New Entries"}     New Entries
 @{" insert-parentheses " Link "Balanced Editing"}                   Balanced Editing
 @{" insert-register " Link "RegText"}                      RegText
 @{" insert-weekly-diary-entry (V19) " Link "New Entries"}      New Entries
 @{" insert-yearly-diary-entry (V19) " Link "New Entries"}      New Entries
 @{" interrupt-shell-subjob " Link "Shell Mode"}               Shell Mode
 @{" inverse-add-global-abbrev " Link "Defining Abbrevs"}            Defining Abbrevs
 @{" inverse-add-mode-abbrev " Link "Defining Abbrevs"}              Defining Abbrevs
 @{" isearch (V19) " Link "Search Changes"}                        Search Changes
 @{" isearch-backward " Link "Incremental Search"}                     Incremental Search
 @{" isearch-backward-regexp " Link "Regexp Search"}              Regexp Search
 @{" isearch-backward-regexp (V19) " Link "New Commands"}        New Commands
 @{" isearch-forward " Link "Incremental Search"}                      Incremental Search
 @{" isearch-forward-regexp " Link "Regexp Search"}               Regexp Search
 @{" ispell-buffer (V19) " Link "Spell Changes"}                  Spell Changes
 @{" ispell-region (V19) " Link "Spell Changes"}                  Spell Changes
 @{" just-one-space " Link "Killing"}                       Killing
 @{" kbd-macro-query " Link "Kbd Macro Query"}                      Kbd Macro Query
 @{" kill-all-abbrevs " Link "Defining Abbrevs"}                     Defining Abbrevs
 @{" kill-buffer " Link "Kill Buffer"}                          Kill Buffer
 @{" kill-comment " Link "Comments"}                         Comments
 @{" kill-compilation " Link "Compilation"}                     Compilation
 @{" kill-ispell (V19) " Link "Spell Changes"}                    Spell Changes
 @{" kill-line " Link "Killing"}                            Killing
 @{" kill-line " Link "Killing"}                            Killing
 @{" kill-local-variable " Link "Locals"}                  Locals
 @{" kill-output-from-shell " Link "Shell Mode"}               Shell Mode
 @{" kill-rectangle " Link "Rectangles"}                       Rectangles
 @{" kill-region " Link "Killing"}                          Killing
 @{" kill-sentence " Link "Killing"}                        Killing
 @{" kill-sentence " Link "Sentences"}                        Sentences
 @{" kill-sexp " Link "Lists"}                            Lists
 @{" kill-sexp " Link "Killing"}                            Killing
 @{" kill-some-buffers " Link "Kill Buffer"}                    Kill Buffer
 @{" kill-word " Link "Killing"}                            Killing
 @{" kill-word " Link "Words"}                            Words
 @{" latex-mode " Link "TeX Mode"}                           TeX Mode
 @{" LaTeX-mode " Link "TeX Mode"}                           TeX Mode
 @{" lisp-complete-symbol " Link "Lisp Completion"}                 Lisp Completion
 @{" lisp-indent-line " Link "Basic Indent"}                     Basic Indent
 @{" lisp-interaction-mode " Link "Lisp Interaction"}                Lisp Interaction
 @{" lisp-mode " Link "External Lisp"}                            External Lisp
 @{" lisp-send-defun " Link "External Lisp"}                      External Lisp
 @{" list-abbrevs " Link "Editing Abbrevs"}                         Editing Abbrevs
 @{" list-buffers " Link "List Buffers"}                         List Buffers
 @{" list-command-history " Link "Repetition"}                 Repetition
 @{" list-directory " Link "ListDir"}                       ListDir
 @{" list-matching-lines " Link "Other Repeating Search"}                  Other Repeating Search
 @{" list-options " Link "Edit Options"}                         Edit Options
 @{" list-tags " Link "List Tags"}                            List Tags
 @{" load " Link "Loading"}                                 Loading
 @{" load-file " Link "Loading"}                            Loading
 @{" load-library " Link "Loading"}                         Loading
 @{" local-set-key " Link "Rebinding"}                        Rebinding
 @{" lpr-buffer " Link "Hardcopy"}                           Hardcopy
 @{" lpr-region " Link "Hardcopy"}                           Hardcopy
 @{" mail " Link "Sending Mail"}                                 Sending Mail
 @{" mail-cc " Link "Mail Mode"}                              Mail Mode
 @{" mail-fill-yanked-message " Link "Mail Mode"}             Mail Mode
 @{" mail-other-frame (V19) " Link "New Commands"}               New Commands
 @{" mail-other-window " Link "Pop Up Window"}                    Pop Up Window
 @{" mail-other-window " Link "Sending Mail"}                    Sending Mail
 @{" mail-send " Link "Mail Mode"}                            Mail Mode
 @{" mail-send-and-exit " Link "Mail Mode"}                   Mail Mode
 @{" mail-signature " Link "Mail Mode"}                       Mail Mode
 @{" mail-subject " Link "Mail Mode"}                         Mail Mode
 @{" mail-to " Link "Mail Mode"}                              Mail Mode
 @{" mail-yank-original " Link "Mail Mode"}                   Mail Mode
 @{" mail-yank-original " Link "Rmail Reply"}                   Rmail Reply
 @{" make-local-variable " Link "Locals"}                  Locals
 @{" make-symbolic-link " Link "Misc File Ops"}                   Misc File Ops
 @{" make-symbolic-link (V19) " Link "M-x Changes"}             M-x Changes
 @{" make-variable-buffer-local " Link "Locals"}           Locals
 @{" manual-entry " Link "Documentation"}                         Documentation
 @{" manual-entry (V19) " Link "M-x Changes"}                   M-x Changes
 @{" mark-calendar-holidays (V19) " Link "Calendar"}         Calendar
 @{" mark-defun " Link "Defuns"}                           Defuns
 @{" mark-defun " Link "Marking Objects"}                           Marking Objects
 @{" mark-diary-entries (V19) " Link "Displaying Diary"}             Displaying Diary
 @{" mark-fortran-subprogram " Link "Fortran Motion"}              Fortran Motion
 @{" mark-page " Link "Pages"}                            Pages
 @{" mark-page " Link "Marking Objects"}                            Marking Objects
 @{" mark-paragraph " Link "Paragraphs"}                       Paragraphs
 @{" mark-paragraph " Link "Marking Objects"}                       Marking Objects
 @{" mark-sexp " Link "Marking Objects"}                            Marking Objects
 @{" mark-sexp " Link "Lists"}                            Lists
 @{" mark-whole-buffer " Link "Marking Objects"}                    Marking Objects
 @{" mark-word " Link "Marking Objects"}                            Marking Objects
 @{" mark-word " Link "Words"}                            Words
 @{" minibuffer-complete " Link "Completion"}                  Completion
 @{" minibuffer-complete-word " Link "Completion"}             Completion
 @{" modify-syntax-entry " Link "Syntax Change"}                  Syntax Change
 @{" move-over-close-and-reindent " Link "Balanced Editing"}         Balanced Editing
 @{" move-to-window-line " Link "Basic"}                  Basic
 @{" name-last-kbd-macro " Link "Save Kbd Macro"}                  Save Kbd Macro
 @{" narrow-to-region " Link "Narrowing"}                     Narrowing
 @{" negative-argument " Link "Arguments"}                    Arguments
 @{" newline " Link "Basic"}                              Basic
 @{" newline-and-indent " Link "Basic Indent"}                   Basic Indent
 @{" next-complex-command " Link "Repetition"}                 Repetition
 @{" next-error " Link "Compilation"}                           Compilation
 @{" next-file " Link "Tags Stepping"}                            Tags Stepping
 @{" next-history-element (V19) " Link "New Facilities"}           New Facilities
 @{" next-line " Link "Basic"}                            Basic
 @{" next-matching-history-element (V19) " Link "New Facilities"}  New Facilities
 @{" normal-mode " Link "Choosing Modes"}                          Choosing Modes
 @{" not-modified " Link "Saving"}                         Saving
 @{" nroff-mode " Link "Nroff Mode"}                           Nroff Mode
 @{" occur " Link "Other Repeating Search"}                                Other Repeating Search
 @{" open-dribble-file " Link "Bugs"}                    Bugs
 @{" open-line " Link "Blank Lines"}                            Blank Lines
 @{" open-rectangle " Link "Rectangles"}                       Rectangles
 @{" open-termscript " Link "Bugs"}                      Bugs
 @{" other-window " Link "Other Window"}                         Other Window
 @{" outline-backward-same-level " Link "Outline Motion"}          Outline Motion
 @{" outline-forward-same-level " Link "Outline Motion"}           Outline Motion
 @{" outline-mode " Link "Outline Mode"}                         Outline Mode
 @{" outline-next-visible-heading " Link "Outline Motion"}         Outline Motion
 @{" outline-previous-visible-heading " Link "Outline Motion"}     Outline Motion
 @{" outline-up-heading " Link "Outline Motion"}                   Outline Motion
 @{" overwrite-mode " Link "Minor Modes"}                       Minor Modes
 @{" picture-backward-clear-column " Link "Basic Picture"}        Basic Picture
 @{" picture-backward-column " Link "Basic Picture"}              Basic Picture
 @{" picture-clear-column " Link "Basic Picture"}                 Basic Picture
 @{" picture-clear-line " Link "Basic Picture"}                   Basic Picture
 @{" picture-clear-rectangle " Link "Rectangles in Picture"}              Rectangles in Picture
 @{" picture-clear-rectangle-to-register " Link "Rectangles in Picture"}  Rectangles in Picture
 @{" picture-forward-column " Link "Basic Picture"}               Basic Picture
 @{" picture-motion " Link "Insert in Picture"}                       Insert in Picture
 @{" picture-motion-reverse " Link "Insert in Picture"}               Insert in Picture
 @{" picture-move-down " Link "Basic Picture"}                    Basic Picture
 @{" picture-move-up " Link "Basic Picture"}                      Basic Picture
 @{" picture-movement-down " Link "Insert in Picture"}                Insert in Picture
 @{" picture-movement-left " Link "Insert in Picture"}                Insert in Picture
 @{" picture-movement-ne " Link "Insert in Picture"}                  Insert in Picture
 @{" picture-movement-nw " Link "Insert in Picture"}                  Insert in Picture
 @{" picture-movement-right " Link "Insert in Picture"}               Insert in Picture
 @{" picture-movement-se " Link "Insert in Picture"}                  Insert in Picture
 @{" picture-movement-sw " Link "Insert in Picture"}                  Insert in Picture
 @{" picture-movement-up " Link "Insert in Picture"}                  Insert in Picture
 @{" picture-newline " Link "Basic Picture"}                      Basic Picture
 @{" picture-open-line " Link "Basic Picture"}                    Basic Picture
 @{" picture-set-tab-stops " Link "Tabs in Picture"}                Tabs in Picture
 @{" picture-tab " Link "Tabs in Picture"}                          Tabs in Picture
 @{" picture-tab-search " Link "Tabs in Picture"}                   Tabs in Picture
 @{" picture-yank-rectangle " Link "Rectangles in Picture"}               Rectangles in Picture
 @{" picture-yank-rectangle-from-register " Link "Rectangles in Picture"} Rectangles in Picture
 @{" plain-tex-mode " Link "TeX Mode"}                       TeX Mode
 @{" plain-TeX-mode " Link "TeX Mode"}                       TeX Mode
 @{" point-to-register " Link "RegPos"}                    RegPos
 @{" prepend-to-buffer " Link "Accumulating Text"}                    Accumulating Text
 @{" previous-complex-command " Link "Repetition"}             Repetition
 @{" previous-history-element (V19) " Link "New Facilities"}       New Facilities
 @{" previous-line " Link "Basic"}                        Basic
 @{" previous-matching-history-element (V19) " Link "New Facilities"} New Facilities
 @{" print-buffer " Link "Hardcopy"}                         Hardcopy
 @{" print-diary-entries (V19) " Link "Printing Diary"}            Printing Diary
 @{" print-region " Link "Hardcopy"}                         Hardcopy
 @{" query-replace " Link "Query Replace"}                        Query Replace
 @{" query-replace-regexp " Link "Query Replace"}                 Query Replace
 @{" quietly-read-abbrev-file " Link "Saving Abbrevs"}             Saving Abbrevs
 @{" quit-shell-subjob " Link "Shell Mode"}                    Shell Mode
 @{" quoted-insert " Link "Basic"}                        Basic
 @{" re-search-backward " Link "Regexp Search"}                   Regexp Search
 @{" re-search-forward " Link "Regexp Search"}                    Regexp Search
 @{" read-abbrev-file " Link "Saving Abbrevs"}                     Saving Abbrevs
 @{" recenter " Link "Scrolling"}                             Scrolling
 @{" recenter " Link "Basic"}                             Basic
 @{" recover-file " Link "Recover"}                         Recover
 @{" register-to-point " Link "RegPos"}                    RegPos
 @{" reload-ispell (V19) " Link "Spell Changes"}                  Spell Changes
 @{" rename-buffer " Link "Misc Buffer"}                        Misc Buffer
 @{" rename-file " Link "Misc File Ops"}                          Misc File Ops
 @{" repeat-complex-command " Link "Repetition"}               Repetition
 @{" replace-regexp " Link "Unconditional Replace"}                       Unconditional Replace
 @{" replace-string " Link "Unconditional Replace"}                       Unconditional Replace
 @{" reposition-window (V19) " Link "New Commands"}              New Commands
 @{" revert-buffer " Link "Reverting"}                        Reverting
 @{" revert-buffer (Dired, V19) " Link "Editing Dired Buffer"}           Editing Dired Buffer
 @{" revert-buffer (V19) " Link "Basic Changes"}                  Basic Changes
 @{" rmail " Link "Rmail"}                                Rmail
 @{" rmail-add-label " Link "Rmail Labels"}                      Rmail Labels
 @{" rmail-beginning-of-message " Link "Rmail Scrolling"}           Rmail Scrolling
 @{" rmail-continue " Link "Rmail Reply"}                       Rmail Reply
 @{" rmail-delete-backward " Link "Rmail Deletion"}                Rmail Deletion
 @{" rmail-delete-forward " Link "Rmail Deletion"}                 Rmail Deletion
 @{" rmail-edit-current-message " Link "Rmail Editing"}           Rmail Editing
 @{" rmail-expunge " Link "Rmail Deletion"}                        Rmail Deletion
 @{" rmail-forward " Link "Rmail Reply"}                        Rmail Reply
 @{" rmail-get-new-mail " Link "Rmail Files"}                   Rmail Files
 @{" rmail-input " Link "Rmail Files"}                          Rmail Files
 @{" rmail-kill-label " Link "Rmail Labels"}                     Rmail Labels
 @{" rmail-last-message " Link "Rmail Motion"}                   Rmail Motion
 @{" rmail-mail " Link "Rmail Reply"}                           Rmail Reply
 @{" rmail-next-labeled-message " Link "Rmail Labels"}           Rmail Labels
 @{" rmail-next-message " Link "Rmail Motion"}                   Rmail Motion
 @{" rmail-next-undeleted-message " Link "Rmail Motion"}         Rmail Motion
 @{" rmail-output " Link "Rmail Output"}                         Rmail Output
 @{" rmail-output-to-rmail-file " Link "Rmail Output"}           Rmail Output
 @{" rmail-previous-labeled-message " Link "Rmail Labels"}       Rmail Labels
 @{" rmail-previous-message " Link "Rmail Motion"}               Rmail Motion
 @{" rmail-previous-undeleted-message " Link "Rmail Motion"}     Rmail Motion
 @{" rmail-quit " Link "Rmail"}                           Rmail
 @{" rmail-reply " Link "Rmail Reply"}                          Rmail Reply
 @{" rmail-resend (V19) " Link "Mail Changes"}                   Mail Changes
 @{" rmail-retry-failure (V19) " Link "Mail Changes"}            Mail Changes
 @{" rmail-save " Link "Rmail"}                           Rmail
 @{" rmail-search " Link "Rmail Motion"}                         Rmail Motion
 @{" rmail-show-message " Link "Rmail Motion"}                   Rmail Motion
 @{" rmail-summary " Link "Rmail Make Summary"}                        Rmail Make Summary
 @{" rmail-summary-by-labels " Link "Rmail Labels"}              Rmail Labels
 @{" rmail-summary-by-labels " Link "Rmail Make Summary"}              Rmail Make Summary
 @{" rmail-summary-by-recipients " Link "Rmail Make Summary"}          Rmail Make Summary
 @{" rmail-summary-delete-forward " Link "Rmail Summary Edit"}         Rmail Summary Edit
 @{" rmail-summary-exit " Link "Rmail Summary Edit"}                   Rmail Summary Edit
 @{" rmail-summary-goto-msg " Link "Rmail Summary Edit"}               Rmail Summary Edit
 @{" rmail-summary-next-all " Link "Rmail Summary Edit"}               Rmail Summary Edit
 @{" rmail-summary-next-msg " Link "Rmail Summary Edit"}               Rmail Summary Edit
 @{" rmail-summary-previous-all " Link "Rmail Summary Edit"}           Rmail Summary Edit
 @{" rmail-summary-previous-msg " Link "Rmail Summary Edit"}           Rmail Summary Edit
 @{" rmail-summary-quit " Link "Rmail Summary Edit"}                   Rmail Summary Edit
 @{" rmail-summary-scroll-msg-down " Link "Rmail Summary Edit"}        Rmail Summary Edit
 @{" rmail-summary-scroll-msg-up " Link "Rmail Summary Edit"}          Rmail Summary Edit
 @{" rmail-summary-undelete " Link "Rmail Summary Edit"}               Rmail Summary Edit
 @{" rmail-toggle-header " Link "Rmail Editing"}                  Rmail Editing
 @{" rmail-undelete-previous-message " Link "Rmail Deletion"}      Rmail Deletion
 @{" run-lisp " Link "External Lisp"}                             External Lisp
 @{" save-buffer " Link "Saving"}                          Saving
 @{" save-buffers-kill-emacs " Link "Exiting"}              Exiting
 @{" save-some-buffers " Link "Saving"}                    Saving
 @{" scroll-bar-mode (V19) " Link "Basic Changes"}                Basic Changes
 @{" scroll-down " Link "Scrolling"}                          Scrolling
 @{" scroll-left " Link "Horizontal Scrolling"}                          Horizontal Scrolling
 @{" scroll-other-window " Link "Other Window"}                  Other Window
 @{" scroll-right " Link "Horizontal Scrolling"}                         Horizontal Scrolling
 @{" scroll-up " Link "Scrolling"}                            Scrolling
 @{" sdb (V19) " Link "Starting GUD"}                            Starting GUD
 @{" search-backward " Link "Nonincremental Search"}                      Nonincremental Search
 @{" search-forward " Link "Nonincremental Search"}                       Nonincremental Search
 @{" self-insert " Link "Basic"}                          Basic
 @{" send-gud-command (V19) " Link "GUD Customization"}               GUD Customization
 @{" send-invisible (V19) " Link "Shell Changes"}                 Shell Changes
 @{" send-shell-input " Link "Shell Mode"}                     Shell Mode
 @{" set-comment-column " Link "Comments"}                   Comments
 @{" set-fill-column " Link "Fill Commands"}                      Fill Commands
 @{" set-fill-prefix " Link "Fill Prefix"}                      Fill Prefix
 @{" set-gnu-bindings " Link "Emulation"}                     Emulation
 @{" set-goal-column " Link "Basic"}                      Basic
 @{" set-gosmacs-bindings " Link "Emulation"}                 Emulation
 @{" set-mark-command " Link "Setting Mark"}                     Setting Mark
 @{" set-rmail-inbox-list " Link "Rmail Files"}                 Rmail Files
 @{" set-selective-display " Link "Selective Display"}                Selective Display
 @{" set-variable " Link "Examining"}                         Examining
 @{" set-visited-file-name " Link "Saving"}                Saving
 @{" setq-default " Link "Locals"}                         Locals
 @{" shell " Link "Interactive Shell"}                                Interactive Shell
 @{" shell-command " Link "Single Shell"}                        Single Shell
 @{" shell-command-on-region " Link "Single Shell"}              Single Shell
 @{" shell-send-eof " Link "Shell Mode"}                       Shell Mode
 @{" show-all " Link "Outline Visibility"}                             Outline Visibility
 @{" show-all-diary-entries (V19) " Link "Displaying Diary"}         Displaying Diary
 @{" show-branches " Link "Outline Visibility"}                        Outline Visibility
 @{" show-children " Link "Outline Visibility"}                        Outline Visibility
 @{" show-entry " Link "Outline Visibility"}                           Outline Visibility
 @{" show-output-from-shell " Link "Shell Mode"}               Shell Mode
 @{" show-subtree " Link "Outline Visibility"}                         Outline Visibility
 @{" sort-columns " Link "Sorting"}                         Sorting
 @{" sort-fields " Link "Sorting"}                          Sorting
 @{" sort-lines " Link "Sorting"}                           Sorting
 @{" sort-numeric-fields " Link "Sorting"}                  Sorting
 @{" sort-pages " Link "Sorting"}                           Sorting
 @{" sort-paragraphs " Link "Sorting"}                      Sorting
 @{" spell-buffer " Link "Spelling"}                         Spelling
 @{" spell-region " Link "Spelling"}                         Spelling
 @{" spell-string " Link "Spelling"}                         Spelling
 @{" spell-word " Link "Spelling"}                           Spelling
 @{" split-line " Link "Indentation Commands"}                           Indentation Commands
 @{" split-window-horizontally " Link "Split Window"}            Split Window
 @{" split-window-vertically " Link "Split Window"}              Split Window
 @{" start-kbd-macro " Link "Basic Kbd Macro"}                      Basic Kbd Macro
 @{" stop-shell-subjob " Link "Shell Mode"}                    Shell Mode
 @{" substitute-key-definition " Link "Rebinding"}            Rebinding
 @{" super-apropos (V19) " Link "New Commands"}                  New Commands
 @{" suspend-emacs " Link "Exiting"}                        Exiting
 @{" switch-to-buffer " Link "Select Buffer"}                     Select Buffer
 @{" switch-to-buffer-other-frame (V19) " Link "New Commands"}   New Commands
 @{" switch-to-buffer-other-window " Link "Pop Up Window"}        Pop Up Window
 @{" tab-to-tab-stop " Link "Text Mode"}                      Text Mode
 @{" tab-to-tab-stop " Link "Tab Stops"}                      Tab Stops
 @{" tabify " Link "Just Spaces"}                               Just Spaces
 @{" tags-apropos " Link "List Tags"}                         List Tags
 @{" tags-loop-continue " Link "Tags Search"}                   Tags Search
 @{" tags-query-replace " Link "Tags Search"}                   Tags Search
 @{" tags-search " Link "Tags Search"}                          Tags Search
 @{" tex-bibtex-file (V19) " Link "TeX Mode Changes"}                TeX Mode Changes
 @{" TeX-buffer " Link "TeX Print"}                           TeX Print
 @{" TeX-close-LaTeX-block " Link "TeX Editing"}                TeX Editing
 @{" tex-close-latex-block (V19) " Link "TeX Mode Changes"}          TeX Mode Changes
 @{" TeX-insert-braces " Link "TeX Editing"}                    TeX Editing
 @{" TeX-insert-quote " Link "TeX Editing"}                     TeX Editing
 @{" TeX-kill-job " Link "TeX Print"}                         TeX Print
 @{" tex-latex-block (V19) " Link "TeX Mode Changes"}                TeX Mode Changes
 @{" tex-mode " Link "TeX Mode"}                             TeX Mode
 @{" TeX-mode " Link "TeX Mode"}                             TeX Mode
 @{" TeX-print " Link "TeX Print"}                            TeX Print
 @{" TeX-recenter-output-buffer " Link "TeX Print"}           TeX Print
 @{" TeX-region " Link "TeX Print"}                           TeX Print
 @{" TeX-show-print-queue " Link "TeX Print"}                 TeX Print
 @{" TeX-terminate-paragraph " Link "TeX Editing"}              TeX Editing
 @{" tex-view (V19) " Link "TeX Mode Changes"}                       TeX Mode Changes
 @{" texinfo-mode " Link "Texinfo Mode"}                         Texinfo Mode
 @{" text-mode " Link "Text Mode"}                            Text Mode
 @{" toggle-read-only " Link "Misc Buffer"}                     Misc Buffer
 @{" top-level " Link "Recursive Edit"}                            Recursive Edit
 @{" top-level " Link "Quitting"}                            Quitting
 @{" transpose-chars " Link "Transpose"}                      Transpose
 @{" transpose-chars " Link "Basic"}                      Basic
 @{" transpose-lines " Link "Transpose"}                      Transpose
 @{" transpose-sexps " Link "Lists"}                      Lists
 @{" transpose-sexps " Link "Transpose"}                      Transpose
 @{" transpose-words " Link "Transpose"}                      Transpose
 @{" transpose-words " Link "Words"}                      Words
 @{" undigestify-rmail-message " Link "Rmail Digest"}            Rmail Digest
 @{" undo " Link "Undo"}                                 Undo
 @{" unexpand-abbrev " Link "Expanding Abbrevs"}                      Expanding Abbrevs
 @{" universal-argument " Link "Arguments"}                   Arguments
 @{" unrmail " Link "Mail Changes"}                              Mail Changes
 @{" untabify " Link "Just Spaces"}                             Just Spaces
 @{" up-list " Link "TeX Editing"}                              TeX Editing
 @{" upcase-region " Link "Case"}                        Case
 @{" upcase-word " Link "Fixing Case"}                          Fixing Case
 @{" upcase-word " Link "Case"}                          Case
 @{" validate-TeX-buffer " Link "TeX Editing"}                  TeX Editing
 @{" vc-cancel-version (V19) " Link "Editing with VC"}              Editing with VC
 @{" vc-create-snapshot (V19) " Link "Making Snapshots"}             Making Snapshots
 @{" vc-diff (V19) " Link "Comparing Versions"}                        Comparing Versions
 @{" vc-directory (V19) " Link "VC Status"}                   VC Status
 @{" vc-insert-headers (V19) " Link "Version Headers"}              Version Headers
 @{" vc-print-log (V19) " Link "VC Status"}                   VC Status
 @{" vc-register (V19) " Link "Editing with VC"}                    Editing with VC
 @{" vc-rename-file (V19) " Link "Renaming and VC"}                 Renaming and VC
 @{" vc-retrieve-snapshot (V19) " Link "Making Snapshots"}           Making Snapshots
 @{" vc-revert-buffer (V19) " Link "Editing with VC"}               Editing with VC
 @{" vc-toggle-read-only (V19) " Link "Editing with VC"}            Editing with VC
 @{" vc-update-change-log (V19) " Link "Change Logs and VC"}           Change Logs and VC
 @{" vi-mode " Link "Emulation"}                              Emulation
 @{" view-buffer " Link "Misc Buffer"}                          Misc Buffer
 @{" view-buffer (V19) " Link "M-x Changes"}                    M-x Changes
 @{" view-diary-entries (V19) " Link "Displaying Diary"}             Displaying Diary
 @{" view-emacs-news " Link "Help"}                      Help
 @{" view-file " Link "Misc File Ops"}                            Misc File Ops
 @{" view-file (V19) " Link "M-x Changes"}                      M-x Changes
 @{" view-lossage " Link "Help"}                         Help
 @{" view-register " Link "Registers"}                        Registers
 @{" vip-mode " Link "Emulation"}                             Emulation
 @{" visit-tags-table " Link "Select Tag Table"}                     Select Tag Table
 @{" what-cursor-position " Link "Position Info"}                 Position Info
 @{" what-line " Link "Position Info"}                            Position Info
 @{" what-page " Link "Position Info"}                            Position Info
 @{" where-is " Link "Help"}                             Help
 @{" widen " Link "Narrowing"}                                Narrowing
 @{" word-search-backward " Link "Word Search"}                 Word Search
 @{" word-search-forward " Link "Word Search"}                  Word Search
 @{" write-abbrev-file " Link "Saving Abbrevs"}                    Saving Abbrevs
 @{" write-file " Link "Saving"}                           Saving
 @{" write-region " Link "Misc File Ops"}                         Misc File Ops
 @{" Yank " Link "Kill Ring"}                                 Kill Ring
 @{" yank-pop " Link "Earlier Kills"}                             Earlier Kills
 @{" yank-rectangle " Link "Rectangles"}                       Rectangles
 @{" yow " Link "Amusements"}                                  Amusements
 @{" zap-to-char " Link "Killing"}                          Killing


@EndNode

@Node "Variable Index" "emacs/Variable Index"
@Next "Concept Index"
@Prev "Command Index"
@Toc "Main"

Variable Index
**************



 @{" abbrev-all-caps " Link "Expanding Abbrevs"}                      Expanding Abbrevs
 @{" abbrev-file-name " Link "Saving Abbrevs"}                     Saving Abbrevs
 @{" abbrev-mode " Link "Abbrevs"}                          Abbrevs
 @{" auto-mode-alist " Link "Choosing Modes"}                      Choosing Modes
 @{" auto-save-default " Link "Auto Save Control"}                    Auto Save Control
 @{" auto-save-interval " Link "Auto Save Control"}                   Auto Save Control
 @{" auto-save-timeout (V19) " Link "Basic Changes"}              Basic Changes
 @{" auto-save-visited-file-name " Link "Auto Save Files"}          Auto Save Files
 @{" backup-by-copying " Link "Backup Copying"}                    Backup Copying
 @{" backup-by-copying-when-linked " Link "Backup Copying"}        Backup Copying
 @{" backup-by-copying-when-mismatch " Link "Backup Copying"}      Backup Copying
 @{" blink-matching-paren " Link "Matching"}                 Matching
 @{" blink-matching-paren-distance " Link "Matching"}        Matching
 @{" buffer-read-only " Link "Misc Buffer"}                     Misc Buffer
 @{" c-argdecl-indent " Link "C Indent"}                     C Indent
 @{" c-auto-newline " Link "C Indent"}                       C Indent
 @{" c-brace-imaginary-offset " Link "C Indent"}             C Indent
 @{" c-brace-offset " Link "C Indent"}                       C Indent
 @{" c-continued-statement-offset " Link "C Indent"}         C Indent
 @{" c-indent-level " Link "C Indent"}                       C Indent
 @{" c-label-offset " Link "C Indent"}                       C Indent
 @{" c-mode-hook " Link "Program Modes"}                          Program Modes
 @{" c-mode-map " Link "Keymaps"}                           Keymaps
 @{" c-tab-always-indent " Link "C Indent"}                  C Indent
 @{" case-fold-search " Link "Replacement and Case"}                     Replacement and Case
 @{" case-fold-search " Link "Search Case"}                     Search Case
 @{" case-replace " Link "Replacement and Case"}                         Replacement and Case
 @{" command-history " Link "Repetition"}                      Repetition
 @{" command-line-args " Link "Command Switches"}                    Command Switches
 @{" comment-column " Link "Comments"}                       Comments
 @{" comment-end " Link "Comments"}                          Comments
 @{" comment-indent-hook " Link "Comments"}                  Comments
 @{" comment-line-start " Link "Fortran Comments"}                   Fortran Comments
 @{" comment-line-start-skip " Link "Fortran Comments"}              Fortran Comments
 @{" comment-multi-line " Link "Comments"}                   Comments
 @{" comment-start " Link "Comments"}                        Comments
 @{" comment-start-skip " Link "Comments"}                   Comments
 @{" compile-command " Link "Compilation"}                      Compilation
 @{" completion-auto-help " Link "Completion"}                 Completion
 @{" completion-ignored-extensions " Link "Completion"}        Completion
 @{" ctl-arrow " Link "Display Vars"}                            Display Vars
 @{" ctl-x-map " Link "Keymaps"}                            Keymaps
 @{" dbx-mode-hook " Link "GUD Customization"}                        GUD Customization
 @{" debug-on-error " Link "Lisp Debug"}                       Lisp Debug
 @{" debug-on-quit " Link "Lisp Debug"}                        Lisp Debug
 @{" default-directory " Link "File Names"}                    File Names
 @{" default-major-mode " Link "Choosing Modes"}                   Choosing Modes
 @{" delete-auto-save-files " Link "Auto Save Files"}               Auto Save Files
 @{" diary-display-hook (V19) " Link "Simple and Fancy"}             Simple and Fancy
 @{" diary-file (V19) " Link "Diary Entries"}                     Diary Entries
 @{" diff-switches (V19) " Link "New Commands"}                  New Commands
 @{" dired-chown-program (V19) " Link "Multiple Files"}            Multiple Files
 @{" dired-copy-preserve-time (V19) " Link "Multiple Files"}       Multiple Files
 @{" dired-kept-versions " Link "Dired Deletion"}                  Dired Deletion
 @{" dired-listing-switches " Link "Dired Enter"}               Dired Enter
 @{" echo-keystrokes " Link "Display Vars"}                      Display Vars
 @{" emacs-lisp-mode-hook " Link "Program Modes"}                 Program Modes
 @{" emerge-combine-template (V19) " Link "Combining in Emerge"}        Combining in Emerge
 @{" emerge-startup-hook (V19) " Link "Fine Points of Emerge"}            Fine Points of Emerge
 @{" enable-local-variables (V19) " Link "Basic Changes"}         Basic Changes
 @{" enable-recursive-minibuffers " Link "Minibuffer Edit"}         Minibuffer Edit
 @{" esc-map " Link "Keymaps"}                              Keymaps
 @{" european-calendar-style (V19) " Link "European Calendar Style"}        European Calendar Style
 @{" explicit-shell-file-name " Link "Interactive Shell"}             Interactive Shell
 @{" fill-column " Link "Fill Commands"}                          Fill Commands
 @{" fill-prefix " Link "Fill Prefix"}                          Fill Prefix
 @{" find-file-hooks " Link "Visiting"}                      Visiting
 @{" find-file-not-found-hooks " Link "Visiting"}            Visiting
 @{" find-file-run-dired " Link "Visiting"}                  Visiting
 @{" fortran-check-all-num-for-matching-do " Link "ForIndent Vars"} ForIndent Vars
 @{" fortran-column-ruler " Link "Fortran Columns"}                 Fortran Columns
 @{" fortran-comment-indent-char " Link "Fortran Comments"}          Fortran Comments
 @{" fortran-comment-indent-style " Link "Fortran Comments"}         Fortran Comments
 @{" fortran-comment-line-column " Link "Fortran Comments"}          Fortran Comments
 @{" fortran-comment-region " Link "Fortran Comments"}               Fortran Comments
 @{" fortran-continuation-char " Link "ForIndent Conv"}            ForIndent Conv
 @{" fortran-continuation-indent " Link "ForIndent Vars"}          ForIndent Vars
 @{" fortran-do-indent " Link "ForIndent Vars"}                    ForIndent Vars
 @{" fortran-electric-line-number " Link "ForIndent Num"}         ForIndent Num
 @{" fortran-if-indent " Link "ForIndent Vars"}                    ForIndent Vars
 @{" fortran-line-number-indent " Link "ForIndent Num"}           ForIndent Num
 @{" fortran-minimum-statement-indent " Link "ForIndent Vars"}     ForIndent Vars
 @{" gdb-mode-hook " Link "GUD Customization"}                        GUD Customization
 @{" global-map " Link "Keymaps"}                           Keymaps
 @{" help-map " Link "Keymaps"}                             Keymaps
 @{" indent-tabs-mode " Link "Just Spaces"}                     Just Spaces
 @{" Info-directory-list (V19) " Link "Info Changes"}            Info Changes
 @{" INFOPATH " Link "Info Changes"}                             Info Changes
 @{" inhibit-local-variables " Link "File Variables"}              File Variables
 @{" inhibit-local-variables (V19) " Link "Basic Changes"}        Basic Changes
 @{" initial-major-mode " Link "Entering Emacs"}                   Entering Emacs
 @{" insert-default-directory " Link "Minibuffer File"}             Minibuffer File
 @{" insert-default-directory " Link "File Names"}             File Names
 @{" inverse-video " Link "Display Vars"}                        Display Vars
 @{" kept-new-versions " Link "Backup Deletion"}                    Backup Deletion
 @{" kept-old-versions " Link "Backup Deletion"}                    Backup Deletion
 @{" kill-buffer-hook (V19) " Link "Hook Changes"}               Hook Changes
 @{" kill-ring-max " Link "Earlier Kills"}                        Earlier Kills
 @{" LaTeX-mode-hook " Link "TeX Print"}                      TeX Print
 @{" lisp-body-indent " Link "Lisp Indent"}                     Lisp Indent
 @{" lisp-indent-offset " Link "Lisp Indent"}                   Lisp Indent
 @{" lisp-interaction-mode-hook " Link "Program Modes"}           Program Modes
 @{" lisp-mode-hook " Link "Program Modes"}                       Program Modes
 @{" lisp-mode-map " Link "Keymaps"}                        Keymaps
 @{" list-directory-brief-switches " Link "ListDir"}        ListDir
 @{" list-directory-verbose-switches " Link "ListDir"}      ListDir
 @{" load-path " Link "Loading"}                            Loading
 @{" lpr-command " Link "Hardcopy"}                          Hardcopy
 @{" lpr-switches " Link "Hardcopy"}                         Hardcopy
 @{" mail-archive-file-name " Link "Mail Headers"}               Mail Headers
 @{" mail-default-reply-to " Link "Mail Headers"}                Mail Headers
 @{" mail-header-separator " Link "Mail Format"}                Mail Format
 @{" mail-mode-hook " Link "Mail Mode"}                       Mail Mode
 @{" mail-setup-hook " Link "Mail Mode"}                      Mail Mode
 @{" mail-signature (V19) " Link "Mail Changes"}                 Mail Changes
 @{" mail-yank-prefix (V19) " Link "Mail Changes"}               Mail Changes
 @{" make-backup-files " Link "Backup"}                    Backup
 @{" mark-ring " Link "Mark Ring"}                            Mark Ring
 @{" mark-ring-max " Link "Mark Ring"}                        Mark Ring
 @{" meta-flag " Link "Characters"}                            Characters
 @{" minibuffer-local-completion-map " Link "Keymaps"}      Keymaps
 @{" minibuffer-local-map " Link "Keymaps"}                 Keymaps
 @{" minibuffer-local-must-match-map " Link "Keymaps"}      Keymaps
 @{" minibuffer-local-ns-map " Link "Keymaps"}              Keymaps
 @{" mode-line-inverse-video " Link "Display Vars"}              Display Vars
 @{" mode-line-inverse-video " Link "Mode Line"}              Mode Line
 @{" muddle-mode-hook " Link "Program Modes"}                     Program Modes
 @{" next-screen-context-lines " Link "Scrolling"}            Scrolling
 @{" no-redraw-on-reenter " Link "Display Vars"}                 Display Vars
 @{" nroff-mode-hook " Link "Nroff Mode"}                      Nroff Mode
 @{" outline-mode-hook " Link "Outline Mode"}                    Outline Mode
 @{" outline-regexp " Link "Outline Format"}                       Outline Format
 @{" page-delimiter " Link "Pages"}                       Pages
 @{" paragraph-separate " Link "Paragraphs"}                   Paragraphs
 @{" paragraph-start " Link "Paragraphs"}                      Paragraphs
 @{" parse-sexp-ignore-comments " Link "Syntax Entry"}           Syntax Entry
 @{" picture-mode-hook " Link "Picture"}                    Picture
 @{" picture-tab-chars " Link "Tabs in Picture"}                    Tabs in Picture
 @{" plain-TeX-mode-hook " Link "TeX Print"}                  TeX Print
 @{" pre-abbrev-expand-hook (V19) " Link "Hook Changes"}         Hook Changes
 @{" repeat-complex-command-map " Link "Keymaps"}           Keymaps
 @{" require-final-newline " Link "Saving"}                Saving
 @{" rmail-dont-reply-to " Link "Rmail Reply"}                  Rmail Reply
 @{" rmail-edit-mode-hook " Link "Rmail Editing"}                 Rmail Editing
 @{" rmail-ignored-headers " Link "Rmail Editing"}                Rmail Editing
 @{" rmail-output-file-alist " Link "Mail Changes"}              Mail Changes
 @{" save-abbrevs " Link "Saving Abbrevs"}                         Saving Abbrevs
 @{" scheme-mode-hook " Link "Program Modes"}                     Program Modes
 @{" scroll-step " Link "Scrolling"}                          Scrolling
 @{" sdb-mode-hook " Link "GUD Customization"}                        GUD Customization
 @{" search-delete-char " Link "Incremental Search"}                   Incremental Search
 @{" search-exit-char " Link "Incremental Search"}                     Incremental Search
 @{" search-quote-char " Link "Incremental Search"}                    Incremental Search
 @{" search-repeat-char " Link "Incremental Search"}                   Incremental Search
 @{" search-reverse-char " Link "Incremental Search"}                  Incremental Search
 @{" search-slow-speed " Link "Incremental Search"}                    Incremental Search
 @{" search-slow-window-lines " Link "Incremental Search"}             Incremental Search
 @{" search-yank-line-char " Link "Incremental Search"}                Incremental Search
 @{" search-yank-word-char " Link "Incremental Search"}                Incremental Search
 @{" selective-display-ellipses " Link "Outline Visibility"}           Outline Visibility
 @{" selective-display-ellipses " Link "Display Vars"}           Display Vars
 @{" sentence-end " Link "Sentences"}                         Sentences
 @{" shell-cd-regexp " Link "Interactive Shell"}                      Interactive Shell
 @{" shell-file-name " Link "Single Shell"}                      Single Shell
 @{" shell-popd-regexp " Link "Interactive Shell"}                    Interactive Shell
 @{" shell-prompt-pattern " Link "Shell Mode"}                 Shell Mode
 @{" shell-pushd-regexp " Link "Interactive Shell"}                   Interactive Shell
 @{" shell-set-directory-error-hook " Link "Interactive Shell"}       Interactive Shell
 @{" split-window-keep-point (V19) " Link "Changed Commands"}        Changed Commands
 @{" tab-stop-list " Link "Tab Stops"}                        Tab Stops
 @{" tab-width " Link "Display Vars"}                            Display Vars
 @{" tags-file-name " Link "Select Tag Table"}                       Select Tag Table
 @{" term-file-prefix " Link "Terminal Init"}                     Terminal Init
 @{" term-setup-hook " Link "Terminal Init"}                      Terminal Init
 @{" tex-directory (V19) " Link "TeX Mode Changes"}                  TeX Mode Changes
 @{" TeX-mode-hook " Link "TeX Print"}                        TeX Print
 @{" text-mode-hook " Link "Text Mode"}                       Text Mode
 @{" track-eol " Link "Basic"}                            Basic
 @{" trim-versions-without-asking " Link "Backup Deletion"}         Backup Deletion
 @{" truncate-lines " Link "Continuation Lines"}                       Continuation Lines
 @{" truncate-partial-width-windows " Link "Split Window"}       Split Window
 @{" undo-limit " Link "Undo"}                           Undo
 @{" undo-strong-limit " Link "Undo"}                    Undo
 @{" vc-command-messages (V19) " Link "Variables for Check-in-out"}            Variables for Check-in-out
 @{" vc-comment-alist (V19) " Link "Version Headers"}               Version Headers
 @{" vc-header-string (V19) " Link "Version Headers"}               Version Headers
 @{" vc-initial-comment (V19) " Link "Editing with VC"}             Editing with VC
 @{" vc-keep-workfiles (V19) " Link "Editing with VC"}              Editing with VC
 @{" vc-log-mode-hook (V19) " Link "Log Entries"}               Log Entries
 @{" vc-make-backups (V19) " Link "Editing with VC"}                Editing with VC
 @{" vc-mistrust-permissions (V19) " Link "Variables for Check-in-out"}        Variables for Check-in-out
 @{" vc-static-header-alist (V19) " Link "Version Headers"}         Version Headers
 @{" vc-suppress-confirm (V19) " Link "Variables for Check-in-out"}            Variables for Check-in-out
 @{" version-control " Link "Backup Names"}                      Backup Names
 @{" version-control (V19) " Link "New Facilities"}                New Facilities
 @{" VERSION_CONTROL " Link "New Facilities"}                      New Facilities
 @{" visible-bell " Link "Display Vars"}                         Display Vars
 @{" window-min-height " Link "Change Window"}                    Change Window
 @{" window-min-width " Link "Change Window"}                     Change Window
 @{" write-file-hooks " Link "Saving"}                     Saving


@EndNode

@Node "Concept Index" "emacs/Concept Index"
@Next "Screen"
@Prev "Variable Index"
@Toc "Main"

Concept Index
*************

@Index "Concept Index"



 @{" find and Dired " Link "Dired and Find"}                       Dired and Find
 @{" ispell program (V19) " Link "Spell Changes"}                 Spell Changes
 @{" GNUS " Link "GNUS"}                                 GNUS
 @{" A and B buffers (Emerge) " Link "Overview of Emerge"}             Overview of Emerge
 @{" Abbrev mode " Link "Abbrevs"}                          Abbrevs
 @{" abbrevs " Link "Abbrevs"}                              Abbrevs
 @{" aborting " Link "Quitting"}                             Quitting
 @{" Adaptive Fill mode " Link "Filling Changes"}                   Filling Changes
 @{" againformation " Link "Dissociated Press"}                       Dissociated Press
 @{" American date style (Calendar, V19) " Link "European Calendar Style"}  European Calendar Style
 @{" apropos " Link "Help"}                              Help
 @{" arguments (from shell) " Link "Command Switches"}               Command Switches
 @{" arguments, prefix and numeric " Link "Arguments"}        Arguments
 @{" arrow keys " Link "New Commands"}                           New Commands
 @{" ASCII " Link "Characters"}                                Characters
 @{" Asm mode (V19) " Link "Asm Mode"}                       Asm Mode
 @{" astronomical calendar " Link "Calendar"}                Calendar
 @{" attribute (Rmail) " Link "Rmail Labels"}                    Rmail Labels
 @{" Auto Fill mode " Link "Auto Fill"}                       Auto Fill
 @{" Auto-Save mode " Link "Auto Save"}                       Auto Save
 @{" autoload " Link "Loading"}                             Loading
 @{" Backtrace mode " Link "Lisp Debug"}                       Lisp Debug
 @{" backup file " Link "Backup"}                          Backup
 @{" backups, automatic deleting of " Link "Backup Deletion"}       Backup Deletion
 @{" batch mode " Link "Command Switches"}                           Command Switches
 @{" binding " Link "Commands"}                              Commands
 @{" blank lines " Link "Comments"}                          Comments
 @{" blank lines " Link "Blank Lines"}                          Blank Lines
 @{" body lines (Outline mode) " Link "Outline Format"}            Outline Format
 @{" boredom " Link "Amusements"}                              Amusements
 @{" buffer locking " Link "Interlocking"}                       Interlocking
 @{" buffer menu " Link "Several Buffers"}                          Several Buffers
 @{" Buffer Menu mode " Link "Several Buffers"}                     Several Buffers
 @{" Buffer Menu mode (V19) " Link "Other New Modes"}               Other New Modes
 @{" buffers " Link "Buffers"}                              Buffers
 @{" buggestion " Link "Dissociated Press"}                           Dissociated Press
 @{" bugs " Link "Bugs"}                                 Bugs
 @{" byte code " Link "Compiling Libraries"}                            Compiling Libraries
 @{" C mode " Link "Program Modes"}                               Program Modes
 @{" C++ mode (V19) " Link "Other New Modes"}                       Other New Modes
 @{" C- " Link "Characters"}                                   Characters
 @{" C-g " Link "Quitting"}                                  Quitting
 @{" calendar (V19) " Link "Calendar"}                       Calendar
 @{" case conversion " Link "Case"}                      Case
 @{" case conversion " Link "Fixing Case"}                      Fixing Case
 @{" case conversion of file names (V19) " Link "Dired Case Conversion"}  Dired Case Conversion
 @{" centering " Link "Fill Commands"}                            Fill Commands
 @{" change buffers " Link "Select Buffer"}                       Select Buffer
 @{" change log " Link "Change Log"}                           Change Log
 @{" character set " Link "Characters"}                        Characters
 @{" checking in files " Link "Concepts of VC"}                    Concepts of VC
 @{" checking out files " Link "Concepts of VC"}                   Concepts of VC
 @{" choosing a mode " Link "Choosing Modes"}                      Choosing Modes
 @{" clipping text " Link "Killing"}                        Killing
 @{" command " Link "Key Bindings"}                              Key Bindings
 @{" command " Link "Commands"}                              Commands
 @{" command history " Link "Repetition"}                      Repetition
 @{" command line arguments " Link "Command Switches"}               Command Switches
 @{" command name " Link "Key Bindings"}                         Key Bindings
 @{" comments " Link "Comments"}                             Comments
 @{" compilation errors " Link "Compilation"}                   Compilation
 @{" completion " Link "Completion"}                           Completion
 @{" completion (symbol names) " Link "Lisp Completion"}            Lisp Completion
 @{" continuation line " Link "Continuation Lines"}                    Continuation Lines
 @{" Control " Link "Characters"}                              Characters
 @{" Control-Meta " Link "Lists"}                         Lists
 @{" copying files " Link "Misc File Ops"}                        Misc File Ops
 @{" copying text " Link "Yanking"}                         Yanking
 @{" crashes " Link "Auto Save"}                              Auto Save
 @{" creating files " Link "Visiting"}                       Visiting
 @{" current buffer " Link "Buffers"}                       Buffers
 @{" current stack frame " Link "Lisp Debug"}                  Lisp Debug
 @{" cursor " Link "Basic"}                               Basic
 @{" cursor " Link "Point"}                               Point
 @{" customization " Link "Customization"}                        Customization
 @{" customization " Link "Lisp Indent"}                        Lisp Indent
 @{" customization " Link "Commands"}                        Commands
 @{" cutting " Link "Killing"}                              Killing
 @{" dates, style of writing (Calendar, V19) " Link "European Calendar Style"} European Calendar Style
 @{" DBX " Link "Debuggers"}                                  Debuggers
 @{" debugger " Link "Lisp Debug"}                             Lisp Debug
 @{" debuggers " Link "Debuggers"}                            Debuggers
 @{" default argument " Link "Minibuffer"}                     Minibuffer
 @{" defuns " Link "Defuns"}                               Defuns
 @{" deletion " Link "Killing"}                             Killing
 @{" deletion " Link "Basic"}                             Basic
 @{" deletion (of files) " Link "Dired"}                  Dired
 @{" deletion (of files) " Link "Misc File Ops"}                  Misc File Ops
 @{" deletion (Rmail) " Link "Rmail Deletion"}                     Rmail Deletion
 @{" diary and Emacs startup (V19) " Link "Startup Diary"}        Startup Diary
 @{" diary display (V19) " Link "Displaying Diary"}                  Displaying Diary
 @{" diary entries (V19) " Link "Diary Entries"}                  Diary Entries
 @{" diary entries, inserting (V19) " Link "New Entries"}       New Entries
 @{" digest message " Link "Rmail Digest"}                       Rmail Digest
 @{" directory listing " Link "ListDir"}                    ListDir
 @{" Dired " Link "Dired"}                                Dired
 @{" Dired in V19 " Link "Dired Changes"}                         Dired Changes
 @{" Dired mode " Link "Dired Enter"}                           Dired Enter
 @{" Dired multiple file ops (V19) " Link "Multiple Files"}        Multiple Files
 @{" disabled command " Link "Disabling"}                     Disabling
 @{" disassemble " Link "Compiling Libraries"}                          Compiling Libraries
 @{" display of diary (V19) " Link "Displaying Diary"}               Displaying Diary
 @{" display time " Link "Mode Line"}                         Mode Line
 @{" Distribution " Link "License"}                         License
 @{" doctor " Link "Total Frustration"}                               Total Frustration
 @{" drastic changes " Link "Reverting"}                      Reverting
 @{" dribble file " Link "Bugs"}                         Bugs
 @{" dynamic abbrevs " Link "Dynamic Abbrevs"}                      Dynamic Abbrevs
 @{" echo area " Link "Echo Area"}                            Echo Area
 @{" Edebug mode (V19) " Link "Edebug Mode"}                    Edebug Mode
 @{" Edit-Abbrevs mode " Link "Editing Abbrevs"}                    Editing Abbrevs
 @{" editing binary files (V19) " Link "Editing Binary Files"}           Editing Binary Files
 @{" editing level, recursive " Link "Recursive Edit"}             Recursive Edit
 @{" editing level, recursive " Link "Quitting"}             Quitting
 @{" EDT " Link "Emulation"}                                  Emulation
 @{" Electric Nroff mode " Link "Nroff Mode"}                  Nroff Mode
 @{" Eliza " Link "Total Frustration"}                                Total Frustration
 @{" Emacs initialization file " Link "Init File"}            Init File
 @{" Emacs version " Link "Bugs"}                        Bugs
 @{" Emacs-Lisp mode " Link "Lisp Eval"}                      Lisp Eval
 @{" Emerge (V19) " Link "Emerge"}                         Emerge
 @{" entering Emacs " Link "Entering Emacs"}                       Entering Emacs
 @{" environment " Link "Single Shell"}                          Single Shell
 @{" error log " Link "Compilation"}                            Compilation
 @{" ESC replacing META key " Link "Characters"}               Characters
 @{" etags program " Link "Create Tag Table"}                        Create Tag Table
 @{" European calendar style (V19) " Link "European Calendar Style"}        European Calendar Style
 @{" European date style (Calendar, V19) " Link "European Calendar Style"}  European Calendar Style
 @{" exiting " Link "Exiting"}                              Exiting
 @{" exiting " Link "Recursive Edit"}                              Recursive Edit
 @{" expanded subdirectory (Dired, V19) " Link "Subdirectories in Dired"}   Subdirectories in Dired
 @{" expanding subdirectories in Dired  (V19) " Link "Subdirectories in Dired"} Subdirectories in Dired
 @{" expansion (of abbrevs) " Link "Abbrevs"}               Abbrevs
 @{" expansion of C macros " Link "Macro Expansion"}                Macro Expansion
 @{" expression " Link "Lists"}                           Lists
 @{" expressions, regular " Link "Regexp Search"}                 Regexp Search
 @{" expunging (Rmail) " Link "Rmail Deletion"}                    Rmail Deletion
 @{" Fancy Diary mode (V19) " Link "Simple and Fancy"}               Simple and Fancy
 @{" file dates " Link "Interlocking"}                           Interlocking
 @{" file directory " Link "ListDir"}                       ListDir
 @{" file names " Link "File Names"}                           File Names
 @{" files " Link "Files"}                                Files
 @{" files " Link "Basic"}                                Basic
 @{" files " Link "Visiting"}                                Visiting
 @{" fill prefix " Link "Fill Prefix"}                          Fill Prefix
 @{" filling " Link "Filling"}                              Filling
 @{" flow control in V19 " Link "New Facilities"}                  New Facilities
 @{" formfeed " Link "Pages"}                             Pages
 @{" Fortran mode " Link "Fortran"}                         Fortran
 @{" forward a message " Link "Rmail Reply"}                    Rmail Reply
 @{" French revolutionary calendar " Link "Calendar"}        Calendar
 @{" ftp " Link "New Facilities"}                                  New Facilities
 @{" function " Link "Key Bindings"}                             Key Bindings
 @{" function " Link "Commands"}                             Commands
 @{" function keys (V19) " Link "Key Sequence Changes"}                  Key Sequence Changes
 @{" GDB " Link "Debuggers"}                                  Debuggers
 @{" General Public License " Link "License"}               License
 @{" global keymap " Link "Keymaps"}                        Keymaps
 @{" global substitution " Link "Replace"}                  Replace
 @{" goal column " Link "Basic"}                          Basic
 @{" graphic characters " Link "Basic"}                   Basic
 @{" grinding " Link "Grinding"}                             Grinding
 @{" hardcopy " Link "Hardcopy"}                             Hardcopy
 @{" header (TeX mode) " Link "TeX Print"}                    TeX Print
 @{" headerline (Dired, V19) " Link "Subdirectories in Dired"}              Subdirectories in Dired
 @{" headers (of mail message) " Link "Mail Headers"}            Mail Headers
 @{" heading lines (Outline mode) " Link "Outline Format"}         Outline Format
 @{" Hebrew calendar " Link "Calendar"}                      Calendar
 @{" help " Link "Help"}                                 Help
 @{" Hexl mode (V19) " Link "Editing Binary Files"}                      Editing Binary Files
 @{" hiding in Dired (Dired, V19) " Link "Hiding Subdirectories"}         Hiding Subdirectories
 @{" history of commands " Link "Repetition"}                  Repetition
 @{" history, in minibuffer " Link "New Facilities"}               New Facilities
 @{" hook variable (V19) " Link "Hook Changes"}                  Hook Changes
 @{" hooks for files " Link "Visiting"}                      Visiting
 @{" horizontal scrolling " Link "Horizontal Scrolling"}                 Horizontal Scrolling
 @{" ignoriginal " Link "Dissociated Press"}                          Dissociated Press
 @{" in-situ subdirectory (Dired, V19) " Link "Subdirectories in Dired"}    Subdirectories in Dired
 @{" inbox file " Link "Rmail Inbox"}                           Rmail Inbox
 @{" Incremental search in V19 " Link "Search Changes"}            Search Changes
 @{" indentation " Link "Comments"}                          Comments
 @{" indentation " Link "Indentation"}                          Indentation
 @{" indentation " Link "Grinding"}                          Grinding
 @{" indentation " Link "Indentation"}                          Indentation
 @{" Indented Text mode " Link "Text Mode"}                   Text Mode
 @{" Inferior Lisp mode " Link "External Lisp"}                   External Lisp
 @{" inferior process " Link "Compilation"}                     Compilation
 @{" Inferior Scheme mode " Link "Lisp Modes"}                 Lisp Modes
 @{" Info mode in V19 " Link "Info Changes"}                     Info Changes
 @{" init file " Link "Init File"}                            Init File
 @{" inserted subdirectory (Dired, V19) " Link "Subdirectories in Dired"}   Subdirectories in Dired
 @{" insertion " Link "Basic"}                            Basic
 @{" interlocking buffers " Link "Interlocking"}                 Interlocking
 @{" invisible lines " Link "Outline Mode"}                      Outline Mode
 @{" Islamic calendar " Link "Calendar"}                     Calendar
 @{" ISO commercial calendar " Link "Calendar"}              Calendar
 @{" Julian calendar " Link "Calendar"}                      Calendar
 @{" Julian day number " Link "Calendar"}                    Calendar
 @{" justification " Link "Fill Commands"}                        Fill Commands
 @{" key " Link "Keys"}                                  Keys
 @{" key rebinding, permanent " Link "Init File"}             Init File
 @{" key rebinding, this session " Link "Rebinding"}          Rebinding
 @{" key sequence changes (V19) " Link "Key Sequence Changes"}           Key Sequence Changes
 @{" keyboard macros " Link "Keyboard Macros"}                      Keyboard Macros
 @{" keymap " Link "Commands"}                               Commands
 @{" keymap " Link "Keymaps"}                               Keymaps
 @{" kill ring " Link "Yanking"}                            Yanking
 @{" killing " Link "Killing"}                              Killing
 @{" killing Emacs " Link "Exiting"}                        Exiting
 @{" label (Rmail) " Link "Rmail Labels"}                        Rmail Labels
 @{" LaTeX " Link "TeX Mode"}                                TeX Mode
 @{" libraries " Link "Lisp Libraries"}                            Lisp Libraries
 @{" license to copy Emacs " Link "License"}                License
 @{" line number " Link "Position Info"}                          Position Info
 @{" Lisp Interaction mode " Link "Lisp Interaction"}                Lisp Interaction
 @{" Lisp mode " Link "Lisp Modes"}                            Lisp Modes
 @{" Lisp mode " Link "Program Modes"}                            Program Modes
 @{" list " Link "Lists"}                                 Lists
 @{" listing a directory " Link "ListDir"}                  ListDir
 @{" loading Lisp code " Link "Lisp Libraries"}                    Lisp Libraries
 @{" local keymap " Link "Keymaps"}                         Keymaps
 @{" local variables " Link "Locals"}                      Locals
 @{" local variables and Auto Fill " Link "File Variables"}        File Variables
 @{" local variables in files " Link "File Variables"}             File Variables
 @{" locking and version control " Link "Concepts of VC"}          Concepts of VC
 @{" locking buffers " Link "Interlocking"}                      Interlocking
 @{" M- " Link "Characters"}                                   Characters
 @{" macro expansion in C " Link "Macro Expansion"}                 Macro Expansion
 @{" mail " Link "Sending Mail"}                                 Sending Mail
 @{" mail arrival " Link "Mode Line"}                         Mode Line
 @{" Mail mode " Link "Mail Mode"}                            Mail Mode
 @{" Mail mode in V19 " Link "Mail Changes"}                     Mail Changes
 @{" major modes " Link "Major Modes"}                          Major Modes
 @{" make " Link "Compilation"}                                 Compilation
 @{" margin position " Link "Variables"}                      Variables
 @{" mark " Link "Mark"}                                 Mark
 @{" mark ring " Link "Mark Ring"}                            Mark Ring
 @{" Markov chain " Link "Dissociated Press"}                         Dissociated Press
 @{" Marks in Dired (V19) " Link "Marks in Dired"}                 Marks in Dired
 @{" master file " Link "Concepts of VC"}                          Concepts of VC
 @{" matching parentheses " Link "Matching"}                 Matching
 @{" Mayan calendar " Link "Calendar"}                       Calendar
 @{" merge buffer (Emerge) " Link "Overview of Emerge"}                Overview of Emerge
 @{" merging files (V19) " Link "Emerge"}                  Emerge
 @{" message " Link "Sending Mail"}                              Sending Mail
 @{" message " Link "Rmail"}                              Rmail
 @{" message number " Link "Rmail"}                       Rmail
 @{" Meta " Link "Characters"}                                 Characters
 @{" Meta " Link "Words"}                                 Words
 @{" minibuffer " Link "M-x"}                           M-x
 @{" minibuffer " Link "Minibuffer"}                           Minibuffer
 @{" minibuffer " Link "Keymaps"}                           Keymaps
 @{" minibuffer history " Link "New Facilities"}                   New Facilities
 @{" minor modes " Link "Minor Modes"}                          Minor Modes
 @{" mistakes, correcting " Link "Undo"}                 Undo
 @{" mistakes, correcting " Link "Fixit"}                 Fixit
 @{" mocklisp " Link "Mocklisp"}                             Mocklisp
 @{" mode hook " Link "Program Modes"}                            Program Modes
 @{" mode line " Link "Mode Line"}                            Mode Line
 @{" mode line " Link "Minor Modes"}                            Minor Modes
 @{" mode selection " Link "Choosing Modes"}                       Choosing Modes
 @{" modified (buffer) " Link "Visiting"}                    Visiting
 @{" mouse buttons (V19) " Link "Key Sequence Changes"}                  Key Sequence Changes
 @{" moving text " Link "Yanking"}                          Yanking
 @{" Multiple file ops, Dired (V19) " Link "Multiple Files"}       Multiple Files
 @{" named configurations (RCS) " Link "Snapshot Caveats"}           Snapshot Caveats
 @{" narrowing " Link "Narrowing"}                            Narrowing
 @{" newline " Link "Basic"}                              Basic
 @{" nonincremental search " Link "Nonincremental Search"}                Nonincremental Search
 @{" normal hook (V19) " Link "Hook Changes"}                    Hook Changes
 @{" nroff " Link "Nroff Mode"}                                Nroff Mode
 @{" Nroff mode " Link "Nroff Mode"}                           Nroff Mode
 @{" numeric arguments " Link "Arguments"}                    Arguments
 @{" option " Link "Examining"}                               Examining
 @{" option " Link "Variables"}                               Variables
 @{" Options mode " Link "Edit Options"}                         Edit Options
 @{" other editors " Link "Emulation"}                        Emulation
 @{" Outline mode " Link "Outline Mode"}                         Outline Mode
 @{" outlines " Link "Outline Mode"}                             Outline Mode
 @{" outragedy " Link "Dissociated Press"}                            Dissociated Press
 @{" Overwrite mode " Link "Minor Modes"}                       Minor Modes
 @{" pages " Link "Pages"}                                Pages
 @{" paragraphs " Link "Paragraphs"}                           Paragraphs
 @{" parentheses " Link "Matching"}                          Matching
 @{" pasting " Link "Yanking"}                              Yanking
 @{" per-buffer variables " Link "Locals"}                 Locals
 @{" Picture mode " Link "Picture"}                         Picture
 @{" pictures " Link "Picture"}                             Picture
 @{" point " Link "Basic"}                                Basic
 @{" point " Link "Point"}                                Point
 @{" prefix arguments " Link "Arguments"}                     Arguments
 @{" prefix key " Link "Keys"}                           Keys
 @{" presidentagon " Link "Dissociated Press"}                        Dissociated Press
 @{" primary mail file " Link "Rmail"}                    Rmail
 @{" Printing diary (V19) " Link "Printing Diary"}                 Printing Diary
 @{" prompt " Link "Minibuffer"}                               Minibuffer
 @{" properbose " Link "Dissociated Press"}                           Dissociated Press
 @{" query replace " Link "Query Replace"}                        Query Replace
 @{" quitting " Link "Quitting"}                             Quitting
 @{" quitting " Link "Quitting"}                             Quitting
 @{" quitting (in search) " Link "Incremental Search"}                 Incremental Search
 @{" quoting " Link "Basic"}                              Basic
 @{" RCS " Link "Concepts of VC"}                                  Concepts of VC
 @{" read-only buffer " Link "Misc Buffer"}                     Misc Buffer
 @{" reading netnews " Link "GNUS"}                      GNUS
 @{" rebinding keys, permanently " Link "Init File"}          Init File
 @{" rebinding keys, this session " Link "Rebinding"}         Rebinding
 @{" rebinding keys, this session " Link "Rebinding"}         Rebinding
 @{" rectangles " Link "Rectangles"}                           Rectangles
 @{" rectangles and Picture mode " Link "Rectangles in Picture"}          Rectangles in Picture
 @{" recursive editing level " Link "Quitting"}              Quitting
 @{" recursive editing level " Link "Recursive Edit"}              Recursive Edit
 @{" recursive minibuffer " Link "Minibuffer Edit"}                 Minibuffer Edit
 @{" regexp " Link "Regexp Search"}                               Regexp Search
 @{" region " Link "Case"}                               Case
 @{" region " Link "Mark"}                               Mark
 @{" registered file " Link "Concepts of VC"}                      Concepts of VC
 @{" registers " Link "Registers"}                            Registers
 @{" regular expression " Link "Regexp Search"}                   Regexp Search
 @{" remote file access " Link "New Facilities"}                   New Facilities
 @{" replacement " Link "Replace"}                          Replace
 @{" reply to a message " Link "Rmail Reply"}                   Rmail Reply
 @{" restriction " Link "Narrowing"}                          Narrowing
 @{" right margin position " Link "Variables"}                Variables
 @{" Rmail " Link "Rmail"}                                Rmail
 @{" Rmail in V19 " Link "Mail Changes"}                         Mail Changes
 @{" Rmail mode " Link "Rmail"}                           Rmail
 @{" Rmail Summary mode " Link "Rmail Summary Edit"}                   Rmail Summary Edit
 @{" saving " Link "Visiting"}                               Visiting
 @{" SCCS " Link "Concepts of VC"}                                 Concepts of VC
 @{" Scheme mode " Link "Program Modes"}                          Program Modes
 @{" Scheme mode " Link "Lisp Modes"}                          Lisp Modes
 @{" scratch buffer " Link "Lisp Interaction"}                       Lisp Interaction
 @{" screen " Link "Screen"}                               Screen
 @{" scrolling " Link "Scrolling"}                            Scrolling
 @{" SDB " Link "Debuggers"}                                  Debuggers
 @{" searching " Link "Search"}                            Search
 @{" selected buffer " Link "Buffers"}                      Buffers
 @{" selected window " Link "Basic Window"}                      Basic Window
 @{" selection of mode " Link "Choosing Modes"}                    Choosing Modes
 @{" selective display " Link "Outline Mode"}                    Outline Mode
 @{" self-documentation " Link "Help"}                   Help
 @{" sentences " Link "Sentences"}                            Sentences
 @{" setting variables " Link "Examining"}                    Examining
 @{" sexp " Link "Lists"}                                 Lists
 @{" shell commands " Link "Shell"}                       Shell
 @{" shell commands, Dired V19 " Link "Shell Commands in Dired"}            Shell Commands in Dired
 @{" Shell mode " Link "Shell Mode"}                           Shell Mode
 @{" Shell mode in V19 " Link "Shell Changes"}                    Shell Changes
 @{" Simple Diary mode (V19) " Link "Simple and Fancy"}              Simple and Fancy
 @{" simultaneous editing " Link "Interlocking"}                 Interlocking
 @{" snapshots and version control " Link "Snapshots"}        Snapshots
 @{" sorting " Link "Sorting"}                              Sorting
 @{" sparse keymap " Link "Keymaps"}                        Keymaps
 @{" Spell checking in V19 " Link "Spell Changes"}                Spell Changes
 @{" spelling " Link "Spelling"}                             Spelling
 @{" string substitution " Link "Replace"}                  Replace
 @{" subdirectories in Dired (V19) " Link "Subdirectories in Dired"}        Subdirectories in Dired
 @{" subscribe newsgroups (V19) " Link "Summary of GNUS"}           Summary of GNUS
 @{" subshell " Link "Shell"}                             Shell
 @{" subtree (Outline mode) " Link "Outline Visibility"}               Outline Visibility
 @{" summaries in Rmail " Link "Rmail Summary Edit"}                   Rmail Summary Edit
 @{" summary (Rmail) " Link "Rmail Summary"}                      Rmail Summary
 @{" suspending " Link "Exiting"}                           Exiting
 @{" switch buffers " Link "Select Buffer"}                       Select Buffer
 @{" syntax table " Link "Syntax"}                         Syntax
 @{" syntax table " Link "Words"}                         Words
 @{" tag table " Link "Tags"}                            Tags
 @{" tags in V19 " Link "Tags Changes"}                          Tags Changes
 @{" techniquitous " Link "Dissociated Press"}                        Dissociated Press
 @{" television " Link "Appending Kills"}                           Appending Kills
 @{" termscript file " Link "Bugs"}                      Bugs
 @{" TeX " Link "TeX Mode"}                                  TeX Mode
 @{" TeX mode " Link "TeX Mode"}                             TeX Mode
 @{" Tex mode in V19 " Link "TeX Mode Changes"}                      TeX Mode Changes
 @{" Texinfo mode " Link "Texinfo Mode"}                         Texinfo Mode
 @{" text " Link "Text"}                                 Text
 @{" Text mode " Link "Text Mode"}                            Text Mode
 @{" time displayed in mode line " Link "Mode Line"}          Mode Line
 @{" top level " Link "Mode Line"}                            Mode Line
 @{" transposition " Link "Transpose"}                        Transpose
 @{" transposition " Link "Words"}                        Words
 @{" transposition " Link "Lists"}                        Lists
 @{" truncation " Link "Continuation Lines"}                           Continuation Lines
 @{" typos " Link "Fixit"}                                Fixit
 @{" undeletion (Rmail) " Link "Rmail Deletion"}                   Rmail Deletion
 @{" undigestify " Link "Rmail Digest"}                          Rmail Digest
 @{" undo " Link "Undo"}                                 Undo
 @{" universal argument " Link "Arguments"}                   Arguments
 @{" unsubscribe newsgroups (V19) " Link "Summary of GNUS"}         Summary of GNUS
 @{" variables " Link "Variables"}                            Variables
 @{" version control " Link "Version Control"}                      Version Control
 @{" version of Emacs " Link "Bugs"}                     Bugs
 @{" versions, keeping old " Link "Backup Deletion"}                Backup Deletion
 @{" vi " Link "Emulation"}                                   Emulation
 @{" VI mode " Link "Emulation"}                              Emulation
 @{" View mode " Link "Misc Buffer"}                            Misc Buffer
 @{" viewing " Link "Misc File Ops"}                              Misc File Ops
 @{" visiting " Link "Visiting"}                             Visiting
 @{" visiting files " Link "Visiting"}                       Visiting
 @{" widening " Link "Narrowing"}                             Narrowing
 @{" windows " Link "Windows"}                              Windows
 @{" word search " Link "Word Search"}                          Word Search
 @{" words " Link "Words"}                                Words
 @{" words " Link "Case"}                                Case
 @{" words " Link "Fixing Case"}                                Fixing Case
 @{" WordStar mode (V19) " Link "Other New Modes"}                  Other New Modes
 @{" work file " Link "Concepts of VC"}                            Concepts of VC
 @{" wrapping " Link "Filling"}                             Filling
 @{" xon-xoff in V19 " Link "New Facilities"}                      New Facilities
 @{" yanking " Link "Yanking"}                              Yanking

@EndNode

