]> code.delx.au - gnu-emacs/blobdiff - man/files.texi
(Visiting): Mention Mac OS port.
[gnu-emacs] / man / files.texi
index bc99adc5977a745431e63b288b835fc88dd0dd7e..a08220542104d3b0c9add721a67fbaf1db07641c 100644 (file)
@@ -1,11 +1,12 @@
 @c This is part of the Emacs manual.
-@c Copyright (C) 1985,86,87,93,94,95,97,99, 2000 Free Software Foundation, Inc.
+@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1999, 2000,
+@c   2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
-@node Files, Buffers, Fixit, Top
+@node Files, Buffers, Keyboard Macros, Top
 @chapter File Handling
 @cindex files
 
-  The operating system stores data permanently in named @dfn{files}.  So
+  The operating system stores data permanently in named @dfn{files}, so
 most of the text you edit with Emacs comes from a file and is ultimately
 stored in a file.
 
@@ -36,6 +37,7 @@ on file directories.
 * Quoted File Names::   Quoting special characters in file names.
 * File Name Cache::     Completion against a list of files you often use.
 * File Conveniences::   Convenience Features for Finding Files.
+* Filesets::            Handling sets of files.
 @end menu
 
 @node File Names
@@ -45,8 +47,11 @@ on file directories.
   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, to make
-it easier to specify long file names.  @xref{Completion}.
+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
@@ -55,7 +60,7 @@ this makes it easy to operate on that file with any of the Emacs file
 commands.
 
 @vindex default-directory
-  Each buffer has a default directory, normally the same as the
+  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
@@ -63,21 +68,22 @@ 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.
 
-  For example, if the default file name is @file{/u/rms/gnu/gnu.tasks} then
-the default directory is @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 @file{/u/rms/gnu/new/foo}.
-
 @findex cd
 @findex pwd
-  The command @kbd{M-x pwd} prints the current buffer's default
+  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 that is visited there.  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.
+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
+@file{/u/rms/gnu/new/foo}.
 
 @vindex insert-default-directory
   The default directory actually appears in the minibuffer when the
@@ -97,46 +103,52 @@ with @samp{/usr/tmp/} and you add @samp{/x1/rms/foo}, you get
 first slash in the double slash; the result is @samp{/x1/rms/foo}.
 @xref{Minibuffer File}.
 
-@cindex environment variables in file names
-@cindex expansion of environment variables
-  @samp{$} in a file name is used to substitute environment variables.
-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}.  The environment variable
-name consists of all the alphanumeric characters after the @samp{$};
-alternatively, it may be enclosed in braces after the @samp{$}.  Note
-that shell commands to set environment variables affect Emacs only if
-done before Emacs is started.
-
 @cindex home directory shorthand
-  You can use the @file{~/} in a file name to mean your home directory,
+  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}.  (On DOS and Windows systems, where a user
 doesn't have a home directory, Emacs substitutes @file{~/} with the
 value of the environment variable @code{HOME}; see @ref{General
 Variables}.)
 
-  To access a file with @samp{$} in its name, type @samp{$$}.  This pair
-is converted to a single @samp{$} at the same time as 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{/:}.
+@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.
+
+  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{/:} (@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 substitution is called
+  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-ASCII characters in file names if you set the
+  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{Specify Coding}.
+@xref{File Name Coding}.
 
 @node Visiting
 @section Visiting Files
 @cindex visiting files
 
-@c WideCommands
 @table @kbd
 @item C-x C-f
 Visit a file (@code{find-file}).
@@ -158,22 +170,23 @@ Visit a file with no conversion of the contents.
 
 @cindex files, visiting and saving
 @cindex saving files
-  @dfn{Visiting} a file means copying its contents into an Emacs buffer
-so you can edit them.  Emacs makes a new buffer for each file that you
-visit.  We say that this buffer is visiting the file that it was created
-to hold.  Emacs constructs the buffer name from the file name by
-throwing away the directory, keeping just the name proper.  For example,
-a file named @file{/usr/rms/emacs.tex} would get a buffer named
-@samp{emacs.tex}.  If there is already a buffer with that name, a unique
-name is constructed by appending @samp{<2>}, @samp{<3>}, or so on, using
-the lowest number that makes a name that is not already in use.
+  @dfn{Visiting} a file means copying 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.
 
   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
-place permanent, until you @dfn{save} the buffer.  Saving the buffer
+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}.
 
@@ -192,30 +205,52 @@ the command with the name of the file you wish to visit, terminated by a
 
   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}.
+While in the minibuffer, you can abort @kbd{C-x C-f} by typing
+@kbd{C-g}.  File-name completion ignores certain filenames; for more
+about this, see @ref{Completion Options}.
 
-@cindex file selection dialog
-  When Emacs is built with a suitable GUI toolkit, it pops up the
-standard File Selection dialog of that toolkit instead of prompting for
-the file name in the minibuffer.  On Unix and GNU/Linux platforms, Emacs
-does that when built with LessTif and Motif toolkits; on MS-Windows, the
-GUI version does that by default.
-
-  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 could not be created, or
-cannot be read, then you get an error, with an error message displayed
-in the echo area.
+  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.
 
   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.
-However, before doing so, it checks that the file itself has not changed
-since you visited or saved it last.  If the file has changed, a warning
-message is printed.  @xref{Interlocking,,Simultaneous Editing}.
+However, before doing so, it checks whether the file itself has changed
+since you visited or saved it last.  If the file has changed, Emacs offers
+to reread it.
+
+@vindex large-file-warning-threshold
+@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
+(@pxref{Buffers}).  If you try, Emacs will display an error message
+saying that the maximum buffer size has been exceeded.
+
+@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.
+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}.
 
 @cindex creating files
-  What if you want to create a new file?  Just visit it.  Emacs prints
-@samp{(New File)} in the echo area, but in other respects behaves as if
+  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.
 
@@ -226,7 +261,7 @@ 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 various different operating systems with
+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.
@@ -234,10 +269,10 @@ carriage-return linefeed or just carriage-return if appropriate.
 @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 delete,
-look at, 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.
+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.
 
   Files which are actually collections of other files, or @dfn{file
 archives}, are visited in special modes which invoke a Dired-like
@@ -248,22 +283,24 @@ Archives}, for more about these features.
 @vindex find-file-wildcards
   If the file name you specify contains shell-style wildcard
 characters, Emacs visits all the files that match it.  Wildcards
