Remove duplicate words.
[bpt/emacs.git] / doc / emacs / files.texi
index 0d6808d..aad2b4a 100644 (file)
@@ -1,6 +1,6 @@
 @c This is part of the Emacs manual.
 @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1999, 2000,
-@c   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+@c   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
 @node Files, Buffers, Keyboard Macros, Top
 @chapter File Handling
@@ -30,7 +30,6 @@ on file directories.
 @end ifnottex
 * Auto Save::           Auto Save periodically protects against loss of data.
 * File Aliases::        Handling multiple names for one file.
-* Version Control::     Version control systems (RCS, CVS and SCCS).
 * Directories::         Creating, deleting, and listing file directories.
 * Comparing Files::     Finding where two files differ.
 * Diff Mode::           Mode for editing file differences.
@@ -48,106 +47,82 @@ on file directories.
 @section File Names
 @cindex 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.)  You enter the file name using the
-minibuffer (@pxref{Minibuffer}).  @dfn{Completion} is available
-(@pxref{Completion}) to make it easier to specify long file names.  When
-completing file names, Emacs ignores those whose file-name extensions
-appear in the variable @code{completion-ignored-extensions}; see
-@ref{Completion Options}.
-
-  For most operations, there is a @dfn{default file name} which is used
-if you type just @key{RET} to enter 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.
+  Many Emacs commands that operate on a file require you to specify
+the file name, using the minibuffer (@pxref{Minibuffer}).  You can use
+@dfn{completion} to specify long file names (@pxref{Completion}).
+Note that file name completion ignores file names whose extensions
+appear in the variable @code{completion-ignored-extensions}
+(@pxref{Completion Options}).
+
+  For most operations, there is a @dfn{default file name} which is
+used if you type just @key{RET} to enter an empty argument.  Normally,
+the default file name is the name of the file visited in the current
+buffer.
 
 @vindex default-directory
-  Each buffer has a default directory which is normally the same as the
-directory of the file visited in that buffer.  When you enter a file
-name without 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 @code{default-directory},
-which has a separate value in every buffer.
+@vindex insert-default-directory
+  Each buffer has a @dfn{default directory} which is normally the same
+as the directory of the file visited in that buffer.  For example, if
+the default file name is @file{/u/rms/gnu/gnu.tasks}, the default
+directory is normally @file{/u/rms/gnu/}.  The default directory is
+kept in the variable @code{default-directory}, which has a separate
+value in every buffer.  When a command reads a file name using the
+minibuffer, the default directory usually serves as the initial
+contents of the minibuffer.  To inhibit the insertion of the default
+directory, set the variable @code{insert-default-directory} to
+@code{nil}.
 
-@findex cd
-@findex pwd
-  The command @kbd{M-x pwd} displays the current buffer's default
-directory, and the command @kbd{M-x cd} sets it (to a value read using
-the minibuffer).  A buffer's default directory changes only when the
-@code{cd} command is used.  A file-visiting buffer's default directory
-is initialized to the directory of the file it visits.  If you create
-a buffer with @kbd{C-x b}, its default directory is copied from that
-of the buffer that was current at the time.
-
-  For example, if the default file name is @file{/u/rms/gnu/gnu.tasks}
-then the default directory is normally @file{/u/rms/gnu/}.  If you
-type just @samp{foo}, which does not specify a directory, it is short
-for @file{/u/rms/gnu/foo}.  @samp{../.login} would stand for
-@file{/u/rms/.login}.  @samp{new/foo} would stand for the file name
+  If you enter a file name without a directory, that specifies a file
+in the default directory.  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.  For example,
+suppose the default directory is @file{/u/rms/gnu/}.  Entering just
+@samp{foo} in the minibuffer, with a directory omitted, specifies the
+file @file{/u/rms/gnu/foo}; entering @samp{../.login} specifies
+@file{/u/rms/.login}; and entering @samp{new/foo} specifies
 @file{/u/rms/gnu/new/foo}.
 