-comprise @samp{?}, @samp{*} and @samp{[@dots{}]} sequences.
-@xref{Quoted File Names}, for how to visit a file whose name actually
-contains wildcard characters.  You can disable the wildcard feature by
-customizing @code{find-file-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,
-Emacs makes the buffer read-only, so that you won't go ahead and make
-changes that you'll have trouble saving afterward.  You can make the
-buffer writable with @kbd{C-x C-q} (@code{vc-toggle-read-only}).
-@xref{Misc Buffer}.
+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
+saving afterward.  You can make the buffer writable with @kbd{C-x C-q}
+(@code{toggle-read-only}).  @xref{Misc Buffer}.
 
 @kindex C-x C-r
 @findex find-file-read-only
-  Occasionally you might want to visit a file as read-only in order to
-protect yourself from entering changes accidentally; do so by visiting
-the file with the command @kbd{C-x C-r} (@code{find-file-read-only}).
+  If you want to visit a file as read-only in order to protect
+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
@@ -271,13 +308,10 @@ the file with the command @kbd{C-x C-r} (@code{find-file-read-only}).
 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 it
-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.
-
-  If you find a file which exists but cannot be read, @kbd{C-x C-f}
-signals an error.
+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
@@ -297,7 +331,7 @@ seek.  This feature is available only when you are using a window
 system.  @xref{Frames}.
 
 @findex find-file-literally
-  If you wish to edit a file as a sequence of ASCII characters with no special
+  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
@@ -306,22 +340,20 @@ 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.
 
-@vindex find-file-hooks
-@vindex find-file-not-found-hooks
+@vindex find-file-hook
+@vindex find-file-not-found-functions
   Two special hook variables allow extensions to modify the operation of
 visiting files.  Visiting a file that does not exist runs the functions
-in the list @code{find-file-not-found-hooks}; this variable holds a list
+in the list @code{find-file-not-found-functions}; this variable holds a list
 of functions, and the functions are called one by one (with no
 arguments) until one of them returns non-@code{nil}.  This is not a
-normal hook, and the name ends in @samp{-hooks} rather than @samp{-hook}
+normal hook, and the name ends in @samp{-functions} rather than @samp{-hook}
 to indicate that fact.
 
-  Any visiting of a file, whether extant or not, expects
-@code{find-file-hooks} to contain a list of functions, and calls them
-all, one by one, with no arguments.  This variable is really a normal
-hook, but it has an abnormal name for historical compatibility.  In the
-case of a nonexistent file, the @code{find-file-not-found-hooks} are run
-first.  @xref{Hooks}.
+  Successful visiting of any file, whether existing or not, calls the
+functions in the list @code{find-file-hook}, with no arguments.
+This variable is a normal hook.  In the case of a nonexistent file, the
+@code{find-file-not-found-functions} are run first.  @xref{Hooks}.
 
   There are several ways to specify automatically the major mode for
 editing the file (@pxref{Choosing Modes}), and to specify local
@@ -333,16 +365,31 @@ variables defined for that file (@pxref{File Variables}).
   @dfn{Saving} a buffer in Emacs means writing its contents back into the file
 that was visited in the buffer.
 
+@menu
+* Save Commands::       Commands for saving files.
+* Backup::              How Emacs saves the old version of your file.
+* Customize Save::      Customizing the saving of files.
+* Interlocking::        How Emacs protects against simultaneous editing
+                          of one file by two users.
+* Shadowing: File Shadowing.  Copying files to "shadows" automatically.
+* Time Stamps::         Emacs can update time stamps on saved files.
+@end menu
+
+@node Save Commands
+@subsection Commands for Saving Files
+
+  These are the commands that relate to saving and writing files.
+
 @table @kbd
 @item C-x C-s
-Save the current buffer in its visited file (@code{save-buffer}).
+Save the current buffer in its visited file on disk (@code{save-buffer}).
 @item C-x s
 Save any or all buffers in their visited files (@code{save-some-buffers}).
 @item M-~
 Forget that the current buffer has been changed (@code{not-modified}).
 With prefix argument (@kbd{C-u}), mark the current buffer as changed.
 @item C-x C-w
-Save the current buffer in a specified file (@code{write-file}).
+Save the current buffer with a specified file name (@code{write-file}).
 @item M-x set-visited-file-name
 Change the file name under which the current buffer will be saved.
 @end table
@@ -390,6 +437,9 @@ about other buffers.
 View the buffer that you are currently being asked about.  When you exit
 View mode, you get back to @code{save-some-buffers}, which asks the
 question again.
+@item d
+Diff the buffer against its corresponding file, so you can see
+what changes you would be saving.
 @item C-h
 Display a help message about these options.
 @end table
@@ -411,30 +461,31 @@ saved.  (@samp{~} is often used as a mathematical symbol for `not'; thus
 a different file name, one which is not in use for anything important.
 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
+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.
+all the changes; but reverting is easier.)  You can also kill the buffer.
 
 @findex set-visited-file-name
   @kbd{M-x set-visited-file-name} alters the name of the file that the
 current buffer is visiting.  It reads the new file name using the
-minibuffer.  Then it specifies the visited file name and changes the
-buffer name correspondingly (as long as the new name is not in use).
-@code{set-visited-file-name} does not save the buffer in the newly
-visited file; it just alters the records inside Emacs in case you do
-save later.  It also marks the buffer as ``modified'' so that @kbd{C-x
-C-s} in that buffer @emph{will} save.
+minibuffer.  Then it marks the buffer as visiting that file name, and
+changes the buffer name correspondingly.  @code{set-visited-file-name}
+does not save the buffer in the newly visited file; it just alters the
+records inside Emacs in case you do save later.  It also marks the
+buffer as ``modified'' so that @kbd{C-x C-s} in that buffer
+@emph{will} save.
 
 @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 precisely
-equivalent to @code{set-visited-file-name} followed by @kbd{C-x C-s}.
+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).
 @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.
+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
@@ -446,23 +497,6 @@ notifies you of this fact, because it probably indicates a problem caused
 by simultaneous editing and requires your immediate attention.
 @xref{Interlocking,, Simultaneous Editing}.
 
-@vindex require-final-newline
-  If the value of the variable @code{require-final-newline} is @code{t},
-Emacs silently puts a newline at the end of any file that doesn't
-already end in one, every time a file is saved or written.  If the value
-is @code{nil}, Emacs leaves the end of the file unchanged; if it's
-neither @code{nil} nor @code{t}, Emacs asks you whether to add a
-newline.  The default is @code{nil}.
-
-@menu
-* Backup::              How Emacs saves the old version of your file.
-* Interlocking::        How Emacs protects against simultaneous editing
-                          of one file by two users.
-* Shadowing: File Shadowing.
-                        Copying files to "shadows" automatically.
-* Time Stamps::         Emacs can update time stamps on saved files.
-@end menu
-
 @node Backup
 @subsection Backup Files
 @cindex backup file
@@ -481,10 +515,13 @@ value is @code{t}, so that Emacs does write backup files.
 
   For files managed by a version control system (@pxref{Version
 Control}), the variable @code{vc-make-backup-files} determines whether
-to make backup files.  By default, it is @code{nil}, since backup files
+to make backup files.  By default it is @code{nil}, since backup files
 are redundant when you store all the previous versions in a version
 control system.  @xref{General VC Options}.
 
+  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.
+
 @vindex backup-enable-predicate
 @vindex temporary-file-directory
 @vindex small-temporary-file-directory
@@ -493,9 +530,6 @@ 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}.
 
-  At your option, Emacs can keep either a single backup file or a series of
-numbered backup files for each file that you edit.
-
   Emacs makes a backup for a file only the first time the file is saved
 from one buffer.  No matter how many times you save a file, its backup file
 continues to contain the contents from before the file was visited.
@@ -510,36 +544,71 @@ 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.
+newly saved contents if you save again.
 
 @menu
-* Names: Backup Names.         How backup files are named;
-                                 choosing single or numbered backup files.
+* 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
+
+@vindex version-control
+  The choice of single backup file or multiple numbered backup files
+is controlled by the variable @code{version-control}.  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.
+@item never
+Never make numbered backups; always make single backups.
+@end table
+
+@noindent
+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}.
+
+@cindex @env{VERSION_CONTROL} environment variable
+  If you set the environment variable @env{VERSION_CONTROL}, to tell
+various GNU utilities what to do with backup files, Emacs also obeys the
+environment variable by setting the Lisp variable @code{version-control}
+accordingly at startup.  If the environment variable's value is @samp{t}
+or @samp{numbered}, then @code{version-control} becomes @code{t}; if the
+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
 
-  If you choose to have a single backup file (this is the default),
-the backup file's 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~}.
+  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 behaviour by defining the variable
+  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
-@var{backup-directory-alist} to specify that files matching certain
+@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
+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.
 
@@ -556,40 +625,10 @@ through names like @file{eval.c.~259~} and beyond.  The variable
 @code{backup-directory-alist} applies to numbered backups just as
 usual.
 
-@vindex version-control
-  The choice of single backup or numbered backups is controlled by the
-variable @code{version-control}.  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.
-@item never
-Never make numbered backups; always make single backups.
-@end table
-
-@noindent
-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}.
-
-@cindex @env{VERSION_CONTROL} environment variable
-  If you set the environment variable @env{VERSION_CONTROL}, to tell
-various GNU utilities what to do with backup files, Emacs also obeys the
-environment variable by setting the Lisp variable @code{version-control}
-accordingly at startup.  If the environment variable's value is @samp{t}
-or @samp{numbered}, then @code{version-control} becomes @code{t}; if the
-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 Deletion
 @subsubsection Automatic Deletion of Backups
 
-  To prevent unlimited consumption of disk space, Emacs can delete numbered
+  To prevent excessive consumption of disk space, Emacs can delete numbered
 backup versions automatically.  Generally Emacs keeps the first few backups
 and the latest few backups, deleting any in between.  This happens every
 time a new backup is made.
@@ -598,17 +637,20 @@ time a new backup is made.
 @vindex kept-new-versions
   The two variables @code{kept-old-versions} and
 @code{kept-new-versions} control this deletion.  Their values are,
-respectively the number of oldest (lowest-numbered) backups to keep and
-the number of newest (highest-numbered) ones to keep, each time a new
-backup is made.  Recall that these values are used just after a new
-backup version is made; that newly made backup is included in the count
-in @code{kept-new-versions}.  By default, both variables are 2.
+respectively, the number of oldest (lowest-numbered) backups to keep
+and the number of newest (highest-numbered) ones to keep, each time a
+new backup is made.  The backups in the middle (excluding those oldest
+and newest) are the excess middle versions---those backups are
+deleted.  These variables' values are used when it is time to delete
+excess versions, just after a new backup version is made; the newly
+made backup is included in the count in @code{kept-new-versions}.  By
+default, both variables are 2.
 
 @vindex delete-old-versions
-  If @code{delete-old-versions} is non-@code{nil}, the excess
-middle versions are deleted without a murmur.  If it is @code{nil}, the
-default, then you are asked whether the excess middle versions should
-really be deleted.
+  If @code{delete-old-versions} is @code{t}, Emacs deletes the excess
+backup files silently.  If it is @code{nil}, the default, Emacs asks
+you whether it should delete the excess backup versions.  If it has
+any other value, then Emacs never automatically deletes backups.
 
   Dired's @kbd{.} (Period) command can also be used to delete old versions.
 @xref{Dired Deletion}.
@@ -616,12 +658,13 @@ really be deleted.
 @node Backup Copying
 @subsubsection Copying vs.@: Renaming
 
-  Backup files can be made by copying the old file or by renaming it.  This
-makes a difference when the old file has multiple names.  If the old file
-is renamed into the backup file, then the alternate names become names for
-the backup file.  If the old file is copied instead, then the alternate
-names remain names for the file that you are editing, and the contents
-accessed by those names will be the new contents.
+  Backup files can be made by copying the old file or by renaming it.
+This makes a difference when the old file has multiple names (hard
+links).  If the old file is renamed into the backup file, then the
+alternate names become names for the backup file.  If the old file is
+copied instead, then the alternate names remain names for the file
+that you are editing, and the contents accessed by those names will be
+the new contents.
 
   The method of making a backup file may also affect the file's owner
 and group.  If copying is used, these do not change.  If renaming is used,
@@ -653,7 +696,7 @@ change.  @code{backup-by-copying-when-mismatch} is @code{t} by default
 if you start Emacs as the superuser.  The fourth variable,
 @code{backup-by-copying-when-privileged-mismatch}, gives the highest
 numeric user-id for which @code{backup-by-copying-when-mismatch} will be
-forced on.  This is useful when low-numbered user-id are assigned to
+forced on.  This is useful when low-numbered user-ids are assigned to
 special system users, such as @code{root}, @code{bin}, @code{daemon},
 etc., which must maintain ownership of files.
 
@@ -665,6 +708,38 @@ typically break hard links, disconnecting the file name you visited from
 any alternate names for the same file.  This has nothing to do with
 Emacs---the version control system does it.
 
+@node Customize Save
+@subsection Customizing Saving of Files
+
+@vindex require-final-newline
+  If the value of the variable @code{require-final-newline} is
+@code{t}, saving or writing a file silently puts a newline at the end
+if there isn't already one there.  If the value is @code{visit}, Emacs
+adds a newline at the end of any file that doesn't have one, just
+after it visits the file.  (This marks the buffer as modified, and you
+can undo it.)  If the value is @code{visit-save}, that means to add
+newlines both on visiting and on saving.  If the value is @code{nil},
+Emacs leaves the end of the file unchanged; if it's neither @code{nil}
+nor @code{t}, Emacs asks you whether to add a newline.  The default is
+@code{nil}.
+
+@vindex mode-require-final-newline
+  Many major modes are designed for specific kinds of files that are
+always supposed to end in newlines.  These major modes set the
+variable @code{require-final-newline} according to
+@code{mode-require-final-newline}.  By setting the latter variable,
+you can control how these modes handle final newlines.
+
+@vindex write-region-inhibit-fsync
+  When Emacs saves a file, it invokes the @code{fsync} system call to
+force the data immediately out to disk.  This is important for safety
+if the system crashes or in case of power outage.  However, it can be
+disruptive on laptops using power saving, because it requires the disk
+to spin up each time you save a file.  Setting
+@code{write-region-inhibit-fsync} to a non-@code{nil} value disables
+this synchronization.  Be careful---this means increased risk of data
+loss.
+
 @node Interlocking
 @subsection Protection against Simultaneous Editing
 
@@ -706,8 +781,9 @@ and you gain the lock.
 @item p
 Proceed.  Go ahead and edit the file despite its being locked by someone else.
 @item q
-Quit.  This causes an error (@code{file-locked}) and the modification you
-were trying to make in the buffer does not actually take place.
+Quit.  This causes an error (@code{file-locked}), and the buffer
+contents remain unchanged---the modification you were trying to make
+does not actually take place.
 @end table
 
   Note that locking works on the basis of a file name; if a file has
@@ -732,7 +808,7 @@ 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
-prints a warning message and asks for confirmation before saving.
+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.
@@ -748,6 +824,7 @@ different name, and use @code{diff} to compare the two files.@refill
 @subsection Shadowing Files
 @cindex shadow files
 @cindex file shadows
+@findex shadow-initialize
 
 @table @kbd
 @item M-x shadow-initialize
@@ -774,9 +851,9 @@ it will copy the file you edited to the other files in its group.  You
 can also do the copying without exiting Emacs, by typing @kbd{M-x
 shadow-copy-files}.
 
-To set up a file group, use @kbd{M-x shadow-define-literal-group} or
-@kbd{M-x shadow-define-regexp-group}.  See their documentation strings
-for further information.
+To set up a shadow file group, use @kbd{M-x
+shadow-define-literal-group} or @kbd{M-x shadow-define-regexp-group}.
+See their documentation strings for further information.
 
 Before copying a file to its shadows, Emacs asks for confirmation.
 You can answer ``no'' to bypass copying of this file, this time.  If
@@ -787,18 +864,17 @@ A @dfn{shadow cluster} is a group of hosts that share directories, so
 that copying to or from one of them is sufficient to update the file
 on all of them.  Each shadow cluster has a name, and specifies the
 network address of a primary host (the one we copy files to), and a
-regular expression that matches the hostnames of all the other hosts
+regular expression that matches the host names of all the other hosts
 in the cluster.  You can define a shadow cluster with @kbd{M-x
 shadow-define-cluster}.
 
 @node Time Stamps
 @subsection Updating Time Stamps Automatically
-@findex time-stamp
 @cindex time stamps
 @cindex modification dates
 @cindex locale, date format
 
-You can arrange put a time stamp in a file, so that it will be updated
+You can arrange to put a time stamp in a file, so that it will be updated
 automatically each time you edit and save the file.  The time stamp
 has to be in the first eight lines of the file, and you should
 insert it like this:
@@ -811,11 +887,12 @@ Time-stamp: <>
 or like this:
 
 @example
-Time-stamp: ""
+Time-stamp: " "
 @end example
 
+@findex time-stamp
   Then add the hook function @code{time-stamp} to the hook
-@code{write-file-hooks}; that hook function will automatically update
+@code{before-save-hook}; that hook function will automatically update
 the time stamp, inserting the current date and time when you save the
 file.  You can also use the command @kbd{M-x time-stamp} to update the
 time stamp manually.  For other customizations, see the Custom group
@@ -826,6 +903,7 @@ formatted according to your locale setting (@pxref{Environment}).
 @section Reverting a Buffer
 @findex revert-buffer
 @cindex drastic changes
+@cindex reread a file
 
   If you have made extensive changes to a file and then change your mind
 about them, you can get rid of them by reading in the previous version
@@ -833,11 +911,10 @@ of the file.  To do this, use @kbd{M-x revert-buffer}, which operates on
 the current buffer.  Since reverting a buffer unintentionally could lose
 a lot of work, you must confirm this command with @kbd{yes}.
 
-  @code{revert-buffer} keeps point at the same distance (measured in
-characters) from the beginning of the file.  If the file was edited only
-slightly, you will be at approximately the same piece of text after
-reverting as before.  If you have made drastic changes, the same value of
-point in the old file may address a totally different piece of text.
+  @code{revert-buffer} tries to position point in such a way that, if
+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.
@@ -861,6 +938,39 @@ 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
 discard your changes.)
 
+@cindex Global Auto-Revert mode
+@cindex mode, Global Auto-Revert
+@cindex Auto-Revert mode
+@cindex mode, Auto-Revert
+@findex global-auto-revert-mode
+@findex auto-revert-mode
+@findex auto-revert-tail-mode
+
+  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.
+
+  You can use Auto-Revert mode 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.
+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.
+
 @node Auto Save
 @section Auto-Saving: Protection Against Disasters
 @cindex Auto Save mode
@@ -872,13 +982,13 @@ your keystrokes) without being asked.  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, each buffer is
-considered, and is auto-saved if auto-saving is turned on for it and it
-has been changed since the last time it was auto-saved.  The message
-@samp{Auto-saving...} is displayed in the echo area during auto-saving,
-if any files are actually auto-saved.  Errors occurring during
-auto-saving are caught so that they do not interfere with the execution
-of commands you have been typing.
+  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
+and it has been changed since the last time it was auto-saved.  The
+message @samp{Auto-saving...} is displayed in the echo area during
+auto-saving, if any files are actually auto-saved.  Errors occurring
+during auto-saving are caught so that they do not interfere with the
+execution of commands you have been typing.
 
 @menu
 * Files: Auto Save Files.       The file where auto-saved changes are
@@ -902,32 +1012,44 @@ front and rear of the visited file name.  Thus, a buffer visiting file
 @file{foo.c} is auto-saved in a file @file{#foo.c#}.  Most buffers that
 are not visiting files are auto-saved only if you request it explicitly;
 when they are auto-saved, the auto-save file name is made by appending
-@samp{#%} to the front and @samp{#} to the rear of buffer name.  For
+@samp{#} to the front and rear of buffer name, then
+adding digits and letters at the end for uniqueness.  For
 example, the @samp{*mail*} buffer in which you compose messages to be
-sent is auto-saved in a file named @file{#%*mail*#}.  Auto-save file
+sent might be auto-saved in a file named @file{#*mail*#704juu}.  Auto-save file
 names are made this way unless you reprogram parts of Emacs to do
 something different (the functions @code{make-auto-save-file-name} and
 @code{auto-save-file-name-p}).  The file name to be used for auto-saving
 in a buffer is calculated when auto-saving is turned on in that buffer.
 
+@cindex auto-save for remote files
+@vindex auto-save-file-name-transforms
+  The variable @code{auto-save-file-name-transforms} allows a degree
+of control over the auto-save file name.  It lets you specify a series
+of regular expressions and replacements to transform the auto save
+file name.  The default value puts the auto-save files for remote
+files (@pxref{Remote Files}) into the temporary file directory on the
+local machine.
+
   When you delete a substantial part of the text in a large buffer, auto
 save turns off temporarily in that buffer.  This is because if you
 deleted the text unintentionally, you might find the auto-save file more
 useful if it contains the deleted text.  To reenable auto-saving after
 this happens, save the buffer with @kbd{C-x C-s}, or use @kbd{C-u 1 M-x
-auto-save}.
+auto-save-mode}.
 
 @vindex auto-save-visited-file-name
-  If you want auto-saving to be done in the visited file, set the variable
-@code{auto-save-visited-file-name} to be non-@code{nil}.  In this mode,
-there is really no difference between auto-saving and explicit saving.
+  If you want auto-saving to be done in the visited file rather than
+in a separate auto-save file, set the variable
+@code{auto-save-visited-file-name} to a non-@code{nil} value.  In this
+mode, there is no real difference between auto-saving and explicit
+saving.
 
 @vindex delete-auto-save-files
   A buffer's auto-save file is deleted when you save the buffer in its
-visited file.  To inhibit this, set the variable @code{delete-auto-save-files}
-to @code{nil}.  Changing the visited file name with @kbd{C-x C-w} or
-@code{set-visited-file-name} renames any auto-save file to go with
-the new visited name.
+visited file.  (You can inhibit this by setting the variable
+@code{delete-auto-save-files} to @code{nil}.)  Changing the visited
+file name with @kbd{C-x C-w} or @code{set-visited-file-name} renames
+any auto-save file to go with the new visited name.
 
 @node Auto Save Control
 @subsection Controlling Auto-Saving
@@ -947,7 +1069,9 @@ zero or negative argument; with no argument, it toggles.
   Emacs does auto-saving periodically based on counting how many characters
 you have typed since the last time auto-saving was done.  The variable
 @code{auto-save-interval} specifies how many characters there are between
-auto-saves.  By default, it is 300.
+auto-saves.  By default, it is 300.  Emacs doesn't accept values that are
+too small: if you customize @code{auto-save-interval} to a value less
+than 20, Emacs will behave as if the value is 20.
 
 @vindex auto-save-timeout
   Auto-saving also takes place when you stop typing for a while.  The
@@ -1010,15 +1134,17 @@ this---saving them---updates the files themselves.
 
 @vindex auto-save-list-file-prefix
   Emacs records interrupted sessions for later recovery in files named
-@file{~/.emacs.d/auto-save-list/.saves-@var{pid}-@var{hostname}}.  The
-@samp{~/.emacs.d/auto-save-list/.saves-} portion of these names comes
-from the value of @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.
+@file{~/.emacs.d/auto-save-list/.saves-@var{pid}-@var{hostname}}.  All
+of this name except @file{@var{pid}-@var{hostname}} comes from the
+value of @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.
 
 @node File Aliases
 @section File Name Aliases
+@cindex symbolic links (visiting)
+@cindex hard links (visiting)
 
   Symbolic links and hard links both make it possible for several file
 names to refer to the same file.  Hard links are alternate names that
@@ -1029,18 +1155,20 @@ either name to refer to the file, but @file{bar} is the real name, while
 @file{foo} is just an alias.  More complex cases occur when symbolic
 links point to directories.
 
-  If you visit two names for the same file, normally Emacs makes
-two different buffers, but it warns you about the situation.
+@vindex find-file-existing-other-name
+@vindex find-file-suppress-same-file-warnings
 
-@vindex find-file-existing-other-name 
   Normally, if you visit a file which Emacs is already visiting under
 a different name, Emacs displays a message in the echo area and uses
 the existing buffer visiting that file.  This can happen on systems
-that support symbolic links, or if you use a long file name on a
-system that truncates long file names.  You can disable this feature
-by setting the variable @code{find-file-existing-other-name} to
-@code{nil}.  Then if you visit the same file under two different names,
-you get a separate buffer for each file name.
+that support hard or symbolic links, or if you use a long file name on
+a system that truncates long file names, or on a case-insensitive file
+system.  You can suppress the message by setting the variable
+@code{find-file-suppress-same-file-warnings} to a non-@code{nil}
+value.  You can disable this feature entirely by setting the variable
+@code{find-file-existing-other-name} to @code{nil}: then if you visit
+the same file under two different names, you get a separate buffer for
+each file name.
 
 @vindex find-file-visit-truename
 @cindex truenames of files
@@ -1058,20 +1186,25 @@ implies the effect of @code{find-file-existing-other-name}.
   @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 
+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.  It allows you to
-use various version control systems from within
-Emacs---currently, it supports RCS, CVS, and SCCS.  The GNU
-project recommends RCS and CVS, which are free software and available
-from the Free Software Foundation.  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.
+  The Emacs version control interface is called VC.  Its commands work
+with different version control systems---currently, it supports CVS,
+GNU Arch, RCS, Meta-CVS, Subversion, and SCCS.  Of these, the GNU
+project distributes CVS, GNU Arch, and RCS; we recommend that you use
+either CVS or GNU Arch for your projects, and RCS for individual
+files.  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}
+(@pxref{Customizing VC}).
 
 @menu
 * Introduction to VC::  How version control works in general.
-* VC Mode Line::     How the mode line shows version control status.
+* VC Mode Line::        How the mode line shows version control status.
 * Basic VC Editing::    How to edit a file under version control.
 * Old Versions::        Examining and comparing old versions.
 * Secondary VC Commands::    The commands used a little less frequently.
@@ -1098,36 +1231,73 @@ you want to use.
 @menu
 * Version Systems::  Supported version control back-end systems.
 * VC Concepts::      Words and concepts related to version control.
+* Types of Log File::    The per-file VC log in contrast to the ChangeLog.
 @end menu
 
 @node Version Systems
 @subsubsection Supported Version Control Systems
 
-@cindex RCS
 @cindex back end (version control)
-  VC currently works with three different version control systems or
-``back ends'': RCS, CVS, and SCCS.
-
-  RCS is a free version control system that is available from the Free
-Software Foundation.  It is perhaps the most mature of the supported
-back ends, and the VC commands are conceptually closest to RCS.  Almost
-everything you can do with RCS can be done through VC.
+  VC currently works with six different version control systems or
+``back ends'': CVS, GNU Arch, RCS, Meta-CVS, Subversion, and SCCS.
 
 @cindex CVS
-  CVS is built on top of RCS, and extends the features of RCS, allowing
-for more sophisticated release management, and concurrent multi-user
-development.  VC supports 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.
+  CVS is a free version control system that is used for the majority
+of free software projects today.  It allows concurrent multi-user
+development either locally or over the network.  Some of its
+shortcomings, corrected by newer systems such as 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 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, and
+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 RCS
+  RCS is the free version control system around which VC was initially
+built.  The VC commands are therefore conceptually closest to RCS.
+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 SVN
+@cindex Subversion
+  Subversion is a free version control system designed to be similar
+to CVS but without CVS's problems.  Subversion supports atomic commits,
+and versions directories, symbolic links, meta-data, renames, copies,
+and deletes.  It can be used via http or via its own protocol.
+
+@cindex MCVS
+@cindex Meta-CVS
+  Meta-CVS is another attempt to solve problems arising in CVS.  It
+supports directory structure versioning, improved branching and
+merging, and use of symbolic links and meta-data in repositories.
 
 @cindex SCCS
   SCCS is a proprietary but widely used version control system.  In
-terms of capabilities, it is the weakest of the three that VC
-supports.  VC compensates for certain features missing in SCCS
-(snapshots, for example) by implementing them itself, but some other VC
-features, such as multiple branches, are not available with SCCS.  You
-should use SCCS only if for some reason you cannot use RCS.
+terms of capabilities, it is the weakest of the six that VC supports.
+VC compensates for certain features missing in SCCS (snapshots, for
+example) by implementing them itself, but some other VC features, such
+as multiple branches, are not available with SCCS.  Since SCCS is
+non-free, not respecting its users freedom,d, you should not use it;
+use its free replacement CSSC instead.  But you should use CSSC only
+if for some reason you cannot use RCS, or one of the higher-level
+systems such as CVS or GNU Arch.
+
+In the following, we discuss mainly RCS, SCCS and CVS.  Nearly
+everything said about CVS applies to GNU Arch, Subversion and Meta-CVS
+as well.
 
 @node VC Concepts
 @subsubsection Concepts of Version Control
@@ -1182,6 +1352,38 @@ at any time, but requires merging with changes from other users at
 check-in time.  However, CVS can also be set up to require locking.
 (@pxref{CVS Options}).
 
+@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 per-file 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}.
+
+  A project maintained with version control can use just the per-file
+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} (@pxref{Change Logs and VC}).
+
 @node VC Mode Line
 @subsection Version Control and the Mode Line
 
@@ -1196,6 +1398,18 @@ 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
 
@@ -1203,56 +1417,55 @@ instance, @samp{jim}), that is displayed as @samp{RCS:jim:1.3}.
 either locking or check-in, depending on the situation.
 
 @table @kbd
-@item C-x C-q
 @itemx C-x v v
 Perform the next logical version control operation on this file.
 @end table
 
 @findex vc-next-action
-@findex vc-toggle-read-only
 @kindex C-x v v
-@kindex C-x C-q @r{(Version Control)}
-  Strictly speaking, the command for this job is @code{vc-next-action},
-bound to @kbd{C-x v v}.  However, the normal meaning of @kbd{C-x C-q} is
-to make a read-only buffer writable, or vice versa; we have extended it
-to do the same job properly for files managed by version control, by
-performing the appropriate version control operations.  When you type
-@kbd{C-x C-q} on a registered file, it acts like @kbd{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 not.  SCCS and
 RCS normally use locking; CVS normally does not use locking.
 
+@findex vc-toggle-read-only
+@kindex C-x C-q @r{(Version Control)}
+  As a special convenience that is particularly useful for files with
+locking, you can let Emacs check a file in or out whenever you change
+its read-only flag.  This means, for example, that you cannot
+accidentally edit a file without properly checking it out first.  To
+achieve this, bind the key @kbd{C-x C-q} to @kbd{vc-toggle-read-only}
+in your @file{~/.emacs} file.  (@xref{Init Rebinding}.)
+
 @menu
 * VC with Locking::     RCS in its default mode, SCCS, and optionally CVS.
 * Without Locking::     Without locking: default mode for CVS.
-* Extended Actions::    Avanced features available with a prefix argument.
+* Advanced C-x v v::    Advanced features available with a prefix argument.
 * Log Buffer::          Features available in log entry buffers.
 @end menu
-               
-@node VC with Locking                 
+
+@node VC with Locking
 @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 C-q} can either lock a file or check it in:
+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 C-q} locks it, and
+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 C-q} checks
+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 version.  @xref{Log Buffer}.
 
 @item
 If the file is locked by you, but you have not changed it since you
-locked it, @kbd{C-x C-q} releases the lock and makes the file read-only
+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 C-q} asks you whether
+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.
@@ -1270,25 +1483,25 @@ 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 C-q} does when using CVS:
+  Here is what @kbd{C-x v v} does when using CVS:
 
 @itemize @bullet
 @item
-If some other user has checked in changes into the master file,
-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 master file
-@emph{without} trying to commit your own changes, type @kbd{C-x v m RET}.)
+If some other user has checked in changes into the master file, 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 master file @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 master file, but you have made
-modifications in your work file, @kbd{C-x C-q} checks in your changes.
+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 version.
 @xref{Log Buffer}.
 
 @item
-If the file is not modified, the @kbd{C-x C-q} does nothing.
+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
@@ -1298,46 +1511,75 @@ 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 version (though they will
 remain in the master file, so they will not be entirely lost).  You must
-therefore verify the current version is unchanged, before you check in your
-changes.  We hope to eliminate this risk and provide automatic merging
-with RCS in a future Emacs version.
+therefore verify that the current version is unchanged, before you
+check in your changes.  We hope to eliminate this risk and provide
+automatic merging with RCS in a future Emacs version.
 
   In addition, locking is possible with RCS even in this mode, although
-it is not required; @kbd{C-x C-q} with an unmodified file locks the
+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.
 
-@node Extended Actions
-@subsubsection Calling @code{vc-next-action} with a Prefix Argument
+@node Advanced C-x v v
+@subsubsection Advanced Control in @kbd{C-x v v}
 
-When you give a prefix argument to @code{vc-next-action} (@kbd{C-u C-x
-C-q}), it still performs the next logical version control operation, but
-in an extended sense.
+@cindex version number 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 version
-number that should be used for check-in.  This is also one way to create
-a new branch (@pxref{Branches}).
-
-@item If the file is not modified (and unlocked), you can specify a new
-version to go to; this lets you start working from an older version, or
-on another branch.  If you do not enter any version, that takes you to
-the highest version on the current branch; therefore @kbd{C-u C-x C-q
-RET} is a convenient way to get the latest version of a file from the
-repository.
-
-@item Regardless of the state of the file, you can also enter the name
-of another version control system instead of a version number.  This
-lets you use more than one version control system for a file
-(@pxref{Local Version Control}).
+@item
+If the file is modified (or locked), you can specify the version
+number 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
+version to select; this lets you start working from an older version,
+or on another branch.  If you do not enter any version, that takes you
+to the highest version 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 version number, 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 (@pxref{Local
+Version Control}).
 @end itemize
 
 @node Log Buffer
 @subsubsection Features of the Log Entry Buffer
 
-  When you check in changes, @kbd{C-x C-q} first reads a log entry.  It
+  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.
-When you are finished, type @kbd{C-c C-c} in the @samp{*VC-Log*} buffer.
-That is when check-in really happens.
+
+  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 writing entries in the @file{ChangeLog}
+(@pxref{Change Log}) and then commit 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.
+@xref{Change Logs and VC}, 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 Dired
+mode or PCL-CVS.  @xref{VC Dired Mode}, 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
@@ -1376,12 +1618,12 @@ of the file.
 Compare the specified two versions of @var{file}.
 
 @item C-x v g
-Display the result of the CVS annotate command using colors.
+Display the file with per-line version information and using colors.
 @end table
 
 @findex vc-version-other-window
 @kindex C-x v ~
-  To examine an old version in toto, visit the file and then type
+  To examine an old version in its entirety, visit the file and then type
 @kbd{C-x v ~ @var{version} @key{RET}} (@code{vc-version-other-window}).
 This puts the text of version @var{version} in a file named
 @file{@var{filename}.~@var{version}~}, and visits it in its own buffer
@@ -1393,43 +1635,93 @@ and create a branch from it.  @xref{Branches}.)
   It is usually more convenient to compare two versions of the file,
 with the command @kbd{C-x v =} (@code{vc-diff}).  Plain @kbd{C-x v =}
 compares the current buffer contents (saving them in the file if
-necessary) with the last checked-in version of the file.  @kbd{C-u C-x v
-=}, with a numeric argument, reads a file name and two version numbers,
-then compares those versions of the specified file.
-
-  If you supply a directory name instead of the name of a registered
-file, this command compares the two specified versions of all registered
-files in that directory and its subdirectories.
+necessary) with the last checked-in version of the file.  @kbd{C-u C-x
+v =}, with a numeric argument, reads a file name and two version
+numbers, then compares those versions of the specified file.  Both
+forms display the output in a special buffer in another window.
 
   You can specify a checked-in version by its number; an empty input
 specifies the current contents of the work file (which may be different
 from all the checked-in versions).  You can also specify a snapshot name
 (@pxref{Snapshots}) instead of one or both version numbers.
 
-@vindex diff-switches
+  If you supply a directory name instead of the name of a registered
+file, this command compares the two specified versions of all registered
+files in that directory and its subdirectories.
+
 @vindex vc-diff-switches
-  This command works by running a variant of the @code{diff} utility
-that is specific to the version control system in use.  Emacs passes the
-contents of the variable @code{diff-switches} to that utility; you can
-define specific options for version control in @code{vc-diff-switches},
-and there are similar variables for each specific system,
-e.g. @code{vc-rcs-diff-switches}, and the like.
-
-  The output of the @code{diff} command is displayed in a special buffer
-in another window.  Unlike the @kbd{M-x diff} command, @kbd{C-x v =}
-does not try to locate the changes in the old and new versions.  This is
-because normally one or both versions do not exist as files when you
-compare them; they exist only in the records of the master file.
+@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.
+
+  Unlike the @kbd{M-x diff} command, @kbd{C-x v =} does not try to
+locate the changes in the old and new versions.  This is because
+normally one or both versions do not exist as files when you compare
+them; they exist only in the records of the master file.
 @xref{Comparing Files}, for more information about @kbd{M-x diff}.
 
 @findex vc-annotate
 @kindex C-x v g
-  For CVS-controlled files, you can display the result of the CVS
-annotate command, using colors to enhance the visual appearance.  Use
-the command @kbd{M-x vc-annotate} to do this.  Red means new, blue means
-old, and intermediate colors indicate intermediate ages.  A prefix
-argument @var{n} specifies a stretch factor for the time scale; it makes
-each color cover a period @var{n} times as long.
+  For some backends, you can display the file @dfn{annotated} with
+per-line version information and using colors to enhance the visual
+appearance, with the command @kbd{M-x vc-annotate}.
+It 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 time scale is 360 days, so that
+everything more than one year old is shown in blue.
+
+  When you give a prefix argument to this command, it uses the
+minibuffer to read two arguments: which version number to display and
+annotate (instead of the current file contents), and a stretch factor
+for the time scale.  A stretch factor of 0.1 means that the color
+range from red to blue spans the past 36 days instead of 360 days.  A
+stretch factor greater than 1 means the color range spans more than a
+year.
+
+  From the annotate buffer, you can 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 workfile version--the one you are editing.  If you used
+@kbd{P} and @kbd{N} to browse to other revisions, use this key to
+return to the latest version.
+@end table
 
 @node Secondary VC Commands
 @subsection The Secondary Commands of VC
@@ -1440,8 +1732,8 @@ use once a day.
 @menu
 * Registering::         Putting a file under version control.
 * VC Status::           Viewing the VC status of files.
-* VC Undo::             Cancelling changes before or after check-in.
-* VC Dired Mode::       Listing files managed by version control. 
+* VC Undo::             Canceling changes before or after check-in.
+* VC Dired Mode::       Listing files managed by version control.
 * VC Dired Commands::   Commands to use in a VC Dired buffer.
 @end menu
 
@@ -1462,23 +1754,22 @@ Register the visited file for version control.
 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 @var{vc-handled-backends} (@pxref{Customizing VC}).
+that appears first in @code{vc-handled-backends} (@pxref{Customizing VC}).
 On the other hand, if there are no files already registered,
-Emacs uses the first system from @var{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 @var{vc-handled-backends}, this means that
-Emacs uses RCS if there are any files under RCS control, and CVS if
-there are any files under CVS.  If there are no files under version
-control, RCS is used.
+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 C-q} if you wish to start editing it.  After
+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
-version by typing @kbd{C-x C-q}.
+version by typing @kbd{C-x v v}.  Until you do that, the version
+appears as @samp{@@@@} in the mode line.
 
 @vindex vc-default-init-version
+@cindex initial version number to register
   The initial version number for a newly registered file is 1.1, by
 default.  You can specify a different default by setting the variable
 @code{vc-default-init-version}, or you can give @kbd{C-x v i} a numeric
@@ -1503,7 +1794,46 @@ Display version control state and change history.
   To view the detailed version 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.
+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 (@pxref{VC Dired Mode}).  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 (@pxref{VC Dired Mode}).  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 number (@pxref{Old Versions}).
+
+@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
@@ -1658,7 +1988,8 @@ marked files, so that you can lock or check in several files at once.
 If it operates on more than one file, it handles each file according to
 its current state; thus, it might lock one file, but check in another
 file.  This could be confusing; it is up to you to avoid confusing
-behavior by marking a set of files that are in a similar state.
+behavior by marking a set of files that are in a similar state.  If no
+files are marked, @kbd{v v} operates on the file in the current line.
 
   If any files call for check-in, @kbd{v v} reads a single log entry,
 then uses it for all the files being checked in.  This is convenient for
@@ -1669,7 +2000,7 @@ change.
 @findex vc-dired-mark-locked
   You can toggle between terse display (only locked files, or files not
 up-to-date) and full display at any time by typing @kbd{v t}
-@code{vc-dired-toggle-terse-mode}.  There is also a special command
+(@code{vc-dired-toggle-terse-mode}).  There is also a special command
 @kbd{* l} (@code{vc-dired-mark-locked}), which marks all files currently
 locked (or, with CVS, all files not up-to-date).  Thus, typing @kbd{* l
 t k} is another way to delete from the buffer all files except those
@@ -1686,8 +2017,7 @@ 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 only supported for RCS at the
-moment.
+Please note, however, that branches are not supported for SCCS.
 
   A file's main line of development is usually called the @dfn{trunk}.
 The versions on the trunk are normally numbered 1.1, 1.2, 1.3, etc.  At
@@ -1707,14 +2037,14 @@ example above have branch numbers 1.2.1 and 1.2.2.
 * 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 
+* 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 C-q} and specify the
+  To switch between branches, type @kbd{C-u C-x v v} and specify the
 version number you want to select.  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
@@ -1722,7 +2052,7 @@ locked.
 
   You can omit the minor version number, thus giving only the branch
 number; this takes you to the head version on the chosen branch.  If you
-only type @kbd{RET}, Emacs goes to the highest version on the trunk.
+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
@@ -1733,8 +2063,8 @@ other branch.
 
   To create a new branch from a head version (one that is the latest in
 the branch that contains it), first select that version if necessary,
-lock it with @kbd{C-x C-q}, and make whatever changes you want.  Then,
-when you check in the changes, use @kbd{C-u C-x C-q}.  This lets you
+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 version number for the new version.  You should specify a
 suitable branch number for a branch starting at the current version.
 For example, if the current version is 2.5, the branch number should be
@@ -1743,12 +2073,12 @@ that point.
 
   To create a new branch at an older version (one that is no longer the
 head of a branch), first select that version (@pxref{Switching
-Branches}), then lock it with @kbd{C-x C-q}.  You'll be asked to
+Branches}), then lock it with @kbd{C-x v v}.  You'll be asked to
 confirm, when you lock the old version, that you really mean to create a
 new branch---if you say no, you'll be offered a chance to lock the
 latest version instead.
 
-  Then make your changes and type @kbd{C-x C-q} again to check in a new
+  Then make your changes and type @kbd{C-x v v} again to check in a new
 version.  This automatically creates a new branch starting from the
 selected version.  You need not specially request a new branch, because
 that's the only way to add a new version at a point that is not the head
@@ -1757,7 +2087,7 @@ of a branch.
   After the branch is created, you ``stay'' on it.  That means that
 subsequent check-ins create new versions on that branch.  To leave the
 branch, you must explicitly select a different version with @kbd{C-u C-x
-C-q}.  To transfer changes from one branch to another, use the merge
+v v}.  To transfer changes from one branch to another, use the merge
 command, described in the next section.
 
 @node Merging
@@ -1781,23 +2111,23 @@ Merge changes into the work file.
   @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
-@kbd{RET}, Emacs merges any changes that were made on the same branch
+@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 number or a pair of version numbers in
-the minibuffer.  Then it finds the changes from that branch, or between
-the two versions you specified, and merges them into the current version
-of the current file.
+the minibuffer.  Then @kbd{C-x v m} finds the changes from that
+branch, or the differences between the two versions you specified, and
+merges them into the current version 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 version 1.5.  To merge the changes from the branch to the trunk,
-first go to the head version of the trunk, by typing @kbd{C-u C-x C-q
-RET}.  Version 1.5 is now current.  If locking is used for the file,
-type @kbd{C-x C-q} to lock version 1.5 so that you can change it.  Next,
-type @kbd{C-x v m 1.3.1 RET}.  This takes the entire set of changes on
+first go to the head version of the trunk, by typing @kbd{C-u C-x v v
+@key{RET}}.  Version 1.5 is now current.  If locking is used for the file,
+type @kbd{C-x v v} to lock version 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 version 1.3, where the branch started, up to
 the last version on the branch) and merges it into the current version
 of the work file.  You can now check in the changed file, thus creating
@@ -1839,7 +2169,8 @@ master file version with user B's changes in it is 1.11.
 @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.
+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
@@ -1859,7 +2190,7 @@ 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 C-q} and specify the correct
+first find the file, then type @kbd{C-u C-x v v} and specify the correct
 branch number.  This ensures that Emacs knows which branch it is using
 during this particular editing session.
 
@@ -1867,16 +2198,15 @@ during this particular editing session.
 @subsection Remote Repositories
 @cindex remote repositories (CVS)
 
-Many projects set up a central CVS repository somewhere in the Internet,
-and let each user check out a personal working copy of the files to
-his local machine.  Committing changes to the repository, and picking
-up changes from other users into one's own working area, then works by
-direct interactions with the CVS server.  
+  A common way of using CVS is to set up a central CVS repository on
+some Internet host, then have each developer check out a personal
+working copy of the files on his local machine.  Committing changes to
+the repository, and picking up changes from other users into one's own
+working area, then works by direct interactions with the CVS server.
 
-The problem is that access to the CVS server is often slow, and that
-developers might need to work offline as well.  VC therefore offers
-some features that allow you to keep network interactions to a
-minimum.
+  One difficulty is that access to the CVS server is often slow, and
+that developers might need to work off-line as well.  VC is designed
+to reduce the amount of network interaction necessary.
 
 @menu
 * Version Backups::        Keeping local copies of repository versions.
@@ -1887,45 +2217,50 @@ minimum.
 @subsubsection Version Backups
 @cindex version backups
 
-When VC sees that the CVS repository for a file is on a remote machine,
-it automatically makes local backups of unmodified versions of the file.
-This means that you can compare the file to the repository version
-(@kbd{C-x v =}), or revert to that version (@kbd{C-x v u}), without any
-network interactions.
-
-The local copy of the unmodified file is called a @dfn{version backup}.
-This is to indicate that it corresponds exactly to a version that is
-stored in the repository.  Note that version backups are related to,
-but distinct from the other kinds of backups that Emacs can make:
-single backups and numbered backups (@pxref{Backup}).
-
-@vindex vc-cvs-stay-local
-For a file that comes from a remote CVS repository, VC makes a version
-backup whenever you save the first changes to the file, and removes it
-after you have committed your modified version to the repository.  (You
-can switch this off by setting the variable @code{vc-cvs-stay-local} to
-@code{nil}.)
-
 @cindex automatic version backups
+  When VC sees that the CVS repository for a file is on a remote
+machine, it automatically makes local backups of unmodified versions
+of the file---@dfn{automatic version backups}.  This means that you
+can compare the file to the repository version (@kbd{C-x v =}), or
+revert to that version (@kbd{C-x v u}), without any network
+interactions.
+
+  The local copy of the unmodified file is called a @dfn{version
+backup} to indicate that it corresponds exactly to a version that is
+stored in the repository.  Note that version backups are not the same
+as ordinary Emacs backup files (@pxref{Backup}).  But they follow a
+similar naming convention.
+
+  For a file that comes from a remote CVS repository, VC makes a
+version backup whenever you save the first changes to the file, and
+removes it after you have committed your modified version to the
+repository. You can disable the making of automatic version backups by
+setting @code{vc-cvs-stay-local} to @code{nil} (@pxref{CVS Options}).
+
 @cindex manual version backups
-The name of a version backup for a file named @var{file}, with version
-@var{version}, is @code{@var{file}.~@var{version}.~}.  Note that this
-naming convention is almost the same as that used by @kbd{C-x v ~}
-(@pxref{Old Versions}), the only difference being the additional dot
-(@samp{.}) after the version number.  This similarity is intentional,
-because both kinds of files store the same kind of information.  To
-distinguish between them, we speak of @dfn{automatic version backups}
-(those created by the mechanism described here) and @dfn{manual version
-backups} (created by @kbd{C-x v ~}).  Their primary difference is that
-Emacs deletes automatic version backups when you commit to the
-repository (this is why the trailing dot is needed to identify them),
-while manual version backups are never deleted automatically.
-
-Each of the two mechanisms can use the files created by the other one.
-For example, if you changed a file outside of Emacs, so that no
-automatic version backup was created, you can create a manual backup of
-that version using @kbd{C-x v ~}.  Emacs will then use that file for
-local diff and revert operations.
+  The name of the automatic version backup for version @var{version}
+of file @var{file} is @code{@var{file}.~@var{version}.~}.  This is
+almost the same as the name used by @kbd{C-x v ~} (@pxref{Old
+Versions}), the only difference being the additional dot (@samp{.})
+after the version number.  This similarity is intentional, because
+both kinds of files store the same kind of information.  The file made
+by @kbd{C-x v ~} acts as a @dfn{manual version backup}.
+
+  All the VC commands that operate on old versions of a file can use
+both kinds of version backups.  For instance, @kbd{C-x v ~} uses
+either an automatic or a manual version backup, if possible, to get
+the contents of the version you request.  Likewise, @kbd{C-x v =} and
+@kbd{C-x v u} use either an automatic or a manual version backup, if
+one of them exists, to get the contents of a version to compare or
+revert to.  If you changed a file outside of Emacs, so that no
+automatic version backup was created for the previous text, you can
+create a manual backup of that version using @kbd{C-x v ~}, and thus
+obtain the benefit of the local copy for Emacs commands.
+
+  The only difference in Emacs's handling of manual and automatic
+version backups, once they exist, is that Emacs deletes automatic
+version backups when you commit to the repository.  By contrast,
+manual version backups remain until you delete them.
 
 @node Local Version Control
 @subsubsection Local Version Control
@@ -1945,27 +2280,26 @@ that the remote system is CVS, and you use RCS locally, although the
 mechanism works with any combination of version control systems
 (@dfn{back ends}).
 
-To make it work with other back ends, you must make sure that the "more
-local" back end comes before the "more remote" back end in the setting
-of @var{vc-handled-backends} (@pxref{Customizing VC}).  By default, this
-variable is set up correctly so that you can use RCS and CVS as
-described here.
+To make it work with other back ends, you must make sure that the
+``more local'' back end comes before the ``more remote'' back end in
+the setting of @code{vc-handled-backends} (@pxref{Customizing VC}).  By
+default, this variable is set up so that you can use remote CVS and
+local RCS as described here.
 
-To start using local RCS for a file that comes from a remote CVS server,
-you must @dfn{commit the file to RCS}, by typing @kbd{C-u C-x v v rcs
-RET}.  (In other words, @code{vc-next-action}, when called with a prefix
-argument, accepts a back end name in place of the version to commit to.)
-VC then registers the file under RCS.
+To start using local RCS for a file that comes from a remote CVS
+server, you must @emph{register the file in RCS}, by typing @kbd{C-u
+C-x v v rcs @key{RET}}.  (In other words, use @code{vc-next-action} with a
+prefix argument, and specify RCS as the back end.)
 
-You can commit to RCS at any time; it does not matter whether you have
+You can do this at any time; it does not matter whether you have
 already modified the file with respect to the version in the CVS
 repository.  If possible, VC tries to make the RCS master start with
-the unmodified repository version, then checking in any local changes
-as a new version.  This works if you have not made any changes yet,
-or if the unmodified repository version exists locally as a version
+the unmodified repository version, then checks in any local changes
+as a new version.  This works if you have not made any changes yet, or
+if the unmodified repository version exists locally as a version
 backup (@pxref{Version Backups}).  If the unmodified version is not
 available locally, the RCS master starts with the modified version;
-the only problem with this is that you cannot compare your changes
+the only drawback to this is that you cannot compare your changes
 locally to what is stored in the repository.
 
 The version number of the RCS master is derived from the current CVS
@@ -1973,55 +2307,61 @@ version, starting a branch from it.  For example, if the current CVS
 version is 1.23, the local RCS branch will be 1.23.1.  Version 1.23 in
 the RCS master will be identical to version 1.23 under CVS; your first
 changes are checked in as 1.23.1.1.  (If the unmodified file is not
-available locally, VC will check-in the modified file twice, both as
+available locally, VC will check in the modified file twice, both as
 1.23 and 1.23.1.1, to make the revision numbers consistent.)
 
 If you do not use locking under CVS (the default), locking is also
-switched off under RCS, so that editing under RCS works exactly as
-under CVS.  
-
-When you are done with your edits, you can commit the final version back
-to the CVS repository, typing @kbd{C-u C-x v v cvs RET}.  Emacs will
-initialize the log entry buffer (@pxref{Log Buffer}) to contain all the
-check-in comments you have made in the RCS master; you can make changes
-to these comments as needed and then commit to CVS by typing @kbd{C-c
-C-c}.  If the commit is successful, VC finally removes the RCS master,
-so that the file becomes once again registered under CVS only.  (The RCS
-master is not actually deleted, but renamed by adding a @samp{~} to its
-name, so that you can get back to it later if you want.)
-
-While you are working with a local RCS master, you might still want to
-pick up recent changes from the CVS repository into your local file,
-or you might want to commit some of your changes back to CVS, without
-actually switching back to CVS completely.  VC lets you do this by
-switching to another backend temporarily.
+disabled for RCS, so that editing under RCS works exactly as under
+CVS.
+
+When you are done with local editing, you can commit the final version
+back to the CVS repository by typing @kbd{C-u C-x v v cvs @key{RET}}.
+This initializes the log entry buffer (@pxref{Log Buffer}) to contain
+all the log entries you have recorded in the RCS master; you can edit
+them as you wish, and then commit in CVS by typing @kbd{C-c C-c}.  If
+the commit is successful, VC removes the RCS master, so that the file
+is once again registered under CVS only.  (The RCS master is not
+actually deleted, just renamed by appending @samp{~} to the name, so
+that you can refer to it later if you wish.)
+
+While using local RCS, you can pick up recent changes from the CVS
+repository into your local file, or commit some of your changes back
+to CVS, without terminating local RCS version control.  To do this,
+switch to the CVS back end temporarily, with the @kbd{C-x v b} command:
 
 @table @kbd
 @item C-x v b
-Switch to another back end that the current file is registered
+Switch to another back end that the current file is registered
 under (@code{vc-switch-backend}).
+
+@item C-u C-x v b @var{backend} @key{RET}
+Switch to @var{backend} for the current file.
 @end table
 
-@kindex{C-x v b}
+@kindex C-x v b
 @findex vc-switch-backend
+@kbd{C-x v b} does not change the buffer contents, or any files; it
+only changes VC's perspective on how to handle the file.  Any
+subsequent VC commands for that file will operate on the back end that
+is currently selected.
+
 If the current file is registered in more than one back end, typing
-@kbd{C-x v b} lets you ``cycle'' through these back ends.  (With a prefix
-argument, it asks for the back end to use in the minibuffer.)  This
-command does not change any files, it only changes VC's perspective of
-the file.  Any other VC commands that you use on a file will operate on
-the back end that is currently selected.
-
-Thus, if you have a file under local RCS, and you want to pick up some
-recent changes from CVS, type @kbd{C-x v b} to switch to CVS, and then
-@kbd{C-x v m RET} to merge the news (@pxref{Merging}).  You can then switch
-back to RCS by typing @kbd{C-x v b} again, and continue to edit locally.
-
-Note though, that if you do this, the revision numbers in the RCS
-master no longer correspond to those of CVS in a meaningful way.
-Technically, this is not a problem, but it might be more difficult for
-you to keep track of what is in the repository and what is not.  So we
-suggest that, frequently, you commit your changes back to CVS
-completely using @kbd{C-u C-x v v cvs RET}.
+@kbd{C-x v b} ``cycles'' through all of these back ends.  With a
+prefix argument, it asks for the back end to use in the minibuffer.
+
+Thus, if you are using local RCS, and you want to pick up some recent
+changes in the file from remote CVS, first visit the file, then type
+@kbd{C-x v b} to switch to CVS, and finally use @kbd{C-x v m
+@key{RET}} to merge the news (@pxref{Merging}).  You can then switch
+back to RCS by typing @kbd{C-x v b} again, and continue to edit
+locally.
+
+But if you do this, the revision numbers in the RCS master no longer
+correspond to those of CVS.  Technically, this is not a problem, but
+it can become difficult to keep track of what is in the CVS repository
+and what is not.  So we suggest that you return from time to time to
+CVS-only operation, by committing your local changes back to the
+repository using @kbd{C-u C-x v v cvs @key{RET}}.
 
 @node Snapshots
 @subsection Snapshots
@@ -2077,14 +2417,16 @@ or a snapshot against a named version.
 
 @cindex named configurations (RCS)
   VC's snapshot facilities are modeled on RCS's named-configuration
-support.  They use RCS's native facilities for this, so under VC
-snapshots made using RCS are visible even when you bypass VC.
+support.  They use RCS's native facilities for this, so
+snapshots made using RCS through VC are visible even when you bypass VC.
 
 @c worded verbosely to avoid overfull hbox.
   For SCCS, VC implements snapshots itself.  The files it uses contain
 name/file/version-number triples.  These snapshots are visible only
 through VC.
 
+@c ??? What about CVS?
+
   A snapshot is a set of checked-in versions.  So make sure that all the
 files are checked in and not locked when you make a snapshot.
 
@@ -2103,7 +2445,7 @@ RCS and SCCS to explain how to update the snapshots by hand.
 
   Using @code{vc-rename-file} makes the snapshot remain valid for
 retrieval, but it does not solve all problems.  For example, some of the
-files in the program probably refer to others by name.  At the very
+files in your program probably refer to others by name.  At the very
 least, the makefile probably mentions the file that you renamed.  If you
 retrieve an old snapshot, the renamed file is retrieved under its new
 name, which is not the name that the makefile expects.  So the program
@@ -2116,7 +2458,7 @@ won't really work as retrieved.
 
 @menu
 * Change Logs and VC::  Generating a change log file from log entries.
-* Renaming and VC::     A command to rename both the source and master 
+* Renaming and VC::     A command to rename both the source and master
                           file correctly.
 * Version Headers::     Inserting version control headers into working files.
 @end menu
@@ -2139,6 +2481,8 @@ most recent entry in the change log file.
 
 This command works with RCS or CVS only, not with SCCS.
 
+@c ??? What about other back ends?
+
 @item C-u C-x v a
 As above, but only find entries for the current buffer's file.
 
@@ -2172,9 +2516,8 @@ messages that start with `#'.}.  Then @kbd{C-x v a} visits
 @noindent
 You can then edit the new change log entry further as you wish.
 
-  Unfortunately, timestamps in ChangeLog files are only dates, so some
-of the new change log entry may duplicate what's already in ChangeLog.
-You will have to remove these duplicates by hand.
+  Some of the new change log entries may duplicate what's already in
+ChangeLog.  You will have to remove these duplicates by hand.
 
   Normally, the log entry for file @file{foo} is displayed as @samp{*
 foo: @var{text of log entry}}.  The @samp{:} after @file{foo} is omitted
@@ -2277,6 +2620,11 @@ mention the file, so that they use the new name; despite this, the
 snapshot thus modified may not completely work (@pxref{Snapshot
 Caveats}).
 
+  Some backends do not provide an explicit rename operation to their
+repositories.  After issuing @code{vc-rename-file}, use @kbd{C-x v v}
+on the original and renamed buffers and provide the necessary edit
+log.
+
   You cannot use @code{vc-rename-file} on a file that is locked by
 someone else.
 
@@ -2288,6 +2636,8 @@ directly into working files.  Certain special strings called
 @dfn{version headers} are replaced in each successive version by the
 number of that version.
 
+@c ??? How does this relate to CVS?
+
   If you are using RCS, and version headers are present in your working
 files, Emacs can use them to determine the current version and the
 locking state of the files.  This is more reliable than referring to the
@@ -2296,9 +2646,9 @@ that in a multi-branch environment, version headers are necessary to
 make VC behave correctly (@pxref{Multi-User Branching}).
 
   Searching for version headers is controlled by the variable
-@code{vc-consult-headers}.  If it is non-@code{nil}, Emacs searches for
-headers to determine the version number you are editing.  Setting it to
-@code{nil} disables this feature.
+@code{vc-consult-headers}.  If it is non-@code{nil} (the default),
+Emacs searches for headers to determine the version number you are
+editing.  Setting it to @code{nil} disables this feature.
 
 @kindex C-x v h
 @findex vc-insert-headers
@@ -2310,22 +2660,22 @@ insert a suitable header string.
 Insert headers in a file for use with your version-control system.
 @end table
 
-@vindex vc-header-alist
+@vindex vc-@var{backend}-header
   The default header string is @samp{@w{$}Id$} for RCS and
 @samp{@w{%}W%} for SCCS.  You can specify other headers to insert by
-setting the variable @code{vc-header-alist}.  Its value is a list of
-elements of the form @code{(@var{program} . @var{string})} where
-@var{program} is @code{RCS} or @code{SCCS} and @var{string} is the
-string to use.
+setting the variables @code{vc-@var{backend}-header} where
+@var{backend} is @code{rcs} or @code{sccs}.
 
   Instead of a single string, you can specify a list of strings; then
 each string in the list is inserted as a separate header on a line of
 its own.
 
-  It is often necessary to use ``superfluous'' backslashes when writing
-the strings that you put in this variable.  This is to prevent the
-string in the constant from being interpreted as a header itself if the
-Emacs Lisp file containing it is maintained with version control.
+  It may be necessary to use apparently-superfluous backslashes when
+writing the strings that you put in this variable.  For instance, you
+might write @code{"$Id\$"} rather than @code{"$Id@w{$}"}.  The extra
+backslash prevents the string constant from being interpreted as a
+header, if the Emacs Lisp file containing it is maintained with
+version control.
 
 @vindex vc-comment-alist
   Each header is inserted surrounded by tabs, inside comment delimiters,
@@ -2342,8 +2692,8 @@ elements of the form @code{(@var{regexp} . @var{format})}.  Whenever
 @var{regexp} matches the buffer name, @var{format} is inserted as part
 of the header.  A header line is inserted for each element that matches
 the buffer name, and for each string specified by
-@code{vc-header-alist}.  The header line is made by processing the
-string from @code{vc-header-alist} with the format taken from the
+@code{vc-@var{backend}-header}.  The header line is made by processing the
+string from @code{vc-@var{backend}-header} with the format taken from the
 element.  The default value for @code{vc-static-header-alist} is as follows:
 
 @example
@@ -2378,23 +2728,23 @@ headers.
 @subsection Customizing VC
 
 @vindex vc-handled-backends
-The variable @var{vc-handled-backends} determines which version
+The variable @code{vc-handled-backends} determines which version
 control systems VC should handle.  The default value is @code{(RCS CVS
-SCCS)}, so it contains all three version systems that are currently
-supported.  If you want VC to ignore one or more of these systems,
-exclude its name from the list.
+SVN SCCS Arch MCVS)}, so it contains all six version systems that are
+currently supported.  If you want VC to ignore one or more of these
+systems, exclude its name from the list.  To disable VC entirely, set
+this variable to @code{nil}.
 
 The order of systems in the list is significant: when you visit a file
-is registered in more than one system (@pxref{Local Version Control}),
-VC uses the system that comes first in @var{vc-handled-backends} by
+registered in more than one system (@pxref{Local Version Control}),
+VC uses the system that comes first in @code{vc-handled-backends} by
 default.  The order is also significant when you register a file for
 the first time, @pxref{Registering} for details.
 
 @menu
-* General VC Options::  Options not specific for any back end system.
-* RCS Options::         Options for RCS.
+* General VC Options::  Options that apply to multiple back ends.
+* RCS and SCCS::        Options for RCS and SCCS.
 * CVS Options::         Options for CVS.
-* SCCS Options::        Options for SCCS.
 @end menu
 
 @node General VC Options
@@ -2409,7 +2759,7 @@ for files that use version control, set the variable
 @vindex vc-keep-workfiles
   Normally the work file exists all the time, whether it is locked or
 not.  If you set @code{vc-keep-workfiles} to @code{nil}, then checking
-in a new version with @kbd{C-x C-q} deletes the work file; but any
+in a new version with @kbd{C-x v v} deletes the work file; but any
 attempt to visit the file with Emacs creates it again.  (With CVS, work
 files are always kept.)
 
@@ -2429,7 +2779,7 @@ this in the echo area.  If the value is @code{ask} (the default), VC
 asks you each time whether to follow the link.
 
 @vindex vc-suppress-confirm