-@vindex insert-default-directory
-  The default directory actually appears in the minibuffer when the
-minibuffer becomes active to read a file name.  This serves two
-purposes: it @emph{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 @emph{edit} the default to specify a different directory.
-This insertion of the default directory is inhibited if the variable
-@code{insert-default-directory} is set to @code{nil}.
-
-  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.  For example, if the minibuffer starts out
-with @samp{/usr/tmp/} and you add @samp{/x1/rms/foo}, you get
-@samp{/usr/tmp//x1/rms/foo}; but Emacs ignores everything through the
-first slash in the double slash; the result is @samp{/x1/rms/foo}.
-@xref{Minibuffer File}.
-
-@cindex home directory shorthand
-  You can use @file{~/} in a file name to mean your home directory,
-or @file{~@var{user-id}/} to mean the home directory of a user whose
-login name is @code{user-id}@footnote{
-On MS-Windows and MS-DOS systems, where a user doesn't have a home
-directory, Emacs replaces @file{~/} with the value of the
-environment variable @code{HOME}; see @ref{General Variables}.  On
-these systems, the @file{~@var{user-id}/} construct is supported only
-for the current user, i.e., only if @var{user-id} is the current
-user's login name.}.
+  When typing a file name into the minibuffer, you can make use of a
+couple of shortcuts: a double slash is interpreted as ``ignore
+everything before the second slash in the pair,'' and @samp{~/} is
+interpreted as your home directory.  @xref{Minibuffer File}, for more
+information about these shortcuts.
+
+@findex cd
+@findex pwd
+  The command @kbd{M-x pwd} displays the default directory, and the
+command @kbd{M-x cd} sets it to a value read using the minibuffer.  A
+buffer's default directory changes only when the @code{cd} command is
+used.  A file-visiting buffer's default directory is initialized to
+the directory of the file it visits.  If you create a buffer with
+@kbd{C-x b}, its default directory is copied from that of the buffer
+that was current at the time (@pxref{Select Buffer}).
 
 @cindex environment variables in file names
 @cindex expansion of environment variables
 @cindex @code{$} in file names
-  @anchor{File Names with $}@samp{$} in a file name is used to
-substitute an environment variable.  The environment variable name
-consists of all the alphanumeric characters after the @samp{$};
-alternatively, it can be enclosed in braces after the @samp{$}.  For
-example, if you have used the shell command @command{export
-FOO=rms/hacks} to set up an environment variable named @env{FOO}, then
-you can use @file{/u/$FOO/test.c} or @file{/u/$@{FOO@}/test.c} as an
-abbreviation for @file{/u/rms/hacks/test.c}.  If the environment
-variable is not defined, no substitution occurs: @file{/u/$notdefined}
-stands for itself (assuming the environment variable @env{notdefined}
-is not defined).
-
-  Note that shell commands to set environment variables affect Emacs
-only when done before Emacs is started.
+  @anchor{File Names with $}The character @samp{$} is used to
+substitute an environment variable into a file name.  The name of the
+environment variable consists of all the alphanumeric characters after
+the @samp{$}; alternatively, it can be enclosed in braces after the
+@samp{$}.  For example, if you have used the shell command
+@command{export FOO=rms/hacks} to set up an environment variable named
+@env{FOO}, then both @file{/u/$FOO/test.c} and
+@file{/u/$@{FOO@}/test.c} are abbreviations for
+@file{/u/rms/hacks/test.c}.  If the environment variable is not
+defined, no substitution occurs, so that the character @samp{$} stands
+for itself.
+
+  Note that environment variables affect Emacs only if they are
+applied before Emacs is started.
 
   To access a file with @samp{$} in its name, if the @samp{$} causes
 expansion, type @samp{$$}.  This pair is converted to a single
-@samp{$} at the same time as variable substitution is performed for a
-single @samp{$}.  Alternatively, quote the whole file name with
+@samp{$} at the same time that variable substitution is performed for
+single @samp{$}.  Alternatively, quote the whole file name with
 @samp{/:} (@pxref{Quoted File Names}).  File names which begin with a
 literal @samp{~} should also be quoted with @samp{/:}.
 
-@findex substitute-in-file-name
-  The Lisp function that performs the @samp{$}-substitution is called
-@code{substitute-in-file-name}.  The substitution is performed only on
-file names read as such using the minibuffer.
-
   You can include non-@acronym{ASCII} characters in file names if you set the
 variable @code{file-name-coding-system} to a non-@code{nil} value.
 @xref{File Name Coding}.
@@ -180,48 +155,44 @@ Visit a file with no conversion of the contents.
 @cindex saving files
   @dfn{Visiting} a file means reading its contents into an Emacs
 buffer so you can edit them.  Emacs makes a new buffer for each file
-that you visit.  We often say that this buffer ``is visiting'' that
-file, or that the buffer's ``visited file'' is that file.  Emacs
-constructs the buffer name from the file name by throwing away the
-directory, keeping just the name proper.  For example, a file named
-@file{/usr/rms/emacs.tex} would get a buffer named @samp{emacs.tex}.
-If there is already a buffer with that name, Emacs constructs a unique
-name---the normal method is to append @samp{<2>}, @samp{<3>}, and so
-on, but you can select other methods (@pxref{Uniquify}).
-
-  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.
+that you visit.
+
+  Emacs normally constructs the buffer name from the file name,
+omitting the directory name.  For example, a file named
+@file{/usr/rms/emacs.tex} is visited in a buffer named
+@samp{emacs.tex}.  If there is already a buffer with that name, Emacs
+constructs a unique name; the normal method is to append @samp{<2>},
+@samp{<3>}, and so on, but you can select other methods.
+@xref{Uniquify}.
+
+  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.  @pxref{Mode Line}.
 
   The changes you make with editing commands are made in the Emacs
 buffer.  They do not take effect in the file that you visited, or any
-permanent place, until you @dfn{save} the buffer.  Saving the buffer
-means that Emacs writes the current contents of the buffer into its
-visited file.  @xref{Saving}.
+permanent place, until you @dfn{save} the buffer (@pxref{Saving}).
 
 @cindex modified (buffer)
   If a buffer contains changes that have not been saved, we say the
-buffer is @dfn{modified}.  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 to indicate that the buffer is
-modified.
+buffer is @dfn{modified}.  This implies that some changes will be lost
+if the buffer is not saved.  The mode line displays two stars near the
+left margin to indicate that the buffer is modified.
 
 @kindex C-x C-f
 @findex find-file
-  To visit a file, use the command @kbd{C-x C-f} (@code{find-file}).  Follow
-the command with the name of the file you wish to visit, terminated by a
-@key{RET}.
-
-  The file name is read using the minibuffer (@pxref{Minibuffer}), with
-defaulting and completion in the standard manner (@pxref{File Names}).
-While in the minibuffer, you can abort @kbd{C-x C-f} by typing
-@kbd{C-g}.  File-name completion ignores certain file names; for more
-about this, see @ref{Completion Options}.
-
-  Your confirmation that @kbd{C-x C-f} 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 you could not
-create it, or exists but you can't read it, then you get an error,
-with an error message displayed in the echo area.
+  To visit a file, type @kbd{C-x C-f} (@code{find-file}) and use the
+minibuffer to enter the name of the desired file.  The usual
+defaulting and completion behavior is available in this minibuffer
+(@pxref{Minibuffer File}).  Note, also, that completion ignores
+certain file names (@pxref{Completion Options}).  While in the
+minibuffer, you can abort @kbd{C-x C-f} by typing @kbd{C-g}.
+
+  Your can tell that @kbd{C-x C-f} has completed successfully by 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 you could not create
+it, or exists but you can't read it, an error message is displayed in
+the echo area.
 
   If you visit a file that is already in Emacs, @kbd{C-x C-f} does not make
 another copy.  It selects the existing buffer containing that file.
@@ -233,72 +204,89 @@ to reread it.
 @cindex maximum buffer size exceeded, error message
   If you try to visit a file larger than
 @code{large-file-warning-threshold} (the default is 10000000, which is
-about 10 megabytes), Emacs will ask you for confirmation first.  You
-can answer @kbd{y} to proceed with visiting the file.  Note, however,
-that Emacs cannot visit files that are larger than the maximum Emacs
-buffer size, which is around 256 megabytes on 32-bit machines
+about 10 megabytes), Emacs asks you for confirmation first.  You can
+answer @kbd{y} to proceed with visiting the file.  Note, however, that
+Emacs cannot visit files that are larger than the maximum Emacs buffer
+size, which is around 256 megabytes on 32-bit machines
 (@pxref{Buffers}).  If you try, Emacs will display an error message
 saying that the maximum buffer size has been exceeded.
 
+@cindex wildcard characters in file names
+@vindex find-file-wildcards
+  If the file name you specify contains shell-style wildcard
+characters, Emacs visits all the files that match it.  (On
+case-insensitive filesystems, Emacs matches the wildcards disregarding
+the letter case.)  Wildcards include @samp{?}, @samp{*}, and
+@samp{[@dots{}]} sequences.  To enter the wild card @samp{?} in a file
+name in the minibuffer, you need to type @kbd{C-q ?}.  @xref{Quoted
+File Names}, for information on how to visit a file whose name
+actually contains wildcard characters.  You can disable the wildcard
+feature by customizing @code{find-file-wildcards}.
+
 @cindex file selection dialog
-  On graphical displays there are two additional methods for
-visiting files.  Firstly, when Emacs is built with a suitable GUI
-toolkit, commands invoked with the mouse (by clicking on the menu bar
-or tool bar) use the toolkit's standard File Selection dialog instead
-of prompting for the file name in the minibuffer.  On Unix and
-GNU/Linux platforms, Emacs does that when built with GTK, LessTif, and
-Motif toolkits; on MS-Windows and Mac, the GUI version does that by default.
+  On graphical displays, there are two additional methods for visiting
+files.  Firstly, when Emacs is built with a suitable GUI toolkit,
+commands invoked with the mouse (by clicking on the menu bar or tool
+bar) use the toolkit's standard ``File Selection'' dialog instead of
+prompting for the file name in the minibuffer.  On GNU/Linux and Unix
+platforms, Emacs does this when built with GTK, LessTif, and Motif
+toolkits; on MS-Windows and Mac, the GUI version does that by default.
 For information on how to customize this, see @ref{Dialog Boxes}.
 
-  Secondly, Emacs supports ``drag and drop''; dropping a file into an
-ordinary Emacs window visits the file using that window.  However,
-dropping a file into a window displaying a Dired buffer moves or
-copies the file into the displayed directory.  For details, see
-@ref{Drag and Drop}, and @ref{Misc Dired Features}.
+  Secondly, Emacs supports ``drag and drop'': dropping a file into an
+ordinary Emacs window visits the file using that window.  As an
+exception, dropping a file into a window displaying a Dired buffer
+moves or copies the file into the displayed directory.  For details,
+see @ref{Drag and Drop}, and @ref{Misc Dired Features}.
 
 @cindex creating files
-  What if you want to create a new file?  Just visit it.  Emacs displays
-@samp{(New file)} 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.
+  What if you want to create a new file?  Just visit it.  Emacs
+displays @samp{(New file)} in the echo area, but in other respects
+behaves as if you had visited an existing empty file.  If you make
+changes and save them, the file is created.
+
+@cindex minibuffer confirmation
+@cindex confirming in the minibuffer
+  When @key{TAB} completion results in a nonexistent file name and you
+type @key{RET} immediately to visit it, Emacs asks for confirmation
+because it is quite possible that you expected completion to go
+further and give you an existing file's name.  Type @key{RET} to
+confirm and visit the nonexistent file.  The string @samp{[Confirm]}
+appears for a short time after the file name to indicate the need to
+confirm in this way.
+
+@vindex confirm-nonexistent-file-or-buffer
+  The variable @code{confirm-nonexistent-file-or-buffer} controls
+whether Emacs asks for confirmation before visiting a new file.  The
+default value, @code{after-completion}, gives the behavior we have
+just described.  If the value is @code{nil}, Emacs never asks for
+confirmation; for any other non-@code{nil} value, Emacs always asks
+for confirmation.  This variable also affects the
+@code{switch-to-buffer} command (@pxref{Select Buffer}).
 
-  Emacs recognizes from the contents of a file which end-of-line
-convention it uses to separate lines---newline (used on GNU/Linux and
-on Unix), carriage-return linefeed (used on Microsoft systems), or
-just carriage-return (used on the Macintosh)---and automatically
-converts the contents to the normal Emacs convention, which is that
-the newline character separates lines.  This is a part of the general
-feature of coding system conversion (@pxref{Coding Systems}), and
-makes it possible to edit files imported from different operating
-systems with equal convenience.  If you change the text and save the
-file, Emacs performs the inverse conversion, changing newlines back
-into carriage-return linefeed or just carriage-return if appropriate.
+@kindex C-x C-v
+@findex find-alternate-file
+  If you visit a nonexistent file unintentionally (because you typed
+the wrong file name), type @kbd{C-x C-v} (@code{find-alternate-file})
+to visit the file you really wanted.  @kbd{C-x C-v} is similar to
+@kbd{C-x C-f}, but it kills the current buffer (after first offering
+to save it if it is modified).  When @kbd{C-x C-v} reads the file name
+to visit, it inserts the entire default file name in the buffer, with
+point just after the directory part; this is convenient if you made a
+slight error in typing the name.
 
 @vindex find-file-run-dired
-  If the file you specify is actually a directory, @kbd{C-x C-f} invokes
-Dired, the Emacs directory browser, so that you can ``edit'' the contents
-of the directory (@pxref{Dired}).  Dired is a convenient way to view, delete,
-or operate on the files in the directory.  However, if the variable
-@code{find-file-run-dired} is @code{nil}, then it is an error to try
-to visit a directory.
+  If you ``visit'' a file that is actually a directory, Emacs invokes
+Dired, the Emacs directory browser; this lets you ``edit'' the
+contents of the directory.  @xref{Dired}.  You can disable this
+behavior by setting the variable @code{find-file-run-dired} to
+@code{nil}; in that case, it is an error to try to visit a directory.
 
   Files which are actually collections of other files, or @dfn{file
 archives}, are visited in special modes which invoke a Dired-like
 environment to allow operations on archive members.  @xref{File
 Archives}, for more about these features.
 
-@cindex wildcard characters in file names
-@vindex find-file-wildcards
-  If the file name you specify contains shell-style wildcard
-characters, Emacs visits all the files that match it.  (On
-case-insensitive filesystems, Emacs matches the wildcards disregarding
-the letter case.)  Wildcards include @samp{?}, @samp{*}, and
-@samp{[@dots{}]} sequences.  To enter the wild card @samp{?} in a file
-name in the minibuffer, you need to type @kbd{C-q ?}.  @xref{Quoted
-File Names}, for information on how to visit a file whose name
-actually contains wildcard characters.  You can disable the wildcard
-feature by customizing @code{find-file-wildcards}.
-
   If you visit a file that the operating system won't let you modify,
 or that is marked read-only, Emacs makes the buffer read-only too, so
 that you won't go ahead and make changes that you'll have trouble
@@ -311,17 +299,6 @@ saving afterward.  You can make the buffer writable with @kbd{C-x C-q}
 yourself from entering changes accidentally, visit it with the command
 @kbd{C-x C-r} (@code{find-file-read-only}) instead of @kbd{C-x C-f}.
 
-@kindex C-x C-v
-@findex find-alternate-file
-  If you visit a nonexistent file unintentionally (because you typed the
-wrong file name), use the @kbd{C-x C-v} command
-(@code{find-alternate-file}) to visit the file you really wanted.
-@kbd{C-x C-v} is similar to @kbd{C-x C-f}, but it kills the current
-buffer (after first offering to save it if it is modified).  When
-@kbd{C-x C-v} reads the file name to visit, it inserts the entire
-default file name in the buffer, with point just after the directory
-part; this is convenient if you made a slight error in typing the name.
-
 @kindex C-x 4 f
 @findex find-file-other-window
   @kbd{C-x 4 f} (@code{find-file-other-window}) is like @kbd{C-x C-f}
@@ -339,15 +316,28 @@ new frame, or makes visible any existing frame showing the file you
 seek.  This feature is available only when you are using a window
 system.  @xref{Frames}.
 
+  Emacs recognizes from the contents of a file which end-of-line
+convention it uses to separate lines---newline (used on GNU/Linux and
+on Unix), carriage-return linefeed (used on Microsoft systems), or
+just carriage-return (used on the Macintosh)---and automatically
+converts the contents to the normal Emacs convention, which is that
+the newline character separates lines.  This is a part of the general
+feature of coding system conversion (@pxref{Coding Systems}), and
+makes it possible to edit files imported from different operating
+systems with equal convenience.  If you change the text and save the
+file, Emacs performs the inverse conversion, changing newlines back
+into carriage-return linefeed or just carriage-return if appropriate.
+
 @findex find-file-literally
-  If you wish to edit a file as a sequence of @acronym{ASCII} characters with no special
-encoding or conversion, use the @kbd{M-x find-file-literally} command.
-It visits a file, like @kbd{C-x C-f}, but does not do format conversion
-(@pxref{Formatted Text}), character code conversion (@pxref{Coding
-Systems}), or automatic uncompression (@pxref{Compressed Files}), and
-does not add a final newline because of @code{require-final-newline}.
-If you already have visited the same file in the usual (non-literal)
-manner, this command asks you whether to visit it literally instead.
+  If you wish to edit a file as a sequence of @acronym{ASCII}
+characters with no special encoding or conversion, use the @kbd{M-x
+find-file-literally} command.  This visits a file, like @kbd{C-x C-f},
+but does not do format conversion (@pxref{Formatted Text}), character
+code conversion (@pxref{Coding Systems}), or automatic uncompression
+(@pxref{Compressed Files}), and does not add a final newline because
+of @code{require-final-newline} (@pxref{Customize Save}).  If you have
+already visited the same file in the usual (non-literal) manner, this
+command asks you whether to visit it literally instead.
 
 @vindex find-file-hook
 @vindex find-file-not-found-functions
@@ -423,6 +413,9 @@ like this in the echo area:
 (No changes need to be saved)
 @end example
 
+With a prefix argument, @kbd{C-u C-x C-s}, Emacs also marks the buffer
+to be backed up when the next save is done.  @xref{Backup}.
+
 @kindex C-x s
 @findex save-some-buffers
   The command @kbd{C-x s} (@code{save-some-buffers}) offers to save any
@@ -458,21 +451,19 @@ Display a help message about these options.
 
 @kindex M-~
 @findex not-modified
-  If you have changed a buffer but you do not want to save the changes,
-you should take some action to prevent it.  Otherwise, each time you use
-@kbd{C-x s} or @kbd{C-x C-c}, you are liable to save this buffer by
-mistake.  One thing you can do is type @kbd{M-~} (@code{not-modified}),
-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.  (@samp{~} is often used as a mathematical symbol for `not'; thus
-@kbd{M-~} is `not', metafied.)  You could also use
-@code{set-visited-file-name} (see below) to mark the buffer as visiting
-a different file name, one which is not in use for anything important.
+  If you have changed a buffer but do not wish to save the changes,
+you should take some action to prevent it.  Otherwise, each time you
+use @kbd{C-x s} or @kbd{C-x C-c}, you are liable to save this buffer
+by mistake.  One thing you can do is type @kbd{M-~}
+(@code{not-modified}), 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.  (@samp{~} is often used as a
+mathematical symbol for `not'; thus @kbd{M-~} is `not', metafied.)
 Alternatively, you can cancel all the changes made since the file was
 visited or saved, by reading the text from the file again.  This is
-called @dfn{reverting}.  @xref{Reverting}.  (You could also undo all the
-changes by repeating the undo command @kbd{C-x u} until you have undone
-all the changes; but reverting is easier.)  You can also kill the buffer.
+called @dfn{reverting}.  @xref{Reverting}.  (You could also undo all
+the changes by repeating the undo command @kbd{C-x u} until you have
+undone all the changes; but reverting is easier.)
 
 @findex set-visited-file-name
   @kbd{M-x set-visited-file-name} alters the name of the file that the
@@ -486,15 +477,15 @@ buffer as ``modified'' so that @kbd{C-x C-s} in that buffer
 
 @kindex C-x C-w
 @findex write-file
-  If you wish to mark the buffer as visiting a different file and save it
-right away, use @kbd{C-x C-w} (@code{write-file}).  It is
-equivalent to @code{set-visited-file-name} followed by @kbd{C-x C-s}
-(except that @kbd{C-x C-w} asks for confirmation if the file exists).
+  If you wish to mark the buffer as visiting a different file and save
+it right away, use @kbd{C-x C-w} (@code{write-file}).  This is
+equivalent to @code{set-visited-file-name} followed by @kbd{C-x C-s},
+except that @kbd{C-x C-w} asks for confirmation if the file exists.
 @kbd{C-x C-s} used on a buffer that is not visiting a file has the
 same effect as @kbd{C-x C-w}; 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 (@pxref{File Names}).
+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 (@pxref{File Names}).
 
   If the new file name implies a major mode, then @kbd{C-x C-w} switches
 to that major mode, in most cases.  The command
@@ -518,6 +509,11 @@ throws away the old contents of the file---or it would, except that
 Emacs carefully copies the old contents to another file, called the
 @dfn{backup} file, before actually saving.
 
+  Emacs makes a backup for a file only the first time the file is
+saved from a buffer.  No matter how many times you subsequently save
+the file, its backup remains unchanged.  However, if you kill the
+buffer and then visit the file again, a new backup file will be made.
+
   For most files, the variable @code{make-backup-files} determines
 whether to make backup files.  On most operating systems, its default
 value is @code{t}, so that Emacs does write backup files.
@@ -534,9 +530,9 @@ control system.
 @xref{General VC Options}.
 @end ifnottex
 
-
   At your option, Emacs can keep either a single backup for each file,
 or make a series of numbered backup files for each file that you edit.
+@xref{Backup Names}.
 
 @vindex backup-enable-predicate
 @vindex temporary-file-directory
@@ -546,43 +542,50 @@ prevents backup files being written for files in the directories used
 for temporary files, specified by @code{temporary-file-directory} or
 @code{small-temporary-file-directory}.
 
-  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.
-
-  You can also explicitly request making another backup file from a
-buffer even though it has already been saved at least once.  If you save
+  You can explicitly tell Emacs to make another backup file from a
+buffer, even though that buffer has been saved before.  If you save
 the buffer with @kbd{C-u C-x C-s}, the version thus saved will be made
-into a backup file if you save the buffer again.  @kbd{C-u C-u C-x C-s}
-saves the buffer, but first makes the previous file contents into a new
-backup file.  @kbd{C-u C-u C-u C-x C-s} does both things: it makes a
-backup from the previous contents, and arranges to make another from the
-newly saved contents if you save again.
+into a backup file if you save the buffer again.  @kbd{C-u C-u C-x
+C-s} saves the buffer, but first makes the previous file contents into
+a new backup file.  @kbd{C-u C-u C-u C-x C-s} does both things: it
+makes a backup from the previous contents, and arranges to make
+another from the newly saved contents if you save again.
 
 @menu
-* One or Many: Numbered Backups. Whether to make one backup file or many.
 * Names: Backup Names.         How backup files are named.
 * Deletion: Backup Deletion.   Emacs deletes excess numbered backups.
 * Copying: Backup Copying.     Backups can be made by copying or renaming.
 @end menu
 
-@node Numbered Backups
-@subsubsection Numbered Backups
+@node Backup Names
+@subsubsection Single or Numbered Backups
+
+  When Emacs makes a backup file, its name is normally constructed by
+appending @samp{~} to the file name being edited; thus, the backup
+file for @file{eval.c} would be @file{eval.c~}.
+
+  If access control stops Emacs from writing backup files under the usual
+names, it writes the backup file as @file{%backup%~} in your home
+directory.  Only one such file can exist, so only the most recently
+made such backup is available.
+
+  Emacs can also make @dfn{numbered backup files}.  Numbered backup
+file names contain @samp{.~}, the number, and another @samp{~} after
+the original file name.  Thus, the backup files of @file{eval.c} would
+be called @file{eval.c.~1~}, @file{eval.c.~2~}, and so on, all the way
+through names like @file{eval.c.~259~} and beyond.
 
 @vindex version-control
-  The choice of single backup file or multiple numbered backup files
-is controlled by the variable @code{version-control}.  Its possible
+  The variable @code{version-control} determines whether to make
+single backup files or multiple numbered backup files.  Its possible
 values are:
 
 @table @code
-@item t
-Make numbered backups.
 @item nil
 Make numbered backups for files that have numbered backups already.
-Otherwise, make single backups.
+Otherwise, make single backups.  This is the default.
+@item t
+Make numbered backups.
 @item never
 Never make numbered backups; always make single backups.
 @end table
@@ -591,9 +594,10 @@ Never make numbered backups; always make single backups.
 The usual way to set this variable is globally, through your
 @file{.emacs} file or the customization buffer.  However, you can set
 @code{version-control} locally in an individual buffer to control the
-making of backups for that buffer's file.  For example, Rmail mode
-locally sets @code{version-control} to @code{never} to make sure that
-there is only one backup for an Rmail file.  @xref{Locals}.
+making of backups for that buffer's file (@pxref{Locals}).  You can
+have Emacs set @code{version-control} locally whenever you visit a
+given file (@pxref{File Variables}).  Some modes, such as Rmail mode,
+set this variable.
 
 @cindex @env{VERSION_CONTROL} environment variable
   If you set the environment variable @env{VERSION_CONTROL}, to tell
@@ -605,41 +609,23 @@ value is @samp{nil} or @samp{existing}, then @code{version-control}
 becomes @code{nil}; if it is @samp{never} or @samp{simple}, then
 @code{version-control} becomes @code{never}.
 
-@node Backup Names
-@subsubsection Single or Numbered Backups
-
-  When Emacs makes a single backup file, its name is normally
-constructed by appending @samp{~} to the file name being edited; thus,
-the backup file for @file{eval.c} would be @file{eval.c~}.
-
-@vindex make-backup-file-name-function
 @vindex backup-directory-alist
-  You can change this behavior by defining the variable
-@code{make-backup-file-name-function} to a suitable function.
-Alternatively you can customize the variable
-@code{backup-directory-alist} to specify that files matching certain
-patterns should be backed up in specific directories.
-
-  A typical use is to add an element @code{("." . @var{dir})} to make
-all backups in the directory with absolute name @var{dir}; Emacs
-modifies the backup file names to avoid clashes between files with the
-same names originating in different directories.  Alternatively,
-adding, say, @code{("." . ".~")} would make backups in the invisible
-subdirectory @file{.~} of the original file's directory.  Emacs
-creates the directory, if necessary, to make the backup.
+  You can customize the variable @code{backup-directory-alist} to
+specify that files matching certain patterns should be backed up in
+specific directories.  This variable applies to both single and
+numbered backups.  A typical use is to add an element @code{("."
+. @var{dir})} to make all backups in the directory with absolute name
+@var{dir}; Emacs modifies the backup file names to avoid clashes
+between files with the same names originating in different
+directories.  Alternatively, adding, @code{("." . ".~")} would make
+backups in the invisible subdirectory @file{.~} of the original file's
+directory.  Emacs creates the directory, if necessary, to make the
+backup.
 
-  If access control stops Emacs from writing backup files under the usual
-names, it writes the backup file as @file{%backup%~} in your home
-directory.  Only one such file can exist, so only the most recently
-made such backup is available.
-
-  If you choose to have a series of numbered backup files, backup file
-names contain @samp{.~}, the number, and another @samp{~} after the
-original file name.  Thus, the backup files of @file{eval.c} would be
-called @file{eval.c.~1~}, @file{eval.c.~2~}, and so on, all the way
-through names like @file{eval.c.~259~} and beyond.  The variable
-@code{backup-directory-alist} applies to numbered backups just as
-usual.
+@vindex make-backup-file-name-function
+  If you define the variable @code{make-backup-file-name-function} to
+a suitable Lisp function, that overrides the usual way Emacs
+constructs backup file names.
 
 @node Backup Deletion
 @subsubsection Automatic Deletion of Backups
@@ -777,10 +763,10 @@ file.
 @cindex locking files
   When you make the first modification in an Emacs buffer that is
 visiting a file, Emacs records that the file is @dfn{locked} by you.
-(It does this by creating a symbolic link in the same directory with a
-different name.)  Emacs removes the lock when you save the changes.  The
-idea is that the file is locked whenever an Emacs buffer visiting it has
-unsaved changes.
+(It does this by creating a specially-named symbolic link in the same
+directory.)  Emacs removes the lock when you save the changes.  The
+idea is that the file is locked whenever an Emacs buffer visiting it
+has unsaved changes.
 
 @cindex collision
   If you begin to modify the buffer while the visited file is locked by
@@ -812,23 +798,22 @@ editing of new files that will not really exist until they are saved.
 there are cases where lock files cannot be written.  In these cases,
 Emacs cannot detect trouble in advance, but it still can detect the
 collision when you try to save a file and overwrite someone else's
-changes.
+changes.  Every time Emacs saves a buffer, it first checks the
+last-modification date of the existing file on disk to verify 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 displays 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
+@kbd{yes} and proceed.  Otherwise, you should cancel the save with
+@kbd{C-g} and investigate the situation.
 
   If Emacs or the operating system crashes, this may leave behind lock
 files which are stale, so you may occasionally get warnings about
 spurious collisions.  When you determine that the collision is spurious,
 just use @kbd{p} to tell Emacs to go ahead anyway.
 
-  Every time Emacs saves a buffer, it first checks the last-modification
-date of the existing file on disk to verify 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
-displays 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 @kbd{yes} and proceed.  Otherwise, you should
-cancel the save with @kbd{C-g} 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 @kbd{C-u C-x C-d}
 (@pxref{Directories}).  This shows the file's current author.  You
@@ -932,23 +917,20 @@ the file was edited only slightly, you will be at approximately the
 same piece of text after reverting as before.  However, if you have made
 drastic changes, point may wind up in a totally different piece of text.
 
-  Reverting marks the buffer as ``not modified'' until another change is
-made.
+  Reverting marks the buffer as ``not modified''.
 
-  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 explicitly with @kbd{C-x b} cannot be reverted; @code{revert-buffer}
-reports an error when asked to do so.
+  Some kinds of buffers that are not associated with files, such as
+Dired buffers, can also be reverted.  For them, reverting means
+recalculating their contents.  Buffers created explicitly with
+@kbd{C-x b} cannot be reverted; @code{revert-buffer} reports an error
+if you try.
 
 @vindex revert-without-query
   When you edit a file that changes automatically and frequently---for
-example, a log of output from a process that continues to run---it may be
-useful for Emacs to revert the file without querying you, whenever you
-visit the file again with @kbd{C-x C-f}.
-
-  To request this behavior, set the variable @code{revert-without-query}
-to a list of regular expressions.  When a file name matches one of these
+example, a log of output from a process that continues to run---it may
+be useful for Emacs to revert the file without querying you.  To
+request this behavior, set the variable @code{revert-without-query} to
+a list of regular expressions.  When a file name matches one of these
 regular expressions, @code{find-file} and @code{revert-buffer} will
 revert it automatically if it has changed---provided the buffer itself
 is not modified.  (If you have edited the text, it would be wrong to
@@ -961,17 +943,18 @@ discard your changes.)
 @findex global-auto-revert-mode
 @findex auto-revert-mode
 @findex auto-revert-tail-mode
+@vindex auto-revert-interval
 
-  You may find it useful to have Emacs revert files automatically when
-they change.  Three minor modes are available to do this.
-
-  @kbd{M-x global-auto-revert-mode} enables Global Auto-Revert mode,
-which periodically checks all file buffers and reverts when the
-corresponding file has changed.  @kbd{M-x auto-revert-mode} enables a
-local version, Auto-Revert mode, which applies only to the current
-buffer.
+  In addition, you can tell Emacs to periodically revert a buffer by
+typing @kbd{M-x auto-revert-mode}.  This turns on Auto-Revert mode, a
+minor mode that makes Emacs automatically revert the current buffer
+every five seconds.  You can change this interval through the variable
+@code{auto-revert-interval}.  Typing @kbd{M-x global-auto-revert-mode}
+enables Global Auto-Revert mode, which does the same for all file
+buffers.  Auto-Revert mode and Global Auto-Revert modes do not check
+or revert remote files, because that is usually too slow.
 
-  You can use Auto-Revert mode to ``tail'' a file such as a system
+  One use of Auto-Revert mode is to ``tail'' a file such as a system
 log, so that changes made to that file by other programs are
 continuously displayed.  To do this, just move the point to the end of
 the buffer, and it will stay there as the file contents change.
@@ -979,11 +962,6 @@ However, if you are sure that the file will only change by growing at
 the end, use Auto-Revert Tail mode instead
 (@code{auto-revert-tail-mode}).  It is more efficient for this.
 
-@vindex auto-revert-interval
-  The variable @code{auto-revert-interval} controls how often to check
-for a changed file.  Since checking a remote file is too slow, these
-modes do not check or revert remote files.
-
   @xref{VC Mode Line}, for Auto Revert peculiarities in buffers that
 visit files under version control.
 
@@ -997,11 +975,10 @@ visit files under version control.
 @cindex mode, Auto Save
 @cindex crashes
 
-  Emacs saves all the visited files from time to time (based on
-counting your keystrokes) without being asked, in separate files so as
-not to alter the files you actually use.  This is called
-@dfn{auto-saving}.  It prevents you from losing more than a limited
-amount of work if the system crashes.
+  From time to time, Emacs automatically saves each visited file in a
+separate file, without altering the file you actually use.  This is
+called @dfn{auto-saving}.  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, it considers
 each buffer, and each is auto-saved if auto-saving is enabled for it
@@ -1021,12 +998,11 @@ execution of commands you have been typing.
 @node Auto Save Files
 @subsection 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 @dfn{auto-save file}, and the
-visited file is changed only when you request saving explicitly (such as
-with @kbd{C-x C-s}).
+  Auto-saving does not normally save in the files that you visited,
+because it can be very undesirable to save a change that you did not
+want to make permanent.  Instead, auto-saving is done in a different
+file called the @dfn{auto-save file}, and the visited file is changed
+only when you request saving explicitly (such as with @kbd{C-x C-s}).
 
   Normally, the auto-save file name is made by appending @samp{#} to the
 front and rear of the visited file name.  Thus, a buffer visiting file
@@ -1156,9 +1132,9 @@ this---saving them---updates the files themselves.
 @vindex auto-save-list-file-prefix
   Emacs records information about interrupted sessions for later
 recovery in files named
-@file{~/.emacs.d/auto-save-list/.saves-@var{pid}-@var{hostname}}.  All
-of this name except the @file{@var{pid}-@var{hostname}} part comes
-from the value of @code{auto-save-list-file-prefix}.  You can record
+@file{~/.emacs.d/auto-save-list/.saves-@var{pid}-@var{hostname}}.  The
+directory used, @file{~/.emacs.d/auto-save-list/}, is determined by
+the variable @code{auto-save-list-file-prefix}.  You can record
 sessions in a different place by customizing that variable.  If you
 set @code{auto-save-list-file-prefix} to @code{nil} in your
 @file{.emacs} file, sessions are not recorded for recovery.
@@ -1201,1186 +1177,6 @@ then the file name recorded for a buffer is the file's @dfn{truename}
 than the name you specify.  Setting @code{find-file-visit-truename} also
 implies the effect of @code{find-file-existing-other-name}.
 
-@node Version Control
-@section Version Control
-@cindex version control
-
-  @dfn{Version control systems} 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 Emacs version control interface is called VC.  Its commands work
-with different version control systems---currently, it supports CVS,
-GNU Arch, RCS, Subversion, and SCCS.  Of these, the GNU
-project distributes CVS, GNU Arch, and RCS.  We also have free
-software to replace SCCS, known as CSSC; if you are using SCCS and
-don't want to make the incompatible change to RCS or CVS, you can
-switch to CSSC.
-
-  VC is enabled by default in Emacs.  To disable it, set the
-customizable variable @code{vc-handled-backends} to @code{nil}
-@iftex
-(@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}).
-@end iftex
-@ifnottex
-(@pxref{Customizing VC}).
-@end ifnottex
-
-
-@menu
-* Introduction to VC::  How version control works in general.
-* VC Mode Line::        How the mode line shows version control status.
-* Basic VC Editing::    How to edit a file under version control.
-* Old Revisions::       Examining and comparing old versions.
-* Secondary VC Commands::    The commands used a little less frequently.
-* Branches::            Multiple lines of development.
-@ifnottex
-* Remote Repositories:: Efficient access to remote CVS servers.
-* Revision Tags::       Symbolic names for revisions
-* Miscellaneous VC::    Various other commands and features of VC.
-* Customizing VC::      Variables that change VC's behavior.
-@end ifnottex
-@end menu
-
-@node Introduction to VC
-@subsection Introduction to Version Control
-
-  VC allows you to use a version control system from within Emacs,
-integrating the version control operations smoothly with editing.
-Though VC cannot completely bridge the gaps between version-control
-systems with widely differing capabilities, it does provide
-a uniform interface to many version control operations. Regardless of
-which version control system is in use, you will be able to do basic
-operations in much the same way.
-
-  This section provides a general overview of version control, and
-describes the version control systems that VC supports.  You can skip
-this section if you are already familiar with the version control system
-you want to use.
-
-@menu
-* Why Version Control?::    Understanding the problems it addresses
-* Version Control Systems:: Supported version control back-end systems.
-* VCS Concepts::            Words and concepts related to version control.
-* Types of Log File::       The VCS log in contrast to the ChangeLog.
-@end menu
-
-@node Why Version Control?
-@subsubsection Understanding the problems it addresses
-
-  Version control systems provide you with three important capabilities: 
-@dfn{reversibility}, @dfn{concurrency}, and @dfn{history}.
-
-  The most basic capability you get from a version-control system is
-reversibility, the ability to back up to a saved, known-good state when
-you discover that some modification you did was a mistake or a bad idea.
-
-  Version-control systems also support concurrency, the ability to
-have many people modifying the same collection of code or documents
-knowing that conflicting modifications can be detected and resolved.
-
-  Version-control systems give you the capability to attach a history
-to your data, explanatory comments about the intention behind each 
-change to it.  Even for a programmer working solo change histories
-are an important aid to memory; for a multi-person project they 
-become a vitally important form of communication among developers.
-
-@node Version Control Systems
-@subsubsection Supported Version Control Systems
-
-@cindex back end (version control)
-  VC currently works with many different version control systems or
-``back ends'': SCCS, RCS, CVS, Subversion, GNU Arch,
-git, and Mercurial.
-@comment Omitting bzr because support is very scratchy and incomplete.
-
-@cindex SCCS
-  SCCS was the first version-control system ever built, and was long ago
-superseded by later and more advanced ones; Emacs supports it only for
-backward compatibility and historical reasons.  VC compensates for
-certain features missing in SCCS (tag names for releases, for example) by
-implementing them itself. Some other VC features, such as multiple
-branches, are not available with SCCS.  Since SCCS is non-free you
-should not use it; use its free replacement CSSC instead.  But you
-should use CSSC only if for some reason you cannot use a more 
-recent and better-designed version-control system.
-
-@cindex RCS
-  RCS is the free version control system around which VC was initially
-built.  Almost everything you can do with RCS can be done through VC.  You
-cannot use RCS over the network, though, and it only works at the level
-of individual files, rather than projects.  You should use it if you
-want a simple, yet reliable tool for handling individual files.
-
-@cindex CVS
-  CVS is the free version control system that was until recently (as of
-2007) used for the majority of free software projects, though it is now
-being superseded by other systems.  It allows concurrent
-multi-user development either locally or over the network.  Some of its
-shortcomings, corrected by newer systems such as Subversion or GNU Arch,
-are that it lacks atomic commits or support for renaming files.  VC
-supports all basic editing operations under CVS, but for some less
-common tasks you still need to call CVS from the command line.  Note
-also that before using CVS you must set up a repository, which is a
-subject too complex to treat here.
-
-@cindex SVN
-@cindex Subversion
-  Subversion is a free version control system designed to be similar
-to CVS but without CVS's problems, and is now (2007) rapidly
-superseding CVS.  Subversion supports atomic commits of filesets, and
-versions directories, symbolic links, meta-data, renames, copies, and
-deletes.  It can be used via http or via its own protocol.
-
-@cindex GNU Arch
-@cindex Arch
-  GNU Arch is a new version control system that is designed for
-distributed work.  It differs in many ways from old well-known
-systems, such as CVS and RCS.  It supports different transports for
-interoperating between users, offline operations, and it has good
-branching and merging features.  It also supports atomic commits of
-filesets, and keeps a history of file renaming and moving.  VC
-does not support all operations provided by GNU Arch, so you must
-sometimes invoke it from the command line, or use a specialized
-module.
-
-@cindex git
-  git is a version-control system invented by Linus Torvalds to
-support Linux kernel development.  Like GNU Arch, it supports atomic
-commits of filesets, and keeps a history of file renaming and
-moving.  One significant feature of git is that it largely abolishes
-the notion of a single centralized repository; instead, each working
-copy of a git project is its own repository and coordination is done
-through repository-sync operations.  VC fully supports git, except
-that it doesn't do news merges and repository sync operations must
-be done from the command line.
-
-@cindex hg
-@cindex Mercurial
-  Mercurial is a distributed version-control systems broadly
-resembling GNU Arch and git, with atomic fileset commits and
-rename/move histories.  Like git it is fully decentralized.
-VC fully supports Mercurial, except for repository sync operations
-which still need to be done from the command line.
-
-@node VCS Concepts
-@subsubsection Concepts of Version Control
-
-@cindex repository
-@cindex registered file
-   When a file is under version control, we also say that it is
-@dfn{registered} in the version control system.  The system has a
-@dfn{repository} which stores both the file's present state plus its
-change history---enough to reconstruct the current version or any
-earlier version.  The repository will also contain a @dfn{log entry} for
-each change to the file, describing in words what was modified in that 
-revision.
-
-@cindex work file
-@cindex checking out files
-  A file checked out of a version-control repository is sometimes
-called the @dfn{work file}.  You edit the work file and make changes
-in it, as you would with an ordinary file.  After you are done with a
-set of changes, you @dfn{check in} or @dfn{commit} the file, which
-records the changes in the repository, along with a log entry for
-them.
-
-@cindex revision
-@cindex revision ID
-  A copy of a file stored in a repository is called a @dfn{revision}.
-The history of a file is a sequence of revisions.  Each revisions is
-named by a @dfn{revision ID}.  In older VCSes (such as SCCS and RCS),
-the simplest kind of revision ID consisted of a @dfn{dot-pair};
-integers (the @dfn{major} and @dfn{minor} revisions) separated by a
-dot.  Newer VCSes tend to use @dfn{monotonic} revision IDs that are
-simple integers counting from 1.
-
-  To go beyond these basic concepts, you will need to understand three
-ways in which version-control systems can differ from each other.  They
-can be locking or merging; they can be file-based or changeset-based;
-and they can be centralized or decentralized.  VC handles all these
-choices, but they lead to differing behaviors which you will need
-to understand as you use it.
-
-@cindex locking versus merging
-  A version control system typically has some mechanism to coordinate
-between users who want to change the same file.  One method is
-@dfn{locking} (analogous to the locking that Emacs uses to detect
-simultaneous editing of a file, but distinct from it).  In a locking
-system, such as SCCS, you must @dfn{lock} a file before you start to
-edit it.  The other method is @dfn{merging}; the system tries to 
-merge your changes with other people's changes when you check them in.
-
-  With version control locking, work files are normally read-only so
-that you cannot change them.  You ask the version control system to make
-a work file writable for you by locking it; only one user can do
-this at any given time.  When you check in your changes, that unlocks
-the file, making the work file read-only again.  This allows other users
-to lock the file to make further changes.
-
-  By contrast, a merging system lets each user check out and modify a
-work file at any time.  When you check in a file, the system will
-attempt to merge your changes with any others checked into the
-repository since you checked out the file.
-
-  Both locking and merging systems can have problems when multiple users
-try to modify the same file at the same time.  Locking systems have
-@dfn{lock conflicts}; a user may try to check a file out and be unable
-to because it is locked.  In merging systems, @dfn{merge conflicts}
-happen when you check in a change to a file that conflicts with a change
-checked in by someone else after your checkout.  Both kinds of conflict
-have to be resolved by human judgment and communication.
-
-  SCCS always uses locking.  RCS is lock-based by default but can be
-told to operate in a merging style.  CVS and Subversion are
-merge-based by default but can be told to operate in a locking mode.
-Most later version-control systems, such as GNU Arch, git, and
-Mercurial, have been based exclusively on merging rather than locking.
-This is because experience has shown that the merging-based approach
-is generally superior to the locking one, both in convenience to
-developers and in minimizing the number and severity of conflicts that
-actually occur.
-
-   While it is rather unlikely that anyone will ever again build a
-fundamentally locking-based rather than merging-based version-control
-system in the future, merging-based version-systems sometimes have locks
-retrofitted onto them for reasons having nothing to do with technology.
-@footnote{Usually the control-freak instincts of managers.}  For this
-reason, and to support older systems still in use, VC mode supports
-both locking and merging version control and tries to hide the differences
-between them as much as possible.
-
-@cindex files versus changesets.
-  On SCCS, RCS, CVS, and other early version-control systems, checkins
-and other operations are @dfn{file-based}; each file has its own
-@dfn{master file} with its own comment and revision history separate
-from that of all other files in the system.  Later systems, beginning
-with Subversion, are @dfn{changeset-based}; a checkin under these
-may include changes to several files and that change set is treated as
-a unit by the system.  Any comment associated with the change belongs
-to no single file, but is attached to the changeset itself.
-
-  Changeset-based version control is in general both more flexible and
-more powerful than file-based version control; usually, when a change to
-multiple files has to be backed out, it's good to be able to easily
-identify and remove all of it.  But it took some years for designers to
-figure that out, and while file-based systems are passing out of use
-there are lots of legacy repositories still to be dealt with at time of
-writing in 2007.
-
-  In fact, older versions of VC mode supported only file-based systems,
-leading to some unhappy results when it was used to drive
-changeset-based ones---the Subversion support, for example, used to break
-up changesets into multiple per-file commits.  This has been fixed, but
-it has left a legacy in VC-mode's terminology.  The terms ``checkin'' 
-and ``checkout'' are associated with file-based and locking-based
-systems and a bit archaic; nowadays those operations are usually called
-``commit'' and ``update''.
-
-@cindex centralized vs. decentralized
-  Early version-control systems were designed around a @dfn{centralized}
-model in which each project has only one repository used by all
-developers.  SCCS, RCS, CVS, and Subversion share this kind of model.
-It has two important problems.  One is that a single repository is a
-single point of failure---if the repository server is down all work
-stops.  The other is that you need to be connected live to the server to
-do checkins and checkouts; if you're offline, you can't work.
-
-  Newer version-control systems like GNU Arch, git, Mercurial, and Bzr
-are @dfn{decentralized}.  A project may have several different
-repositories, and these systems support a sort of super-merge between
-repositories that tries to reconcile their change histories.  At the
-limit, each developer has his/her own repository, and repository
-merges replace checkin/commit operations.
-
-  VC's job is to help you manage the traffic between your personal
-workfiles and a repository.  Whether that repository is a single master
-or one of a network of peer repositories is not something VC has to care
-about.  Thus, the difference between a centralized and a decentralized
-version-control system is invisible to VC mode.
-
-@iftex
-(@pxref{CVS Options,,,emacs-xtra, Specialized Emacs Features}).
-@end iftex
-@ifnottex
-(@pxref{CVS Options}).
-@end ifnottex
-
-
-@node Types of Log File
-@subsubsection Types of Log File
-@cindex types of log file
-@cindex log File, types of
-@cindex version control log
-
-  Projects that use a revision control system can have @emph{two}
-types of log for changes.  One is the log maintained by the
-revision control system: each time you check in a change, you must
-fill out a @dfn{log entry} for the change (@pxref{Log Buffer}).  This
-kind of log is called the @dfn{version control log}, also the
-@dfn{revision control log}, @dfn{RCS log}, or @dfn{CVS log}.
-
-  The other kind of log is the file @file{ChangeLog} (@pxref{Change
-Log}).  It provides a chronological record of all changes to a large
-portion of a program---typically one directory and its subdirectories.
-A small program would use one @file{ChangeLog} file; a large program
-may well merit a @file{ChangeLog} file in each major directory.
-@xref{Change Log}.
-
-  Actually, the fact that both kinds of log exist is partly a legacy from
-file-based version control.  Changelogs are a GNU convention, later 
-more widely adopted, that help developers to get a changeset-based
-view of a project even when its version-control system has that
-information split up in multiple file-based logs.  
-
-  Changeset-based version systems, on the other hand, often maintain
-a changeset-based modification log for the entire system that makes
-ChangeLogs mostly redundant.  The only advantage ChangeLogs retain is that
-it may be useful to be able to view the transaction history of a
-single directory separately from those of other directories.
-
-  A project maintained with version control can use just the
-version-control log, or it can use both kinds of logs.  It can
-handle some files one way and some files the other way.  Each project
-has its policy, which you should follow.
-
-  When the policy is to use both, you typically want to write an entry
-for each change just once, then put it into both logs.  You can write
-the entry in @file{ChangeLog}, then copy it to the log buffer when you
-check in the change.  Or you can write the entry in the log buffer
-while checking in the change, and later use the @kbd{C-x v a} command
-to copy it to @file{ChangeLog}
-@iftex
-(@pxref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features}).
-@end iftex
-@ifnottex
-(@pxref{Change Logs and VC}).
-@end ifnottex
-
-@node VC Mode Line
-@subsection Version Control and the Mode Line
-
-  When you visit a file that is under version control, Emacs indicates
-this on the mode line.  For example, @samp{RCS-1.3} says that RCS is
-used for that file, and the current version is 1.3.
-
-  The character between the back-end name and the revision ID
-indicates the version control status of the file.  @samp{-} means that
-the work file is not locked (if locking is in use), or not modified (if
-locking is not in use).  @samp{:} indicates that the file is locked, or
-that it is modified.  If the file is locked by some other user (for
-instance, @samp{jim}), that is displayed as @samp{RCS:jim:1.3}.
-
-@vindex auto-revert-check-vc-info
-  When Auto Revert mode (@pxref{Reverting}) reverts a buffer that is
-under version control, it updates the version control information in
-the mode line.  However, Auto Revert mode may not properly update this
-information if the version control status changes without changes to
-the work file, from outside the current Emacs session.  If you set
-@code{auto-revert-check-vc-info} to @code{t}, Auto Revert mode updates
-the version control status information every
-@code{auto-revert-interval} seconds, even if the work file itself is
-unchanged.  The resulting CPU usage depends on the version control
-system, but is usually not excessive.
-
-@node Basic VC Editing
-@subsection Basic Editing under Version Control
-
-@menu
-* Selecting A Fileset::    Choosing a set of files to operate on 
-* Doing The Right Thing::  Stepping forward in the development cycle
-* VC With A Locking VCS::  RCS in its default mode, SCCS, and optionally CVS.
-* VC With A Merging VCS::  Without locking: default mode for CVS.
-* Advanced C-x v v::       Advanced features available with a prefix argument.
-* Log Buffer::             Features available in log entry buffers.
-@end menu
-
-@node Selecting A Fileset
-@subsubsection Choosing the scope of your command
-
-@cindex filesets
-   Most VC commands operate on @dfn{filesets}.  A fileset is a 
-group of files that you have chosen to treat as a unit at the
-time you perform the command.  Filesets are the way that VC
-mode bridges the gap between file-based and changeset-based 
-version-control systems.
-
-   If you are visiting a version-controlled file in the current buffer,
-the default fileset for any command is simply that one file.  If you
-are visiting a VC directory buffer, and some files in it are marked,
-your fileset is the marked files only.
-
-   All files in a fileset must be under the same version-control system.
-If they are not, VC mode will fail when you attempt to execute 
-a command on the fileset.
-
-   VC filesets are, essentially, a way to pass multiple file
-arguments as a group to underlying version-control commands.  For
-example, on Subversion a checkin with more than one file in its
-fileset will become a joint commit, as though you had typed
-@command{svn commit} with those file arguments at the shell command
-line in the directory of the selected buffer.
-
-   If you are accustomed to earlier versions of VC, the change in behavior
-you will notice is in the directory mode. Other than @kbd{C-x v v}, most
-VC-mode commands once operated on only one file selected by the line
-the cursor is on.  The change in the behavior of @kbd{C-x v v} outside
-VC Directory Mode is more subtle.  Formerly it operated in parallel on all
-marked files, but did not pass them to the version-control backends as
-a group.  Now it does, which enables VC to drive changeset-based
-version-control systems.
-
-   Emacs uses the concept of named filesets elsewhere
-(@pxref{Filesets}) to allow you to view and visit files in functional
-groups.  Unlike those, VC filesets are not named and don't persist
-across sessions.
-
-@node Doing The Right Thing
-@subsubsection Performing the next operation in the development cycle
-
-  The principal VC command is an all-purpose command that performs
-either locking or check-in on your current fileset, depending on 
-the situation.
-
-@table @kbd
-@itemx C-x v v
-Perform the next logical version control operation on this file.
-@end table
-
-@findex vc-next-action
-@kindex C-x v v
-  The precise action of this command depends on the state of the file,
-and whether the version control system uses locking or merging.  SCCS and
-RCS normally use locking; CVS and Subversion normally use
-merging but can be configured to do locking.  Later systems such as 
-GNU Arch and Mercurial always use merging.
-
-@node VC With A Locking VCS
-@subsubsection Basic Version Control with Locking
-
-  If locking is used for the file (as with SCCS, and RCS in its default
-mode), @kbd{C-x v v} can either lock a file or check it in:
-
-@itemize @bullet
-@item
-If the file is not locked, @kbd{C-x v v} locks it, and
-makes it writable so that you can change it.
-
-@item
-If the file is locked by you, and contains changes, @kbd{C-x v v} checks
-in the changes.  In order to do this, it first reads the log entry
-for the new revision.  @xref{Log Buffer}.
-
-@item
-If the file is locked by you, but you have not changed it since you
-locked it, @kbd{C-x v v} releases the lock and makes the file read-only
-again.
-
-@item
-If the file is locked by some other user, @kbd{C-x v v} asks you whether
-you want to ``steal the lock'' from that user.  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 of what has happened.
-@end itemize
-
-  These rules also apply when you use CVS in locking mode, except
-that there is no such thing as stealing a lock.
-
-@node VC With A Merging VCS
-@subsubsection Basic Version Control with Merging
-
-  When your version-control system is merging-based rather than
-locking-based---the default for CVS and Subversion, and the way GNU
-Arch and more modern systems always work---work files are always
-writable; you do not need to do anything before you begin to edit a
-file.  The status indicator on the mode line is @samp{-} if the file
-is unmodified; it flips to @samp{:} as soon as you save any changes in
-the work file.
-
-  Here is what @kbd{C-x v v} does when using a merging-based system
-(such as CVS or Subversion in their default merging mode):
-
-@itemize @bullet
-@item
-If some other user has checked in changes into the repository, Emacs
-asks you whether you want to merge those changes into your own work
-file.  You must do this before you can check in your own changes.  (To
-pick up any recent changes from the repository @emph{without} trying
-to commit your own changes, type @kbd{C-x v m @key{RET}}.)
-@xref{Merging}.
-
-@item
-If there are no new changes in the repository, but you have made
-modifications in your work file, @kbd{C-x v v} checks in your changes.
-In order to do this, it first reads the log entry for the new revision.
-@xref{Log Buffer}.
-
-@item
-If the file is not modified, the @kbd{C-x v v} does nothing.
-@end itemize
-
-  These rules also apply when you use RCS in the mode that does not
-require locking, except that automatic merging of changes from the
-repository is not implemented.  Unfortunately, this means that nothing
-informs you if another user has checked in changes in the same file
-since you began editing it, and when this happens, his changes will be
-effectively removed when you check in your revision (though they will
-remain in the repository, so they will not be entirely lost).  You must
-therefore verify that the current revision is unchanged, before you
-check in your changes.
-
-  In addition, locking is possible with RCS even in this mode, although
-it is not required; @kbd{C-x v v} with an unmodified file locks the
-file, just as it does with RCS in its normal (locking) mode.
-
-  Later systems like CVS, Subversion and Arch will notice conflicting 
-changes in the repository automatically and notify you when they occur.
-
-@node Advanced C-x v v
-@subsubsection Advanced Control in @kbd{C-x v v}
-
-@cindex revision ID to check in/out
-  When you give a prefix argument to @code{vc-next-action} (@kbd{C-u
-C-x v v}), it still performs the next logical version control
-operation, but accepts additional arguments to specify precisely how
-to do the operation.
-
-@itemize @bullet
-@item
-If the file is modified (or locked), you can specify the revision ID
-to use for the new version that you check in.  This is one way
-to create a new branch (@pxref{Branches}).
-
-@item
-If the file is not modified (and unlocked), you can specify the
-revision to select; this lets you start working from an older
-revision, or on another branch.  If you do not enter any revision,
-that takes you to the highest (``head'') revision on the current
-branch; therefore @kbd{C-u C-x v v @key{RET}} is a convenient way to
-get the latest version of a file from the repository.
-
-@item
-@cindex specific version control system
-Instead of the revision ID, you can also specify the name of a
-version control system.  This is useful when one file is being managed
-with two version control systems at the same time
-@iftex
-(@pxref{Local Version Control,,,emacs-xtra, Specialized Emacs
-Features}).
-@end iftex
-@ifnottex
-(@pxref{Local Version Control}).
-@end ifnottex
-
-@end itemize
-
-@node Log Buffer
-@subsubsection Features of the Log Entry Buffer
-
-  When you check in changes, @kbd{C-x v v} first reads a log entry.  It
-pops up a buffer called @samp{*VC-Log*} for you to enter the log entry.
-
-  Sometimes the @samp{*VC-Log*} buffer contains default text when you enter it,
-typically the last log message entered.  If it does, mark and point
-are set around the entire contents of the buffer so that it is easy to
-kill the contents of the buffer with @kbd{C-w}.
-
-@findex log-edit-insert-changelog
-  If you work by first writing entries in the @file{ChangeLog}
-(@pxref{Change Log}) and afterwards committing the change under revision
-control, you can generate the Log Edit text from the ChangeLog using
-@kbd{C-c C-a} (@kbd{log-edit-insert-changelog}).  This looks for
-entries for the file(s) concerned in the top entry in the ChangeLog
-and uses those paragraphs as the log text.  This text is only inserted
-if the top entry was made under your user name on the current date.
-@iftex
-@xref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features},
-@end iftex
-@ifnottex
-@xref{Change Logs and VC},
-@end ifnottex
-for the opposite way of working---generating ChangeLog entries from
-the revision control log.
-
-  In the @samp{*VC-Log*} buffer, @kbd{C-c C-f} (@kbd{M-x
-log-edit-show-files}) shows the list of files to be committed in case
-you need to check that.  (This can be a list of more than one file if
-you use VC Directory Mode or PCL-CVS.)
-@iftex
-@xref{VC Directory Mode,,,emacs-xtra, Specialized Emacs Features},
-@end iftex
-@ifnottex
-@xref{VC Directory Mode},
-@end ifnottex
-and @ref{Top, , About PCL-CVS, pcl-cvs, PCL-CVS --- The Emacs
-Front-End to CVS}.)
-
-  When you have finished editing the log message, type @kbd{C-c C-c} to
-exit the buffer and commit the change.
-
-  To abort check-in, just @strong{don't} type @kbd{C-c C-c} in that
-buffer.  You can switch buffers and do other editing.  As long as you
-don't try to check in another file, the entry you were editing remains
-in the @samp{*VC-Log*} 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.  (This
-is the normal way to do things on a changeset-oriented system, where
-comments are attached to changesets rather than the history of
-individual files.)  The most convenient way to do this is to mark all the
-files in VC Directory Mode and check in from there; the log buffer will
-carry the fileset information with it and do a group commit when you
-confirm it with @kbd{C-c C-c}.
-
-  However, you can also browse the history of previous log entries to
-duplicate a checkin comment. This can be useful when you want several
-files to have checkin comments that vary only slightly from each
-other. The commands @kbd{M-n}, @kbd{M-p}, @kbd{M-s} and @kbd{M-r} for
-doing this work just like the minibuffer history commands (except that
-these versions are used outside the minibuffer).
-
-@vindex vc-log-mode-hook
-  Each time you check in a change, the log entry buffer is put into VC Log
-mode, which involves running two hooks: @code{text-mode-hook} and
-@code{vc-log-mode-hook}.  @xref{Hooks}.
-
-@node Old Revisions
-@subsection Examining And Comparing Old Revisions
-
-  One of the convenient features of version control is the ability
-to examine any revision of a file, or compare two revisions.
-
-@table @kbd
-@item C-x v ~ @var{revision} @key{RET}
-Examine revision @var{revision} of the visited file, in a buffer of its
-own.
-
-@item C-x v =
-Compare the buffer contents associated with the current
-fileset with the working revision(s) from which you started editing.
-
-@item C-u C-x v = @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET}
-Compare the specified two repository revisions of the current fileset.
-
-@item C-x v g
-Display the file with per-line revision information and using colors.
-@end table
-
-@findex vc-revision-other-window
-@kindex C-x v ~
-  To examine an old revision in its entirety, visit the file and then type
-@kbd{C-x v ~ @var{revision} @key{RET}} (@code{vc-revision-other-window}).
-This puts the text of revision @var{revision} in a file named
-@file{@var{filename}.~@var{revision}~}, and visits it in its own buffer
-in a separate window.  (In RCS, you can also select an old revision
-and create a branch from it.  @xref{Branches}.)
-
-@findex vc-diff
-@kindex C-x v =
-@kbd{C-x v =} compares the current buffer contents of each file in the
-current fileset (saving them in the file if necessary) with the
-repository revision from which you started editing each file (this is not
-necessarily the latest revision of the file).  The diff will be displayed
-in a special buffer in another window.
-
-@findex vc-diff
-@kindex C-u C-x v =
-  You can compare two repository revisions of the current fileset with
-the command @kbd{C-u C-x v =} (@code{vc-diff}).  @kbd{C-u C-x v =} reads
-two revision ID or tags. The diff will be displayed in a special
-buffer in another window.
-
-  You can specify a checked-in revision by its ID; an empty input
-specifies the current contents of the work file (which may be different
-from all the checked-in revisions).  You can also specify a tag or branch name
-@iftex
-(@pxref{Tags,,,emacs-xtra, Specialized Emacs Features})
-@end iftex
-@ifnottex
-(@pxref{Tags})
-@end ifnottex
-instead of one or both revision ID.
-
-  Note that if your version-control system is file-oriented (SCCS,
-RCS, CVS) rather than fileset-oriented (Subversion, GNU Arch, git,
-Mercurial) specifying a revision of a multiple-file fileset by
-revision ID (as opposed to a symbolic tag name) is
-unlikely to return diffs that are connected in any meaningful way.
-
-  If you invoke @kbd{C-u C-x v =} or @kbd{C-u C-x v =} from a buffer
-that is neither visiting a version-controlled file nor a VC directory
-buffer, these commands will generate a diff of all registered files in
-the current directory and its subdirectories.
-
-@vindex vc-diff-switches
-@vindex vc-rcs-diff-switches
-  @kbd{C-x v =} works by running a variant of the @code{diff} utility
-designed to work with the version control system in use.  When you
-invoke @code{diff} this way, in addition to the options specified by
-@code{diff-switches} (@pxref{Comparing Files}), it receives those
-specified by @code{vc-diff-switches}, plus those specified for the
-specific back end by @code{vc-@var{backend}-diff-switches}.  For
-instance, when the version control back end is RCS, @code{diff} uses
-the options in @code{vc-rcs-diff-switches}.  The
-@samp{vc@dots{}diff-switches} variables are @code{nil} by default.
-
-  The buffer produced by @kbd{C-x v =} supports the commands of
-Compilation mode (@pxref{Compilation Mode}), such as @kbd{C-x `} and
-@kbd{C-c C-c}, in both the ``old'' and ``new'' text, and they always
-find the corresponding locations in the current work file.  (Older
-revisions are not, in general, present as files on your disk.)
-
-@findex vc-annotate
-@kindex C-x v g
-  For some back ends, you can display the file @dfn{annotated} with
-per-line revision information and using colors to enhance the visual
-appearance, with the command @kbd{M-x vc-annotate}.  This creates a new
-buffer (the ``annotate buffer'') displaying the file's text, with each
-part colored to show how old it is.  Text colored red is new, blue means
-old, and intermediate colors indicate intermediate ages.  By default,
-the color is scaled over the full range of ages, such that the oldest
-changes are blue, and the newest changes are red.
-
-  When you give a prefix argument to this command, Emacs reads two
-arguments using the minibuffer: the ID of which revision to display and
-annotate (instead of the current file contents), and the time span in
-days the color range should cover.  
-
-  From the annotate buffer, these and other color scaling options are
-available from the @samp{VC-Annotate} menu.  In this buffer, you can
-also use the following keys to browse the annotations of past revisions,
-view diffs, or view log entries:
-
-@table @kbd
-@item P
-Annotate the previous revision, that is to say, the revision before
-the one currently annotated.  A numeric prefix argument is a repeat
-count, so @kbd{C-u 10 P} would take you back 10 revisions.
-
-@item N
-Annotate the next revision---the one after the revision currently
-annotated.  A numeric prefix argument is a repeat count.
-
-@item J
-Annotate the revision indicated by the current line.
-
-@item A
-Annotate the revision before the one indicated by the current line.
-This is useful to see the state the file was in before the change on
-the current line was made.
-
-@item D
-Display the diff between the current line's revision and the previous
-revision.  This is useful to see what the current line's revision
-actually changed in the file.
-
-@item L
-Show the log of the current line's revision.  This is useful to see
-the author's description of the changes in the revision on the current
-line.
-
-@item W
-Annotate the working revision--the one you are editing.  If you used
-@kbd{P} and @kbd{N} to browse to other revisions, use this key to
-return to your working revision.
-@end table
-
-@node Secondary VC Commands
-@subsection The Secondary Commands of VC
-
-  This section explains the secondary commands of VC, those that you might
-use once a day.
-
-@menu
-* Registering::         Putting a file under version control.
-* VC Status::           Viewing the VC status of files.
-* VC Undo::             Canceling changes before or after check-in.
-@ifnottex
-* VC Directory Mode::   Listing files managed by version control.
-* VC Directory Commands:: Commands to use in a VC directory buffer.
-@end ifnottex
-@end menu
-
-@node Registering
-@subsubsection Registering a File for Version Control
-
-@kindex C-x v i
-@findex vc-register
-  You can put any file under version control by simply visiting it, and
-then typing @w{@kbd{C-x v i}} (@code{vc-register}).
-
-@table @kbd
-@item C-x v i
-Register the visited file for version control.
-@end table
-
-  To register the file, Emacs must choose which version control system
-to use for it.  If the file's directory already contains files
-registered in a version control system, Emacs uses that system.  If
-there is more than one system in use for a directory, Emacs uses the
-one that appears first in @code{vc-handled-backends}
-@iftex
-(@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}).
-@end iftex
-@ifnottex
-(@pxref{Customizing VC}).
-@end ifnottex
-On the other hand, if there are no files already registered, Emacs uses
-the first system from @code{vc-handled-backends} that could register
-the file (for example, you cannot register a file under CVS if its
-directory is not already part of a CVS tree); with the default value
-of @code{vc-handled-backends}, this means that Emacs uses RCS in this
-situation.
-
-  If locking is in use, @kbd{C-x v i} leaves the file unlocked and
-read-only.  Type @kbd{C-x v v} if you wish to start editing it.  After
-registering a file with CVS, you must subsequently commit the initial
-revision by typing @kbd{C-x v v}.  Until you do that, the revision ID
-appears as @samp{@@@@} in the mode line.
-
-@vindex vc-default-init-revision
-@cindex initial revision ID to register
-  The default initial revision ID for a newly registered file
-varies by what VCS you are using; normally it will be 1.1 on VCSes
-that use dot-pair revision IDs and 1 on VCSes that use monotonic IDs.
-You can specify a different default by setting the variable
-@code{vc-default-init-revision}, or you can give @kbd{C-x v i} a
-numeric argument; then it reads the initial revision ID for this
-particular file using the minibuffer.
-
-@vindex vc-initial-comment
-  If @code{vc-initial-comment} is non-@code{nil}, @kbd{C-x v i} reads an
-initial comment to describe the purpose of this source file.  Reading
-the initial comment works like reading a log entry (@pxref{Log Buffer}).
-
-@node VC Status
-@subsubsection VC Status Commands
-
-@table @kbd
-@item C-x v l
-Display revision control state and change history.
-@end table
-
-@kindex C-x v l
-@findex vc-print-log
-  To view the detailed revision control status and history of a file,
-type @kbd{C-x v l} (@code{vc-print-log}).  It displays the history of
-changes to the current file, including the text of the log entries.  The
-output appears in a separate window.  The point is centered at the
-revision of the file that is currently being visited.
-
-  In the change log buffer, you can use the following keys to move
-between the logs of revisions and of files, to view past revisions, and
-to view diffs:
-
-@table @kbd
-@item p
-Move to the previous revision-item in the buffer.  (Revision entries in the log
-buffer are usually in reverse-chronological order, so the previous
-revision-item usually corresponds to a newer revision.)  A numeric
-prefix argument is a repeat count.
-
-@item n
-Move to the next revision-item (which most often corresponds to the
-previous revision of the file).  A numeric prefix argument is a repeat
-count.
-
-@item P
-Move to the log of the previous file, when the logs of multiple files
-are in the log buffer
-@iftex
-(@pxref{VC Directory Mode,,,emacs-xtra, Specialized Emacs Features}).
-@end iftex
-@ifnottex
-(@pxref{VC Directory Mode}).
-@end ifnottex
-Otherwise, just move to the beginning of the log.  A numeric prefix
-argument is a repeat count, so @kbd{C-u 10 P} would move backward 10
-files.
-
-@item N
-Move to the log of the next file, when the logs of multiple files are
-in the log buffer
-@iftex
-(@pxref{VC Directory Mode,,,emacs-xtra, Specialized Emacs Features}).
-@end iftex
-@ifnottex
-(@pxref{VC Directory Mode}).
-@end ifnottex
-It also takes a numeric prefix argument as a repeat count.
-
-@item f
-Visit the revision indicated at the current line, like typing @kbd{C-x
-v ~} and specifying this revision's ID (@pxref{Old Revisions}).
-
-@item d
-Display the diff (@pxref{Comparing Files}) between the revision
-indicated at the current line and the next earlier revision.  This is
-useful to see what actually changed when the revision indicated on the
-current line was committed.
-@end table
-
-@node VC Undo
-@subsubsection Undoing Version Control Actions
-
-@table @kbd
-@item C-x v u
-Revert the buffer and the file to the working revision from which you started
-editing the file.
-
-@item C-x v c
-Remove the last-entered change from the master for the visited file.
-This undoes your last check-in.
-@end table
-
-@kindex C-x v u
-@findex vc-revert-buffer
-  If you want to discard your current set of changes and revert to the
-working revision from which you started editing the file, use @kbd{C-x v u}
-(@code{vc-revert-buffer}).  This leaves the file unlocked; if locking
-is in use, you must first lock the file again before you change it
-again.  @kbd{C-x v u} requires confirmation, unless it sees that you
-haven't made any changes with respect to the master copy of the
-working revision.
-
-  @kbd{C-x v u} is also the command to unlock a file if you lock it and
-then decide not to change it.
-
-@kindex C-x v c
-@findex vc-rollback
-  To cancel a change that you already checked in, use @kbd{C-x v c}
-(@code{vc-rollback}).  This command discards all record of the most
-recent checked-in revision, but only if your work file corresponds to
-that revision---you cannot use @kbd{C-x v c} to cancel a revision that is
-not the latest on its branch.  Note that many version-control systems do
-not support rollback at all; this command is something of a historical 
-relic.
-
-@ifnottex
-@c vc1-xtra.texi needs extra level of lowering.
-@lowersections
-@include vc1-xtra.texi
-@raisesections
-@end ifnottex
-
-@node Branches
-@subsection Multiple Branches of a File
-@cindex branch (version control)
-@cindex trunk (version control)
-
-  One use of version control is to maintain multiple ``current''
-revisions of a file.  For example, you might have different revisions of a
-program in which you are gradually adding various unfinished new
-features.  Each such independent line of development is called a
-@dfn{branch}.  VC allows you to create branches, switch between
-different branches, and merge changes from one branch to another.
-Please note, however, that branches are not supported for SCCS.
-
-  A file's main line of development is usually called the @dfn{trunk}.
-You can create multiple branches from the trunk.  How the difference
-between trunk and branch is made visible is dependent on whether the
-VCS uses dot-pair or monotonic version IDs.
-
-  In VCSes with dot-pair revision IDs, the revisions on the trunk are
-normally IDed 1.1, 1.2, 1.3, etc.  At any such revision, you can
-start an independent branch.  A branch starting at revision 1.2 would
-have revision ID 1.2.1.1, and consecutive revisions on this branch
-would have IDs 1.2.1.2, 1.2.1.3, 1.2.1.4, and so on.  If there is
-a second branch also starting at revision 1.2, it would consist of
-revisions 1.2.2.1, 1.2.2.2, 1.2.2.3, etc.
-
-   In VCSes with monotonic revision IDs, trunk revisions are IDed as
-1, 2, 3, etc.  A branch from (say) revision 2 might start with 2.1 and
-continue through 2.2, 2.3, etc.  But naming conventions for branches
-and subbranches vary widely on these systems, and some (like
-Mercurial) never depart from the monotonic integer sequence at all.
-Consult the documentation of the VCS you are using.
-
-@cindex head revision
-  If you omit the final component of a dot-pair revision ID, that is called a
-@dfn{branch ID}.  It refers to the highest existing revision on that
-branch---the @dfn{head revision} of that branch.  The branches in the
-dot-pair example above have branch IDs 1.2.1 and 1.2.2.
-
-@menu
-* Switching Branches::    How to get to another existing branch.
-* Creating Branches::     How to start a new branch.
-* Merging::               Transferring changes between branches.
-* Multi-User Branching::  Multiple users working at multiple branches
-                            in parallel.
-@end menu
-
-@node Switching Branches
-@subsubsection Switching between Branches
-
-  To switch between branches, type @kbd{C-u C-x v v} and specify the
-revision ID you want to select.  On a locking-based system, this
-version is then visited @emph{unlocked} (write-protected), so you can
-examine it before locking it.  Switching branches in this way is allowed
-only when the file is not locked.
-
-  On a VCS with dot-pair IDs, you can omit the minor part, thus giving
-only the branch ID; this takes you to the head version on the
-chosen branch.  If you only type @key{RET}, Emacs goes to the highest
-version on the trunk.
-
-  After you have switched to any branch (including the main branch), you
-stay on it for subsequent VC commands, until you explicitly select some
-other branch.
-
-@node Creating Branches
-@subsubsection Creating New Branches
-
-  To create a new branch from a head revision (one that is the latest in
-the branch that contains it), first select that revision if necessary,
-lock it with @kbd{C-x v v}, and make whatever changes you want.  Then,
-when you check in the changes, use @kbd{C-u C-x v v}.  This lets you
-specify the revision ID for the new revision.  You should specify a
-suitable branch ID for a branch starting at the current revision.
-For example, if the current revision is 2.5, the branch ID should be
-2.5.1, 2.5.2, and so on, depending on the number of existing branches at
-that point.
-
-  To create a new branch at an older revision (one that is no longer the
-head of a branch), first select that revision (@pxref{Switching
-Branches}).  Your procedure will then differ depending on whether you
-are using a locking or merging-based VCS.
-
-  On a locking VCS, you will need to lock the old revision branch with
-@kbd{C-x v v}.  You'll be asked to confirm, when you lock the old
-revision, that you really mean to create a new branch---if you say no,
-you'll be offered a chance to lock the latest revision instead.  On
-a merging-based VCS you will skip this step.
-
-  Then make your changes and type @kbd{C-x v v} again to check in a new
-revision.  This automatically creates a new branch starting from the
-selected revision.  You need not specially request a new branch, because
-that's the only way to add a new revision at a point that is not the head
-of a branch.
-
-  After the branch is created, you ``stay'' on it.  That means that
-subsequent check-ins create new revisions on that branch.  To leave the
-branch, you must explicitly select a different revision with @kbd{C-u C-x
-v v}.  To transfer changes from one branch to another, use the merge
-command, described in the next section.
-
-@node Merging
-@subsubsection Merging Branches
-
-@cindex merging changes
-  When you have finished the changes on a certain branch, you will
-often want to incorporate them into the file's main line of development
-(the trunk).  This is not a trivial operation, because development might
-also have proceeded on the trunk, so that you must @dfn{merge} the
-changes into a file that has already been changed otherwise.  VC allows
-you to do this (and other things) with the @code{vc-merge} command.
-
-@table @kbd
-@item C-x v m (vc-merge)
-Merge changes into the work file.
-@end table
-
-@kindex C-x v m
-@findex vc-merge
-  @kbd{C-x v m} (@code{vc-merge}) takes a set of changes and merges it
-into the current version of the work file.  It firsts asks you in the
-minibuffer where the changes should come from.  If you just type
-@key{RET}, Emacs merges any changes that were made on the same branch
-since you checked the file out (we call this @dfn{merging the news}).
-This is the common way to pick up recent changes from the repository,
-regardless of whether you have already changed the file yourself.
-
-  You can also enter a branch ID or a pair of revision IDs in
-the minibuffer.  Then @kbd{C-x v m} finds the changes from that
-branch, or the differences between the two revisions you specified, and
-merges them into the current revision of the current file.
-
-  As an example, suppose that you have finished a certain feature on
-branch 1.3.1.  In the meantime, development on the trunk has proceeded
-to revision 1.5.  To merge the changes from the branch to the trunk,
-first go to the head revision of the trunk, by typing @kbd{C-u C-x v v
-@key{RET}}.  Revision 1.5 is now current.  If locking is used for the file,
-type @kbd{C-x v v} to lock revision 1.5 so that you can change it.  Next,
-type @kbd{C-x v m 1.3.1 @key{RET}}.  This takes the entire set of changes on
-branch 1.3.1 (relative to revision 1.3, where the branch started, up to
-the last revision on the branch) and merges it into the current revision
-of the work file.  You can now check in the changed file, thus creating
-revision 1.6 containing the changes from the branch.
-
-  It is possible to do further editing after merging the branch, before
-the next check-in.  But it is usually wiser to check in the merged
-revision, then lock it and make the further changes.  This will keep
-a better record of the history of changes.
-
-@cindex conflicts
-@cindex resolving conflicts
-  When you merge changes into a file that has itself been modified, the
-changes might overlap.  We call this situation a @dfn{conflict}, and
-reconciling the conflicting changes is called @dfn{resolving a
-conflict}.
-
-  Whenever conflicts occur during merging, VC detects them, tells you
-about them in the echo area, and asks whether you want help in merging.
-If you say yes, it starts an Ediff session (@pxref{Top,
-Ediff, Ediff, ediff, The Ediff Manual}).
-
-  If you say no, the conflicting changes are both inserted into the
-file, surrounded by @dfn{conflict markers}.  The example below shows how
-a conflict region looks; the file is called @samp{name} and the current
-master file revision with user B's changes in it is 1.11.
-
-@c @w here is so CVS won't think this is a conflict.
-@smallexample
-@group
-@w{<}<<<<<< name
-  @var{User A's version}
-=======
-  @var{User B's version}
-@w{>}>>>>>> 1.11
-@end group
-@end smallexample
-
-@cindex vc-resolve-conflicts
-  Then you can resolve the conflicts by editing the file manually.  Or
-you can type @code{M-x vc-resolve-conflicts} after visiting the file.
-This starts an Ediff session, as described above.  Don't forget to
-check in the merged version afterwards.
-
-@node Multi-User Branching
-@subsubsection Multi-User Branching
-
-  It is often useful for multiple developers to work simultaneously on
-different branches of a file.  CVS and later systems allow this by
-default; for RCS, it is possible if you create multiple source
-directories.  Each source directory should have a link named
-@file{RCS} which points to a common directory of RCS master files.
-Then each source directory can have its own choice of selected
-revisions, but all share the same common RCS records.
-
-  This technique works reliably and automatically, provided that the
-source files contain RCS version headers
-@iftex
-(@pxref{Version Headers,,,emacs-xtra, Specialized Emacs Features}).
-@end iftex
-@ifnottex
-(@pxref{Version Headers}).
-@end ifnottex
-The headers enable Emacs to be sure, at all times, which revision
-ID is present in the work file.
-
-  If the files do not have version headers, you must instead tell Emacs
-explicitly in each session which branch you are working on.  To do this,
-first find the file, then type @kbd{C-u C-x v v} and specify the correct
-branch ID.  This ensures that Emacs knows which branch it is using
-during this particular editing session.
-
-@ifnottex
-@include vc2-xtra.texi
-@end ifnottex
-
 @node Directories
 @section File Directories
 
@@ -2447,25 +1243,38 @@ this, it runs the program specified by
 @code{directory-free-space-program} with arguments
 @code{directory-free-space-args}.
 
+  The command @kbd{M-x delete-directory} prompts for a directory name
+using the minibuffer, and deletes the directory if it is empty.  If
+the directory is not empty, this signals an error.  On systems that
+have a ``Trash'' or ``Recycle Bin'' feature, you can make this command
+move the specified directory to the Trash or Recycle Bin, instead of
+deleting it outright, by changing the variable
+@code{delete-by-moving-to-trash} to @code{t}.  @xref{Misc File Ops},
+for more information about using the Trash.
+
 @node Comparing Files
 @section Comparing Files
 @cindex comparing files
 
 @findex diff
 @vindex diff-switches
-  The command @kbd{M-x diff} compares two files, displaying the
-differences in an Emacs buffer named @samp{*diff*}.  It works by
-running the @code{diff} program, using options taken from the variable
-@code{diff-switches}.  The value of @code{diff-switches} should be a
-string; the default is @code{"-c"} to specify a context diff.
-@xref{Top,, Diff, diff, Comparing and Merging Files}, for more
-information about @command{diff} output formats.
+  The command @kbd{M-x diff} prompts for two file names, using the
+minibuffer, and displays the differences between the two files in a
+buffer named @samp{*diff*}.  This works by running the @command{diff}
+program, using options taken from the variable @code{diff-switches}.
+The value of @code{diff-switches} should be a string; the default is
+@code{"-c"} to specify a context diff.  @xref{Top,, Diff, diff,
+Comparing and Merging Files}, for more information about
+@command{diff} output formats.
+
+  The output of the @code{diff} command is shown using a major mode
+called Diff mode.  @xref{Diff Mode}.
 
 @findex diff-backup
-  The command @kbd{M-x diff-backup} compares a specified file with its most
-recent backup.  If you specify the name of a backup file,
-@code{diff-backup} compares it with the source file that it is a backup
-of.
+  The command @kbd{M-x diff-backup} compares a specified file with its
+most recent backup.  If you specify the name of a backup file,
+@code{diff-backup} compares it with the source file that it is a
+backup of.  In all other respects, this behaves like @kbd{M-x diff}.
 
 @findex compare-windows
   The command @kbd{M-x compare-windows} compares the text in the
@@ -2518,81 +1327,144 @@ merging files.
 @findex diff-mode
 @cindex patches, editing
 
-  Diff mode is used for the output of @kbd{M-x diff}; it is also
-useful for editing patches and comparisons produced by the
-@command{diff} program.  To select Diff mode manually, type @kbd{M-x
+  Diff mode is a major mode used for the output of @kbd{M-x diff} and
+other similar commands, as well as the output of the @command{diff}
+program.  This kind of output is called a @dfn{patch}, because it can
+be passed to the @command{patch} command to automatically apply the
+specified changes.  To select Diff mode manually, type @kbd{M-x
 diff-mode}.
 
-  One general feature of Diff mode is that manual edits to the patch
-automatically correct line numbers, including those in the hunk
-header, so that you can actually apply the edited patch.  Diff mode
-treats each hunk location as an ``error message,'' so that you can use
-commands such as @kbd{C-x '} to visit the corresponding source
-locations.  It also provides the following commands to navigate,
+@cindex hunk, diff
+  The changes specified in a patch are grouped into @dfn{hunks}, which
+are contiguous chunks of text that contain one or more changed lines.
+Hunks can also include unchanged lines to provide context for the
+changes.  Each hunk is preceded by a @dfn{hunk header}, which
+specifies the old and new line numbers at which the hunk occurs.  Diff
+mode highlights each hunk header, to distinguish it from the actual
+contents of the hunk.
+
+@vindex diff-update-on-the-fly
+  You can edit a Diff mode buffer like any other buffer.  (If it is
+read-only, you need to make it writable first.  @xref{Misc Buffer}.)
+Whenever you change a hunk, Diff mode attempts to automatically
+correct the line numbers in the hunk headers, to ensure that the diff
+remains ``correct''.  To disable automatic line number correction,
+change the variable @code{diff-update-on-the-fly} to @code{nil}.
+
+  Diff mode treats each hunk as an ``error message,'' similar to
+Compilation mode.  Thus, you can use commands such as @kbd{C-x '} to
+visit the corresponding source locations.  @xref{Compilation Mode}.
+
+  In addition, Diff mode provides the following commands to navigate,
 manipulate and apply parts of patches:
 
 @table @kbd
 @item M-n
+@findex diff-hunk-next
 Move to the next hunk-start (@code{diff-hunk-next}).
 
 @item M-p
+@findex diff-hunk-prev
 Move to the previous hunk-start (@code{diff-hunk-prev}).
 
 @item M-@}
+@findex diff-file-next
 Move to the next file-start, in a multi-file patch
 (@code{diff-file-next}).
 
 @item M-@{
+@findex diff-file-prev
 Move to the previous file-start, in a multi-file patch
 (@code{diff-file-prev}).
 
 @item M-k
+@findex diff-hunk-kill
 Kill the hunk at point (@code{diff-hunk-kill}).
 
 @item M-K
+@findex diff-file-kill
 In a multi-file patch, kill the current file part.
 (@code{diff-file-kill}).
 
 @item C-c C-a
+@findex diff-apply-hunk
 Apply this hunk to its target file (@code{diff-apply-hunk}).  With a
 prefix argument of @kbd{C-u}, revert this hunk.
 
+@item C-c C-b
+@findex diff-refine-hunk
+Highlight the changes of the hunk at point with a finer granularity
+(@code{diff-refine-hunk}).  This allows you to see exactly which parts
+of each changed line were actually changed.
+
 @item C-c C-c
-Go to the source corresponding to this hunk (@code{diff-goto-source}).
+@findex diff-goto-source
+Go to the source file and line corresponding to this hunk
+(@code{diff-goto-source}).
 
 @item C-c C-e
+@findex diff-ediff-patch
 Start an Ediff session with the patch (@code{diff-ediff-patch}).
 @xref{Top, Ediff, Ediff, ediff, The Ediff Manual}.
 
 @item C-c C-n
+@findex diff-restrict-view
 Restrict the view to the current hunk (@code{diff-restrict-view}).
 @xref{Narrowing}.  With a prefix argument of @kbd{C-u}, restrict the
-view to the current patch of a multiple file patch.  To widen again,
-use @kbd{C-x n w}.
+view to the current file of a multiple-file patch.  To widen again,
+use @kbd{C-x n w} (@code{widen}).
 
 @item C-c C-r
+@findex diff-reverse-direction
 Reverse the direction of comparison for the entire buffer
 (@code{diff-reverse-direction}).
 
 @item C-c C-s
+@findex diff-split-hunk
 Split the hunk at point (@code{diff-split-hunk}).  This is for
-manually editing patches, and only works with the unified diff format.
+manually editing patches, and only works with the @dfn{unified diff
+format} produced by the @option{-u} or @option{--unified} options to
+the @command{diff} program.  If you need to split a hunk in the
+@dfn{context diff format} produced by the @option{-c} or
+@option{--context} options to @command{diff}, first convert the buffer
+to the unified diff format with @kbd{C-c C-u}.
+
+@item C-c C-d
+@findex diff-unified->context
+Convert the entire buffer to the @dfn{context diff format}
+(@code{diff-unified->context}).  With a prefix argument, convert only
+the text within the region.
 
 @item C-c C-u
-Convert the entire buffer to unified format
+@findex diff-context->unified
+Convert the entire buffer to unified diff format
 (@code{diff-context->unified}).  With a prefix argument, convert
 unified format to context format.  When the mark is active, convert
 only the text within the region.
 
 @item C-c C-w
+@findex diff-refine-hunk
 Refine the current hunk so that it disregards changes in whitespace
 (@code{diff-refine-hunk}).
+
+@item C-x 4 A
+@findex diff-add-change-log-entries-other-window
+@findex add-change-log-entry-other-window@r{, in Diff mode}
+Generate a ChangeLog entry, like @kbd{C-x 4 a} does (@pxref{Change
+Log}), for each one of the hunks
+(@code{diff-add-change-log-entries-other-window}).  This creates a
+skeleton of the log of changes that you can later fill with the actual
+descriptions of the changes.  @kbd{C-x 4 a} itself in Diff mode
+operates on behalf of the current hunk's file, but gets the function
+name from the patch itself.  This is useful for making log entries for
+functions that are deleted by the patch.
+
+@item M-x diff-show-trailing-whitespaces RET
+@findex diff-show-trailing-whitespaces
+Highlight trailing whitespace characters, except for those used by the
+patch syntax (@pxref{Useless Whitespace}).
 @end table
 
-  @kbd{C-x 4 a} in Diff mode operates on behalf of the target file,
-but gets the function name from the patch itself.  @xref{Change Log}.
-This is useful for making log entries for functions that are deleted
-by the patch.
 
 @node Misc File Ops
 @section Miscellaneous File Operations
@@ -2643,9 +1515,25 @@ as saving files; see @ref{Customize Save}.
 
 @findex delete-file
 @cindex deletion (of files)
+@vindex delete-by-moving-to-trash
   @kbd{M-x delete-file} deletes the specified file, like the @code{rm}
-command in the shell.  If you are deleting many files in one directory, it
-may be more convenient to use Dired (@pxref{Dired}).
+command in the shell.  If you are deleting many files in one
+directory, it may be more convenient to use Dired rather than
+@code{delete-file}.  @xref{Dired}.
+
+@cindex trash
+@cindex recycle bin
+  On some systems, there is a facility called the ``Trash'' (or
+``Recycle Bin''); ``deleting'' a file normally means moving it into
+the Trash, and you can bring the file back from the Trash if you later
+change your mind.  By default, Emacs does @emph{not} use the Trash for
+file deletion---when Emacs deletes a file, it is gone forever.  You
+can tell Emacs to use the Trash by changing the variable
+@code{delete-by-moving-to-trash} to @code{t}.  This applies to file
+deletion via @kbd{M-x delete-file}, as well as @kbd{M-x
+delete-directory} (@pxref{Directories}) and file deletion in Dired
+(@pxref{Dired Deletion}).  In addition, you can explicitly move a file
+into the Trash with the command @kbd{M-x move-file-to-trash}.
 
 @findex rename-file
   @kbd{M-x rename-file} reads two file names @var{old} and @var{new} using
@@ -2690,6 +1578,19 @@ a relative name as the target of the link.
   Not all systems support symbolic links; on systems that don't
 support them, this command is not defined.
 
+@findex set-file-modes
+@cindex file modes
+@cindex file permissions
+  @kbd{M-x set-file-modes} reads a file name followed by a @dfn{file
+mode}, and applies that file mode to the specified file.  File modes,
+also called @dfn{file permissions}, determine whether a file can be
+read, written to, or executed, and by whom.  This command reads file
+modes using the same symbolic or octal format accepted by the
+@command{chmod} command; for instance, @samp{u+x} means to add
+execution permission for the user who owns the file.  It has no effect
+on operating systems that do not support file modes.  @code{chmod} is a
+convenience alias for this function.
+
 @node Compressed Files
 @section Accessing Compressed Files
 @cindex compression
@@ -2762,21 +1663,23 @@ requires the appropriate uncompression program.
 @cindex mode, archive
 @cindex @code{arc}
 @cindex @code{jar}
+@cindex @code{rar}
 @cindex @code{zip}
 @cindex @code{lzh}
 @cindex @code{zoo}
 @pindex arc
 @pindex jar
 @pindex zip
+@pindex rar
 @pindex lzh
 @pindex zoo
 @cindex Java class archives
 @cindex unzip archives
   A separate but similar Archive mode is used for archives produced by
-the programs @code{arc}, @code{jar}, @code{lzh}, @code{zip}, and
-@code{zoo}, which have extensions corresponding to the program names.
-Archive mode also works for those @code{exe} files that are
-self-extracting executables.
+the programs @code{arc}, @code{jar}, @code{lzh}, @code{zip},
+@code{rar}, and @code{zoo}, which have extensions corresponding to the
+program names.  Archive mode also works for those @code{exe} files
+that are self-extracting executables.
 
   The key bindings of Archive mode are similar to those in Tar mode,
 with the addition of the @kbd{m} key which marks a file for subsequent
@@ -2812,14 +1715,13 @@ syntax:
 @end example
 
 @noindent
-To carry out this request, Emacs uses either the FTP program or a
-remote-login program such as @command{ssh}, @command{rlogin}, or
-@command{telnet}.  You can always specify in the file name which
-method to use---for example,
-@file{/ftp:@var{user}@@@var{host}:@var{filename}} uses FTP, whereas
-@file{/ssh:@var{user}@@@var{host}:@var{filename}} uses @command{ssh}.
-When you don't specify a method in the file name, Emacs chooses
-the method as follows:
+To carry out this request, Emacs uses a remote-login program such as
+@command{ftp}, @command{ssh}, @command{rlogin}, or @command{telnet}.
+You can always specify in the file name which method to use---for
+example, @file{/ftp:@var{user}@@@var{host}:@var{filename}} uses FTP,
+whereas @file{/ssh:@var{user}@@@var{host}:@var{filename}} uses
+@command{ssh}.  When you don't specify a method in the file name,
+Emacs chooses the method as follows:
 
 @enumerate
 @item
@@ -2829,20 +1731,31 @@ FTP.
 If the user name is @samp{ftp} or @samp{anonymous}, then Emacs uses
 FTP.
 @item
+If the variable @code{tramp-default-method} is set to @samp{ftp},
+then Emacs uses FTP.
+@item
+If @command{ssh-agent} is running, then Emacs uses @command{scp}.
+@item
 Otherwise, Emacs uses @command{ssh}.
 @end enumerate
 
+@cindex disabling remote files
 @noindent
-Remote file access through FTP is handled by the Ange-FTP package, which
+You can entirely turn off the remote file name feature by setting the
+variable @code{tramp-mode} to @code{nil}.  You can turn off the
+feature in individual cases by quoting the file name with @samp{/:}
+(@pxref{Quoted File Names}).
+
+  Remote file access through FTP is handled by the Ange-FTP package, which
 is documented in the following.  Remote file access through the other
 methods is handled by the Tramp package, which has its own manual.
 @xref{Top, The Tramp Manual,, tramp, The Tramp Manual}.
 
-When the Ange-FTP package is used, Emacs logs in through FTP using your
-user name or the name @var{user}.  It may ask you for a password from
-time to time; this is used for logging in on @var{host}.  The form using
-@var{port} allows you to access servers running on a non-default TCP
-port.
+When the Ange-FTP package is used, Emacs logs in through FTP using
+your user name or the name @var{user}.  It may ask you for a password
+from time to time (@pxref{Passwords}); this is used for logging in on
+@var{host}.  The form using @var{port} allows you to access servers
+running on a non-default TCP port.
 
 @cindex backups for remote files
 @vindex ange-ftp-make-backup-files
@@ -2869,7 +1782,7 @@ are handled specially.  The variable
 the value of this variable is a string, then that string is used as
 the password; if non-@code{nil} (the default), then the value of
 @code{user-mail-address} is used; if @code{nil}, then Emacs prompts
-you for a password as usual.
+you for a password as usual (@pxref{Passwords}).
 
 @cindex firewall, and accessing remote files
 @cindex gateway, and remote file access with @code{ange-ftp}
@@ -2887,15 +1800,6 @@ to make remote file names work, but the procedure is complex.  You can
 read the instructions by typing @kbd{M-x finder-commentary @key{RET}
 ange-ftp @key{RET}}.
 
-@vindex file-name-handler-alist
-@cindex disabling remote files
-  You can entirely turn off the FTP file name feature by removing the
-entries @code{ange-ftp-completion-hook-function} and
-@code{ange-ftp-hook-function} from the variable
-@code{file-name-handler-alist}.  You can turn off the feature in
-individual cases by quoting the file name with @samp{/:} (@pxref{Quoted
-File Names}).
-
 @node Quoted File Names
 @section Quoted File Names
 
@@ -3055,8 +1959,8 @@ menu, where each existing fileset is represented by a submenu.
 
    Emacs uses the concept of a fileset elsewhere @pxref{Version
 Control} to describe sets of files to be treated as a group for
-purposes of version-control operations.  Those filesets are 
-unnamed and do not persist across Emacs essions.
+purposes of version control operations.  Those filesets are unnamed
+and do not persist across Emacs sessions.
 
 @ignore
    arch-tag: 768d32cb-e15a-4cc1-b7bf-62c00ee12250