-  If @code{vc-suppress-confirm} is non-@code{nil}, then @kbd{C-x C-q}
+  If @code{vc-suppress-confirm} is non-@code{nil}, then @kbd{C-x v v}
 and @kbd{C-x v i} can save the current buffer without asking, and
 @kbd{C-x v u} also operates without asking for confirmation.  (This
 variable does not affect @kbd{C-x v c}; that operation is so drastic
@@ -2443,12 +2793,13 @@ additional messages when the commands finish.
 
 @vindex vc-path
   You can specify additional directories to search for version control
-programs by setting the variable @code{vc-path}.  These directories are
-searched before the usual search path.  But the proper files are usually
-found automatically.
+programs by setting the variable @code{vc-path}.  These directories
+are searched before the usual search path.  It is rarely necessary to
+set this variable, because VC normally finds the proper files
+automatically.
 
-@node RCS Options
-@subsubsection Options specific for RCS
+@node RCS and SCCS
+@subsubsection Options for RCS and SCCS
 
 @cindex non-strict locking (RCS)
 @cindex locking, non-strict (RCS)
@@ -2456,10 +2807,10 @@ found automatically.
 users, but there is a mode called @dfn{non-strict locking} in which
 you can check-in changes without locking the file first.  Use
 @samp{rcs -U} to switch to non-strict locking for a particular file,
-see the @samp{rcs(1)} manpage for details.
+see the @code{rcs} manual page for details.
 
-  When deducing the version control state of a file, VC first looks
-for an RCS version header string in the file (@pxref{Version
+  When deducing the version control state of an RCS file, VC first
+looks for an RCS version header string in the file (@pxref{Version
 Headers}).  If there is no header string, VC normally looks at the
 file permissions of the work file; this is fast.  But there might be
 situations when the file permissions cannot be trusted.  In this case
@@ -2471,8 +2822,8 @@ version.
 @vindex vc-consult-headers
   You can tell VC not to use version headers to determine the file
 status by setting @code{vc-consult-headers} to @code{nil}.  VC then
-always uses the file permissions (if it can trust them), or else
-checks the master file.
+always uses the file permissions (if it is supposed to trust them), or
+else checks the master file.
 
 @vindex vc-mistrust-permissions
   You can specify the criterion for whether to trust the file
@@ -2486,6 +2837,11 @@ permissions.  If you find that the file permissions of work files are
 changed erroneously, set @code{vc-mistrust-permissions} to @code{t}.
 Then VC always checks the master file to determine the file's status.
 
+  VC determines the version control state of files under SCCS much as
+with RCS.  It does not consider SCCS version headers, though.  Thus,
+the variable @code{vc-mistrust-permissions} affects SCCS use, but
+@code{vc-consult-headers} does not.
+
 @node CVS Options
 @subsubsection Options specific for CVS
 
@@ -2496,21 +2852,22 @@ there are ways to restrict this, resulting in behavior that resembles
 locking.
 
 @cindex CVSREAD environment variable (CVS)
-  For one thing, you can set the @env{CVSREAD} environment variable to
-an arbitrary value.  If this variable is defined, CVS makes your work
-files read-only by default.  In Emacs, you must type @kbd{C-x C-q} to
-make the file writeable, so that editing works in fact similar as if
-locking was used.  Note however, that no actual locking is performed, so
-several users can make their files writeable at the same time.  When
-setting @env{CVSREAD} for the first time, make sure to check out all
-your modules anew, so that the file protections are set correctly.
+  For one thing, you can set the @env{CVSREAD} environment variable
+(the value you use makes no difference).  If this variable is defined,
+CVS makes your work files read-only by default.  In Emacs, you must
+type @kbd{C-x v v} to make the file writable, so that editing works
+in fact similar as if locking was used.  Note however, that no actual
+locking is performed, so several users can make their files writable
+at the same time.  When setting @env{CVSREAD} for the first time, make
+sure to check out all your modules anew, so that the file protections
+are set correctly.
 
 @cindex cvs watch feature
 @cindex watching files (CVS)
   Another way to achieve something similar to locking is to use the
 @dfn{watch} feature of CVS.  If a file is being watched, CVS makes it
-read-only by default, and you must also use @kbd{C-x C-q} in Emacs to
-make it writable.  VC calls @code{cvs edit} to make the file writeable,
+read-only by default, and you must also use @kbd{C-x v v} in Emacs to
+make it writable.  VC calls @code{cvs edit} to make the file writable,
 and CVS takes care to notify other developers of the fact that you
 intend to change the file.  See the CVS documentation for details on
 using the watch feature.
@@ -2519,36 +2876,32 @@ using the watch feature.
 @cindex remote repositories (CVS)
   When a file's repository is on a remote machine, VC tries to keep
 network interactions to a minimum.  This is controlled by the variable
-@var{vc-cvs-stay-local}.  If it is @code{t} (the default), then VC uses
+@code{vc-cvs-stay-local}.  If it is @code{t} (the default), then VC uses
 only the entry in the local CVS subdirectory to determine the file's
 state (and possibly information returned by previous CVS commands).  One
 consequence of this is that when you have modified a file, and somebody
 else has already checked in other changes to the file, you are not
 notified of it until you actually try to commit.  (But you can try to
 pick up any recent changes from the repository first, using @kbd{C-x v m
-RET}, @pxref{Merging}).
+@key{RET}}, @pxref{Merging}).
+
+@vindex vc-cvs-global-switches
+  The variable @code{vc-cvs-global-switches}, if non-@code{nil},
+should be a string specifying switches to pass to CVS for all CVS
+operations.
 
-  When @var{vc-cvs-stay-local} is @code{t}, VC also makes local
+  When @code{vc-cvs-stay-local} is @code{t}, VC also makes local
 version backups, so that simple diff and revert operations are
 completely local (@pxref{Version Backups}).
 
-  On the other hand, if you set @var{vc-cvs-stay-local} to @code{nil},
+  On the other hand, if you set @code{vc-cvs-stay-local} to @code{nil},
 then VC queries the remote repository @emph{before} it decides what to
 do in @code{vc-next-action} (@kbd{C-x v v}), just as it does for local
 repositories.  It also does not make any version backups.
 
-  You can also set @var{vc-cvs-stay-local} to a regexp that is matched
-against the repository hostname; VC then stays local only for
-repositories from hosts that match the pattern.
-
-@node SCCS Options
-@subsubsection Options specific for SCCS
-
-VC determines the version control state of files under SCCS similar as
-under RCS.  It does not consider SCCS version headers, though.  Thus,
-the variable @var{vc-mistrust-permissions} is used in the same way as
-under RCS, @pxref{RCS Options} for details.
-
+  You can also set @code{vc-cvs-stay-local} to a regular expression
+that is matched against the repository host name; VC then stays local
+only for repositories from hosts that match the pattern.
 
 @node Directories
 @section File Directories
@@ -2559,8 +2912,8 @@ under RCS, @pxref{RCS Options} for details.
 listing} is a list of all the files in a directory.  Emacs provides
 commands to create and delete directories, and to make directory
 listings in brief format (file names only) and verbose format (sizes,
-dates, and authors included).  There is also a directory browser called
-Dired; see @ref{Dired}.
+dates, and authors included).  Emacs also includes a directory browser
+feature called Dired; see @ref{Dired}.
 
 @table @kbd
 @item C-x C-d @var{dir-or-pattern} @key{RET}
@@ -2593,19 +2946,28 @@ example of specifying a file name pattern:
 C-x C-d /u2/emacs/src/*.c @key{RET}
 @end example
 
-  Normally, @kbd{C-x C-d} prints a brief directory listing containing
+  Normally, @kbd{C-x C-d} displays a brief directory listing containing
 just file names.  A numeric argument (regardless of value) tells it to
-make a verbose listing including sizes, dates, and authors (like
+make a verbose listing including sizes, dates, and owners (like
 @samp{ls -l}).
 
 @vindex list-directory-brief-switches
 @vindex list-directory-verbose-switches
-  The text of a directory listing is obtained by running @code{ls} in an
-inferior process.  Two Emacs variables control the switches passed to
-@code{ls}: @code{list-directory-brief-switches} is a string giving the
-switches to use in brief listings (@code{"-CF"} by default), and
-@code{list-directory-verbose-switches} is a string giving the switches to
-use in a verbose listing (@code{"-l"} by default).
+  The text of a directory listing is mostly obtained by running
+@code{ls} in an inferior process.  Two Emacs variables control the
+switches passed to @code{ls}: @code{list-directory-brief-switches} is
+a string giving the switches to use in brief listings (@code{"-CF"} by
+default), and @code{list-directory-verbose-switches} is a string
+giving the switches to use in a verbose listing (@code{"-l"} by
+default).
+
+@vindex directory-free-space-program
+@vindex directory-free-space-args
+  In verbose directory listings, Emacs adds information about the
+amount of free space on the disk that contains the directory.  To do
+this, it runs the program specified by
+@code{directory-free-space-program} with arguments
+@code{directory-free-space-args}.
 
 @node Comparing Files
 @section Comparing Files
@@ -2614,18 +2976,10 @@ use in a verbose listing (@code{"-l"} by default).
 @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}, whose value should be a string.
-
-  The buffer @samp{*Diff*} has Compilation mode as its major mode, so
-you can use @kbd{C-x `} to visit successive changed locations in the two
-source files.  You can also move to a particular hunk of changes and
-type @key{RET} or @kbd{C-c C-c}, or click @kbd{Mouse-2} on it, to move
-to the corresponding source location.  You can also use the other
-special commands of Compilation mode: @key{SPC} and @key{DEL} for
-scrolling, and @kbd{M-p} and @kbd{M-n} for cursor motion.
-@xref{Compilation}.
+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.
 
 @findex diff-backup
   The command @kbd{M-x diff-backup} compares a specified file with its most
@@ -2633,29 +2987,43 @@ 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.
 
+@findex diff-goto-source
+@findex diff-mode
+@cindex Diff mode
+  The @samp{*diff*} buffer uses Diff mode, which enables you to use
+@kbd{C-x `} to visit successive changed locations in the two source
+files, as in Compilation mode (@pxref{Compilation Mode}.)  You can
+also move to a particular hunk of changes and type @kbd{C-c C-c}
+(@code{diff-goto-source}) to visit the corresponding source location.
+
+@cindex patches
+  Differences between versions of files are often distributed as
+patches, which are the output from the @command{diff} program.  You
+can use Diff mode to operate on a patch by typing @kbd{M-x diff-mode}.
+
 @findex compare-windows
-  The command @kbd{M-x compare-windows} compares the text in the current
-window with that in the next window.  Comparison starts at point in each
-window, and each starting position is pushed on the mark ring in its
-respective buffer.  Then point moves forward in each window, a character
-at a time, until a mismatch between the two windows is reached.  Then
-the command is finished.  For more information about windows in Emacs,
-@ref{Windows}.
+  The command @kbd{M-x compare-windows} compares the text in the
+current window with that in the next window.  (For more information
+about windows in Emacs, @ref{Windows}.)  Comparison starts at point in
+each window, after pushing each initial point value on the mark ring
+in its respective buffer.  Then it moves point forward in each window,
+one character at a time, until it reaches characters that don't match.
+Then the command exits.
+
+  If point in the two windows is followed by non-matching text when
+the command starts, @kbd{M-x compare-windows} tries heuristically to
+advance up to matching text in the two windows, and then exits.  So if
+you use @kbd{M-x compare-windows} repeatedly, each time it either
+skips one matching range or finds the start of another.
 
 @vindex compare-ignore-case
+@vindex compare-ignore-whitespace
   With a numeric argument, @code{compare-windows} ignores changes in
 whitespace.  If the variable @code{compare-ignore-case} is
-non-@code{nil}, it ignores differences in case as well.
-
-@findex diff-mode
-@cindex diffs
-@cindex patches
-@cindex Diff mode
-  Differences between versions of files are often distributed as
-@dfn{patches}, which are the output from @command{diff} or a version
-control system that uses @command{diff}.  @kbd{M-x diff-mode} turns on
-Diff mode, a major mode for viewing and editing patches, either as
-``unified diffs'' or ``context diffs.''
+non-@code{nil}, the comparison ignores differences in case as well.
+If the variable @code{compare-ignore-whitespace} is non-@code{nil},
+@code{compare-windows} normally ignores changes in whitespace, and a
+prefix argument turns that off.
 
 @cindex Smerge mode
 @findex smerge-mode
@@ -2690,22 +3058,25 @@ or @key{DEL} to scroll backward.  Various other commands are provided
 for moving around in the file, but none for changing it; type @kbd{?}
 while viewing for a list of them.  They are mostly the same as normal
 Emacs cursor motion commands.  To exit from viewing, type @kbd{q}.
-The commands for viewing are defined by a special major mode called View
+The commands for viewing are defined by a special minor mode called View
 mode.
 
   A related command, @kbd{M-x view-buffer}, views a buffer already present
 in Emacs.  @xref{Misc Buffer}.
 
+@kindex C-x i
 @findex insert-file
-  @kbd{M-x insert-file} inserts a copy of the contents of the specified
-file into the current buffer at point, leaving point unchanged before the
-contents and the mark after them.
+  @kbd{M-x insert-file} (also @kbd{C-x i}) inserts a copy of the
+contents of the specified file into the current buffer at point,
+leaving point unchanged before the contents and the mark after them.
 
 @findex write-region
   @kbd{M-x write-region} is the inverse of @kbd{M-x insert-file}; it
 copies the contents of the region into the specified file.  @kbd{M-x
-append-to-file} adds the text of the region to the end of the specified
-file.  @xref{Accumulating Text}.
+append-to-file} adds the text of the region to the end of the
+specified file.  @xref{Accumulating Text}.  The variable
+@code{write-region-inhibit-fsync} applies to these commands, as well
+as saving files; see @ref{Customize Save}.
 
 @findex delete-file
 @cindex deletion (of files)
@@ -2715,36 +3086,46 @@ may be more convenient to use Dired (@pxref{Dired}).
 
 @findex rename-file
   @kbd{M-x rename-file} reads two file names @var{old} and @var{new} using
-the minibuffer, then renames file @var{old} as @var{new}.  If a file named
+the minibuffer, then renames file @var{old} as @var{new}.  If the file name
 @var{new} already exists, you must confirm with @kbd{yes} or renaming is not
 done; this is because renaming causes the old meaning of the name @var{new}
 to be lost.  If @var{old} and @var{new} are on different file systems, the
 file @var{old} is copied and deleted.
 
+  If the argument @var{new} is just a directory name, the real new
+name is in that directory, with the same non-directory component as
+@var{old}.  For example, @kbd{M-x rename-file RET ~/foo RET /tmp RET}
+renames @file{~/foo} to @file{/tmp/foo}.  The same rule applies to all
+the remaining commands in this section.  All of them ask for
+confirmation when the new file name already exists, too.
+
 @findex add-name-to-file
+@cindex hard links (creation)
   The similar command @kbd{M-x add-name-to-file} is used to add an
 additional name to an existing file without removing its old name.
+The new name is created as a ``hard link'' to the existing file.
 The new name must belong on the same file system that the file is on.
+On MS-Windows, this command works only if the file resides in an NTFS
+file system.  On MS-DOS, it works by copying the file.
 
 @findex copy-file
 @cindex copying files
-  @kbd{M-x copy-file} reads the file @var{old} and writes a new file named
-@var{new} with the same contents.  Confirmation is required if a file named
-@var{new} already exists, because copying has the consequence of overwriting
-the old contents of the file @var{new}.
+  @kbd{M-x copy-file} reads the file @var{old} and writes a new file
+named @var{new} with the same contents.
 
 @findex make-symbolic-link
+@cindex symbolic links (creation)
   @kbd{M-x make-symbolic-link} reads two file names @var{target} and
-@var{linkname}, then creates a symbolic link named @var{linkname} and
-pointing at @var{target}.  The effect is that future attempts to open file
-@var{linkname} will refer to whatever file is named @var{target} at the
-time the opening is done, or will get an error if the name @var{target} is
-not in use at that time.  This command does not expand the argument
-@var{target}, so that it allows you to specify a relative name
-as the target of the link.
+@var{linkname}, then creates a symbolic link named @var{linkname},
+which points at @var{target}.  The effect is that future attempts to
+open file @var{linkname} will refer to whatever file is named
+@var{target} at the time the opening is done, or will get an error if
+the name @var{target} is nonexistent at that time.  This command does
+not expand the argument @var{target}, so that it allows you to specify
+a relative name as the target of the link.
 
-  Confirmation is required when creating the link if @var{linkname} is
-in use.  Note that not all systems support symbolic links.
+  Not all systems support symbolic links; on systems that don't
+support them, this command is not defined.
 
 @node Compressed Files
 @section Accessing Compressed Files
@@ -2754,17 +3135,10 @@ in use.  Note that not all systems support symbolic links.
 @cindex mode, Auto Compression
 @pindex gzip
 
-@findex auto-compression-mode
-@vindex auto-compression-mode
-  Emacs comes with a library that can automatically uncompress
-compressed files when you visit them, and automatically recompress them
-if you alter them and save them.  To enable this feature, type the
-command @kbd{M-x auto-compression-mode}.  You can enable it permanently
-by customizing the option @var{auto-compression-mode}.
-
-  When automatic compression (which implies automatic uncompression as
-well) is enabled, Emacs recognizes compressed files by their file names.
-File names ending in @samp{.gz} indicate a file compressed with
+  Emacs automatically uncompresses compressed files when you visit
+them, and automatically recompresses them if you alter them and save
+them.  Emacs recognizes compressed files by their file names.  File
+names ending in @samp{.gz} indicate a file compressed with
 @code{gzip}.  Other endings indicate other compression programs.
 
   Automatic uncompression and compression apply to all the operations in
@@ -2772,6 +3146,12 @@ which Emacs uses the contents of a file.  This includes visiting it,
 saving it, inserting its contents into a buffer, loading it, and byte
 compiling it.
 
+@findex auto-compression-mode
+@vindex auto-compression-mode
+  To disable this feature, type the command @kbd{M-x
+auto-compression-mode}.  You can disenable it permanently by
+customizing the variable @code{auto-compression-mode}.
+
 @node File Archives
 @section File Archives
 @cindex mode, tar
@@ -2785,19 +3165,20 @@ mode called Tar mode which provides a Dired-like list of the contents
 would in Dired, and visit the subfiles contained in the archive.
 However, not all Dired commands are available in Tar mode.
 
-  If you enable Auto Compression mode (@pxref{Compressed Files}), then
+  If Auto Compression mode is enabled (@pxref{Compressed Files}), then
 Tar mode is used also for compressed archives---files with extensions
 @samp{.tgz}, @code{.tar.Z} and @code{.tar.gz}.
 
-  The keys @kbd{e}, @kbd{f} and @kbd{RET} all extract a component file
-into its own buffer.  You can edit it there and when you save the buffer
-the edited version will replace the version in the Tar buffer.  @kbd{v}
-extracts a file into a buffer in View mode.  @kbd{o} extracts the file
-and displays it in another window, so you could edit the file and
-operate on the archive simultaneously.  @kbd{d} marks a file for
+  The keys @kbd{e}, @kbd{f} and @key{RET} all extract a component file
+into its own buffer.  You can edit it there, and if you save the
+buffer, the edited version will replace the version in the Tar buffer.
+@kbd{v} extracts a file into a buffer in View mode.  @kbd{o} extracts
+the file and displays it in another window, so you could edit the file
+and operate on the archive simultaneously.  @kbd{d} marks a file for
 deletion when you later use @kbd{x}, and @kbd{u} unmarks a file, as in
 Dired.  @kbd{C} copies a file from the archive to disk and @kbd{R}
-renames a file.  @kbd{g} reverts the buffer from the archive on disk.
+renames a file within the archive.  @kbd{g} reverts the buffer from
+the archive on disk.
 
   The keys @kbd{M}, @kbd{G}, and @kbd{O} change the file's permission
 bits, group, and owner, respectively.
@@ -2832,7 +3213,7 @@ requires the appropriate uncompression program.
 the programs @code{arc}, @code{jar}, @code{lzh}, @code{zip}, and
 @code{zoo}, which have extensions corresponding to the program names.
 
-  The keybindings of Archive mode are similar to those in Tar mode,
+  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
 operations, and @kbd{M-@key{DEL}} which unmarks all the marked files.
 Also, the @kbd{a} key toggles the display of detailed file
@@ -2843,44 +3224,76 @@ owner, are supported only for some of the archive formats.
   Unlike Tar mode, Archive mode runs the archiving program to unpack
 and repack archives.  Details of the program names and their options
 can be set in the @samp{Archive} Customize group.  However, you don't
-need these programs to the archive table of contents, only to extract
-or manipulate the subfiles in the archive.
+need these programs to look at the archive table of contents, only to
+extract or manipulate the subfiles in the archive.
 
 @node Remote Files
 @section Remote Files
 
+@cindex Tramp
 @cindex FTP
 @cindex remote file access
-  You can refer to files on other machines using a special file name syntax:
+  You can refer to files on other machines using a special file name
+syntax:
 
 @example
 @group
 /@var{host}:@var{filename}
 /@var{user}@@@var{host}:@var{filename}
 /@var{user}@@@var{host}#@var{port}:@var{filename}
+/@var{method}:@var{user}@@@var{host}:@var{filename}
+/@var{method}:@var{user}@@@var{host}#@var{port}:@var{filename}
 @end group
 @end example
 
 @noindent
-When you do this, Emacs uses the FTP program to read and write files on
-the specified host.  It logs in through FTP using your user name or the
-name @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.
+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:
+
+@enumerate
+@item
+If the host name starts with @samp{ftp.} (with dot), then Emacs uses
+FTP.
+@item
+If the user name is @samp{ftp} or @samp{anonymous}, then Emacs uses
+FTP.
+@item
+Otherwise, Emacs uses @command{ssh}.
+@end enumerate
+
+@noindent
+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.
 
 @cindex backups for remote files
 @vindex ange-ftp-make-backup-files
   If you want to disable backups for remote files, set the variable
 @code{ange-ftp-make-backup-files} to @code{nil}.
 
+  By default, the auto-save files (@pxref{Auto Save Files}) for remote
+files are made in the temporary file directory on the local machine.
+This is achieved using the variable @code{auto-save-file-name-transforms}.
+
 @cindex ange-ftp
 @vindex ange-ftp-default-user
 @cindex user name for remote file access
   Normally, if you do not specify a user name in a remote file name,
 that means to use your own user name.  But if you set the variable
 @code{ange-ftp-default-user} to a string, that string is used instead.
-(The Emacs package that implements FTP file access is called
-@code{ange-ftp}.)
 
 @cindex anonymous FTP
 @vindex ange-ftp-generate-anonymous-password
@@ -2890,8 +3303,8 @@ are handled specially.  The variable
 @code{ange-ftp-generate-anonymous-password} controls what happens: if
 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}, the user is prompted
-for a password as normal.
+@code{user-mail-address} is used; if @code{nil}, then Emacs prompts
+you for a password as usual.
 
 @cindex firewall, and accessing remote files
 @cindex gateway, and remote file access with @code{ange-ftp}
@@ -2912,8 +3325,8 @@ 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 @var{ange-ftp-completion-hook-function} and
-@var{ange-ftp-hook-function} from the variable
+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}).
@@ -2922,6 +3335,7 @@ File Names}).
 @section Quoted File Names
 
 @cindex quoting file names
+@cindex file names, quote special characters
   You can @dfn{quote} an absolute file name to prevent special
 characters and syntax in it from having their special effects.
 The way to do this is to add @samp{/:} at the beginning.
@@ -2935,17 +3349,23 @@ can refer to that file in Emacs as @samp{/:/foo:/bar}.
 character for a user's home directory.  For example, @file{/:/tmp/~hack}
 refers to a file whose name is @file{~hack} in directory @file{/tmp}.
 
-  Likewise, quoting with @samp{/:} is one way to enter in the minibuffer
-a file name that contains @samp{$}.  However, the @samp{/:} must be at
-the beginning of the buffer in order to quote @samp{$}.
+  Quoting with @samp{/:} is also a way to enter in the minibuffer a
+file name that contains @samp{$}.  In order for this to work, the
+@samp{/:} must be at the beginning of the minibuffer contents.  (You
+can also double each @samp{$}; see @ref{File Names with $}.)
 
   You can also quote wildcard characters with @samp{/:}, for visiting.
-For example, @file{/:/tmp/foo*bar} visits the file @file{/tmp/foo*bar}.
-However, in most cases you can simply type the wildcard characters for
-themselves.  For example, if the only file name in @file{/tmp} that
-starts with @samp{foo} and ends with @samp{bar} is @file{foo*bar}, then
-specifying @file{/tmp/foo*bar} will visit just @file{/tmp/foo*bar}.
-Another way is to specify @file{/tmp/foo[*]bar}.
+For example, @file{/:/tmp/foo*bar} visits the file
+@file{/tmp/foo*bar}.
+
+  Another method of getting the same result is to enter
+@file{/tmp/foo[*]bar}, which is a wildcard specification that matches
+only @file{/tmp/foo*bar}.  However, in many cases there is no need to
+quote the wildcard characters because even unquoted they give the
+right result.  For example, if the only file name in @file{/tmp} that
+starts with @samp{foo} and ends with @samp{bar} is @file{foo*bar},
+then specifying @file{/tmp/foo*bar} will visit only
+@file{/tmp/foo*bar}.
 
 @node File Name Cache
 @section File Name Cache
@@ -2990,30 +3410,82 @@ Clear the cache; that is, remove all file names from it.
 @node File Conveniences
 @section Convenience Features for Finding Files
 
+  In this section, we introduce some convenient facilities for finding
+recently-opened files, reading file names from a buffer, and viewing
+image files.
+
 @findex recentf-mode
 @vindex recentf-mode
 @findex recentf-save-list
 @findex recentf-edit-list
   If you enable Recentf mode, with @kbd{M-x recentf-mode}, the
-@samp{Files} menu includes a submenu containing a list of recently
+@samp{File} menu includes a submenu containing a list of recently
 opened files.  @kbd{M-x recentf-save-list} saves the current
-recent-file-list to a file, and @kbd{M-x recentf-edit-list} edits it.
-
-@findex auto-image-file-mode
-@findex mode, auto-image-file
-@cindex images, visiting
-@cindex visiting image files
-@vindex image-file-name-regexps
-@vindex image-file-name-extensions
-  When Auto-image-file minor mode is enabled, visiting an image file
-displays it as an image, not as text.  Likewise, inserting an image
-file into a buffer inserts it as an image.  This works only when Emacs
-can display the relevant image type.  The variables
-@code{image-file-name-extensions} or @code{image-file-name-regexps}
-control which file names are recognized as containing images.
+@code{recent-file-list} to a file, and @kbd{M-x recentf-edit-list}
+edits it.
 
   The @kbd{M-x ffap} command generalizes @code{find-file} with more
 powerful heuristic defaults (@pxref{FFAP}), often based on the text at
 point.  Partial Completion mode offers other features extending
 @code{find-file}, which can be used with @code{ffap}.
 @xref{Completion Options}.
+
+@findex image-mode
+@findex image-toggle-display
+@cindex images, viewing
+  Visiting image files automatically selects Image mode.  This major
+mode allows you to toggle between displaying the file as an image in
+the Emacs buffer, and displaying its underlying text representation,
+using the command @kbd{C-c C-c} (@code{image-toggle-display}).  This
+works only when Emacs can display the specific image type.
+
+@findex thumbs-mode
+@findex mode, thumbs
+  Thumbs mode is a major mode for viewing directories containing many
+image files.  To use it, type @kbd{M-x thumbs} and specify the
+directory to view.  The images in that directory will be displayed in
+a @samp{Thumbs} buffer as @dfn{thumbnails}; type @kbd{RET} on a
+thumbnail to view the full-size image.  Thumbs mode requires the
+@file{convert} program, which is part of the ImageMagick software
+package.
+
+@node Filesets
+@section Filesets
+@cindex filesets
+
+@findex filesets-init
+  If you regularly edit a certain group of files, you can define them
+as a @dfn{fileset}.  This lets you perform certain operations, such as
+visiting, @code{query-replace}, and shell commands on all the files
+at once.  To make use of filesets, you must first add the expression
+@code{(filesets-init)} to your @file{.emacs} file (@pxref{Init File}).
+This adds a @samp{Filesets} menu to the menu bar.
+
+@findex filesets-add-buffer
+@findex filesets-remove-buffer
+  The simplest way to define a fileset is by adding files to it one
+at a time.  To add a file to fileset @var{name}, visit the file and
+type @kbd{M-x filesets-add-buffer @kbd{RET} @var{name} @kbd{RET}}.  If
+there is no fileset @var{name}, this creates a new one, which
+initially creates only the current file.  The command @kbd{M-x
+filesets-remove-buffer} removes the current file from a fileset.
+
+  You can also edit the list of filesets directly, with @kbd{M-x
+filesets-edit} (or by choosing @samp{Edit Filesets} from the
+@samp{Filesets} menu).  The editing is performed in a Customize buffer
+(@pxref{Easy Customization}).  Filesets need not be a simple list of
+files---you can also define filesets using regular expression matching
+file names.  Some examples of these more complicated filesets are
+shown in the Customize buffer.  Remember to select @samp{Save for
+future sessions} if you want to use the same filesets in future Emacs
+sessions.
+
+  You can use the command @kbd{M-x filesets-open} to visit all the
+files in a fileset, and @kbd{M-x filesets-close} to close them.  Use
+@kbd{M-x filesets-run-cmd} to run a shell command on all the files in
+a fileset.  These commands are also available from the @samp{Filesets}
+menu, where each existing fileset is represented by a submenu.
+
+@ignore
+   arch-tag: 768d32cb-e15a-4cc1-b7bf-62c00ee12250
+@end ignore