]> code.delx.au - gnu-emacs/blobdiff - man/files.texi
msdog.texi (Microsoft Windows):
[gnu-emacs] / man / files.texi
index 26f6af37603e7c155e0827b8cf7ab8c723c2a991..010f038365e0b13a2ba77876eda402ab1b917ad1 100644 (file)
@@ -1,6 +1,6 @@
 @c This is part of the Emacs manual.
 @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1999, 2000,
-@c   2001, 2004, 2005 Free Software Foundation, Inc.
+@c   2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
 @node Files, Buffers, Keyboard Macros, Top
 @chapter File Handling
@@ -25,11 +25,15 @@ on file directories.
 * Visiting::            Visiting a file prepares Emacs to edit the file.
 * Saving::              Saving makes your changes permanent.
 * Reverting::           Reverting cancels all the changes not saved.
+@ifnottex
+* Autorevert::          Auto Reverting non-file buffers.
+@end ifnottex
 * Auto Save::           Auto Save periodically protects against loss of data.
 * File Aliases::        Handling multiple names for one file.
 * Version Control::     Version control systems (RCS, CVS and SCCS).
 * Directories::         Creating, deleting, and listing file directories.
 * Comparing Files::     Finding where two files differ.
+* Diff Mode::           Mode for editing file differences.
 * Misc File Ops::       Other things you can do on files.
 * Compressed Files::    Accessing compressed files.
 * File Archives::       Operating on tar, zip, jar etc. archive files.
@@ -68,21 +72,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} 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 in that buffer.  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
@@ -102,6 +107,17 @@ 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 home directory shorthand
+  You can use @file{~/} in a file name to mean your home directory,
+or @file{~@var{user-id}/} to mean the home directory of a user whose
+login name is @code{user-id}@footnote{
+On MS-Windows and MS-DOS systems, where a user doesn't have a home
+directory, Emacs substitutes @file{~/} with the value of the
+environment variable @code{HOME}; see @ref{General Variables}.  The
+@file{~@var{user-id}/} construct is supported on those systems only
+for the current user, i.e., only if @var{user-id} is the current
+user's login name.}.
+
 @cindex environment variables in file names
 @cindex expansion of environment variables
 @cindex @code{$} in file names
@@ -120,14 +136,6 @@ is not defined).
   Note that shell commands to set environment variables affect Emacs
 only when done before Emacs is started.
 
-@cindex home directory shorthand
-  You can use @file{~/} in a file name to mean your home directory,
-or @file{~@var{user-id}/} to mean the home directory of a user whose
-login name is @code{user-id}.  (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, 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
@@ -136,13 +144,13 @@ single @samp{$}.  Alternatively, quote the whole file name with
 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-@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
@@ -185,7 +193,7 @@ 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}.
 
@@ -208,17 +216,17 @@ 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}.
 
-  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 shown.  @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
@@ -232,21 +240,20 @@ buffer size, which is around 256 megabytes on 32-bit machines
 saying that the maximum buffer size has been exceeded.
 
 @cindex file selection dialog
-  On graphical terminals, there are two additional methods for
+  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, the GUI version does that by default.
+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 the ``drag and drop'' protocol on the X
-window system.  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}, @ref{Misc Dired
-Features}.
+  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 displays
@@ -281,11 +288,13 @@ Archives}, for more about these features.
 
 @cindex wildcard characters in file names
 @vindex find-file-wildcards
-  If the file name you specify contains shell-style wildcard characters,
-Emacs visits all the files that match it.  Wildcards include @samp{?},
-@samp{*}, and @samp{[@dots{}]} sequences.  @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
+  If the file name you specify contains shell-style wildcard
+characters, Emacs visits all the files that match it.  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,
@@ -311,9 +320,6 @@ buffer (after first offering to save it if it is modified).  When
 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.
-
 @kindex C-x 4 f
 @findex find-file-other-window
   @kbd{C-x 4 f} (@code{find-file-other-window}) is like @kbd{C-x C-f}
@@ -366,6 +372,21 @@ 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 on disk (@code{save-buffer}).
@@ -375,7 +396,7 @@ Save any or all buffers in their visited files (@code{save-some-buffers}).
 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 as a specified file name (@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
@@ -447,9 +468,9 @@ 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
@@ -464,8 +485,9 @@ buffer as ``modified'' so that @kbd{C-x C-s} in that buffer
 @kindex C-x C-w
 @findex write-file
   If you wish to mark the buffer as visiting a different file and save it
-right away, use @kbd{C-x C-w} (@code{write-file}).  It is 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
@@ -482,33 +504,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{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.
-
-@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
@@ -529,7 +524,17 @@ value is @code{t}, so that Emacs does write backup files.
 Control}), the variable @code{vc-make-backup-files} determines whether
 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}.
+control system.
+@iftex
+@xref{General VC Options,,,emacs-xtra, Specialized Emacs Features}.
+@end iftex
+@ifnottex
+@xref{General VC Options}.
+@end ifnottex
+
+
+  At your option, Emacs can keep either a single backup for each file,
+or make a series of numbered backup files for each file that you edit.
 
 @vindex backup-enable-predicate
 @vindex temporary-file-directory
@@ -539,9 +544,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.
@@ -559,19 +561,54 @@ backup from the previous contents, and arranges to make another from the
 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
@@ -602,36 +639,6 @@ 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
 
@@ -715,6 +722,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
 
@@ -799,6 +838,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
@@ -844,7 +884,6 @@ shadow-define-cluster}.
 
 @node Time Stamps
 @subsection Updating Time Stamps Automatically
-@findex time-stamp
 @cindex time stamps
 @cindex modification dates
 @cindex locale, date format
@@ -865,6 +904,7 @@ or like this:
 Time-stamp: " "
 @end example
 
+@findex time-stamp
   Then add the hook function @code{time-stamp} to the hook
 @code{before-save-hook}; that hook function will automatically update
 the time stamp, inserting the current date and time when you save the
@@ -923,26 +963,32 @@ discard your changes.)
   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} runs Global Auto-Revert mode,
+  @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} runs a
-local version, Auto-Revert mode, which applies only to the buffer in
-which it was activated.  Auto-Revert mode can be used 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, you can tail the file more efficiently using
-Auto-Revert Tail mode, @kbd{M-x auto-revert-tail-mode}.
+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
+  @xref{VC Mode Line}, for Auto Revert peculiarities in buffers that
 visit files under version control.
 
+@ifnottex
+@include arevert-xtra.texi
+@end ifnottex
+
 @node Auto Save
 @section Auto-Saving: Protection Against Disasters
 @cindex Auto Save mode
@@ -954,13 +1000,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
@@ -1018,10 +1064,10 @@ 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
@@ -1127,21 +1173,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
+
   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 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.
+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
@@ -1173,7 +1218,13 @@ RCS or CVS, you can switch to CSSC.
 
   VC is enabled by default in Emacs.  To disable it, set the
 customizable variable @code{vc-handled-backends} to @code{nil}
+@iftex
+(@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
 (@pxref{Customizing VC}).
+@end ifnottex
+
 
 @menu
 * Introduction to VC::  How version control works in general.
@@ -1182,10 +1233,12 @@ customizable variable @code{vc-handled-backends} to @code{nil}
 * Old Versions::        Examining and comparing old versions.
 * Secondary VC Commands::    The commands used a little less frequently.
 * Branches::            Multiple lines of development.
+@ifnottex
 * Remote Repositories:: Efficient access to remote CVS servers.
 * Snapshots::           Sets of file versions treated as a unit.
 * Miscellaneous VC::    Various other commands and features of VC.
 * Customizing VC::      Variables that change VC's behavior.
+@end ifnottex
 @end menu
 
 @node Introduction to VC
@@ -1262,12 +1315,14 @@ merging, and use of symbolic links and meta-data in repositories.
 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.  You should use
-SCCS only if for some reason you cannot use RCS, or one of the
-higher-level systems such as CVS or GNU Arch.
+as multiple branches, are not available with SCCS.  Since SCCS is
+non-free, not respecting its users freedom, 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
+everything said about CVS applies to GNU Arch, Subversion and Meta-CVS
 as well.
 
 @node VC Concepts
@@ -1321,7 +1376,13 @@ permitted; check-in is still the way to record a new version.
   CVS normally allows each user to modify his own copy of the work file
 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.
+@iftex
+(@pxref{CVS Options,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
 (@pxref{CVS Options}).
+@end ifnottex
+
 
 @node Types of Log File
 @subsubsection Types of Log File
@@ -1353,7 +1414,14 @@ 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}).
+to copy it to @file{ChangeLog}
+@iftex
+(@pxref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{Change Logs and VC}).
+@end ifnottex
+
 
 @node VC Mode Line
 @subsection Version Control and the Mode Line
@@ -1517,8 +1585,15 @@ the repository.
 @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}).
+with two version control systems at the same time
+@iftex
+(@pxref{Local Version Control,,,emacs-xtra, Specialized Emacs
+Features}).
+@end iftex
+@ifnottex
+(@pxref{Local Version Control}).
+@end ifnottex
+
 @end itemize
 
 @node Log Buffer
@@ -1527,29 +1602,42 @@ Version Control}).
   When you check in changes, @kbd{C-x v v} first reads a log entry.  It
 pops up a buffer called @samp{*VC-Log*} for you to enter the log entry.
 
-Sometimes the @samp{*VC-Log*} buffer contains default text when you enter it,
+  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}
+  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}.)
+@iftex
+@xref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features},
+@end iftex
+@ifnottex
+@xref{Change Logs and VC},
+@end ifnottex
+for the opposite way of working---generating ChangeLog entries from
+the revision control log.
+
+  In the @samp{*VC-Log*} buffer, @kbd{C-c C-f} (@kbd{M-x
+log-edit-show-files}) shows the list of files to be committed in case
+you need to check that.  (This can be a list of more than one file if
+you use VC Dired mode or PCL-CVS.
+@iftex
+@xref{VC Dired Mode,,,emacs-xtra, Specialized Emacs Features},
+@end iftex
+@ifnottex
+@xref{VC Dired Mode},
+@end ifnottex
+and @ref{Top, , About PCL-CVS, pcl-cvs, PCL-CVS --- The Emacs
+Front-End to CVS}.)
 
-When you have finished editing the log message, type @kbd{C-c C-c} to
+  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
@@ -1582,8 +1670,8 @@ Examine version @var{version} of the visited file, in a buffer of its
 own.
 
 @item C-x v =
-Compare the current buffer contents with the latest checked-in version
-of the file.
+Compare the current buffer contents with the master version from which
+you started editing.
 
 @item C-u C-x v = @var{file} @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET}
 Compare the specified two versions of @var{file}.
@@ -1606,15 +1694,22 @@ 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.  Both
-forms display the output in a special buffer in another window.
+necessary) with the master version from which you started editing the
+file (this is not necessarily the latest 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.
+@iftex
+(@pxref{Snapshots,,,emacs-xtra, Specialized Emacs Features})
+@end iftex
+@ifnottex
+(@pxref{Snapshots})
+@end ifnottex
+instead of one or both version numbers.
 
   If you supply a directory name instead of the name of a registered
 file, this command compares the two specified versions of all registered
@@ -1632,70 +1727,66 @@ 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}.
+  The buffer produced by @kbd{C-x v =} supports the commands of
+Compilation mode (@pxref{Compilation Mode}), such as @kbd{C-x `} and
+@kbd{C-c C-c}, in both the ``old'' and ``new'' text, and they always
+find the corresponding locations in the current work file.  (Older
+versions are not, in general, present as files on your disk.)
 
 @findex vc-annotate
 @kindex C-x v g
-  For some backends, you can display the file @dfn{annotated} with
+  For some back ends, you can display the file @dfn{annotated} with
 per-line version information and using colors to enhance the visual
-appearance, with the the command @kbd{M-x vc-annotate}.
-It creates a new buffer
-to display file's text, colored to show how old each part 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.
+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 color is scaled over the full range of ages, such that the oldest
+changes are blue, and the newest changes are red.
 
   When you give a prefix argument to this command, 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:
-
-@itemize @bullet
-
-@item
-Pressing @kbd{P} annotates the previous revision.  It also takes a
-numeric prefix argument, so for example @kbd{C-u 10 P} would take you
-back 10 revisions.
-
-@item
-Pressing @kbd{N} annotates the next revision.  It also takes a numeric
-prefix argument, so for example @kbd{C-u 10 N} would take you forward
-10 revisions.
-
-@item
-Pressing @kbd{J} annotates the revision at line (as denoted by the
-version number on the same line).
-
-@item
-Pressing @kbd{A} annotates the revision previous to line (as denoted
-by the version number on the same line).  This is useful to see the
-state the file was in before the change on the current line was made.
-
-@item
-Pressing @kbd{D} shows the diff of the revision at line with its
-previous revision.  This is useful to see what actually changed when
-the revision denoted on the current line was committed.
+annotate (instead of the current file contents), and the time span in
+days the color range should cover.  
 
-@item
-Pressing @kbd{L} shows the log of the revision at line.  This is
-useful to see the author's description of the changes that occurred
-when the revision denoted on the current line was committed.
+  From the annotate buffer, these and other color scaling options are
+available from the @samp{VC-Annotate} menu.  In this buffer, you can
+also use the following keys to browse the annotations of past revisions,
+view diffs, or view log entries:
 
-@item
-Pressing @kbd{W} annotates the workfile (most up to date) version.  If
-you used @kbd{P} and @kbd{N} to browse to other revisions, use this
-key to return to the latest version.
-@end itemize
+@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 your current version.
+@end table
 
 @node Secondary VC Commands
 @subsection The Secondary Commands of VC
@@ -1707,8 +1798,10 @@ use once a day.
 * Registering::         Putting a file under version control.
 * VC Status::           Viewing the VC status of files.
 * VC Undo::             Canceling changes before or after check-in.
+@ifnottex
 * VC Dired Mode::       Listing files managed by version control.
 * VC Dired Commands::   Commands to use in a VC Dired buffer.
+@end ifnottex
 @end menu
 
 @node Registering
@@ -1727,19 +1820,26 @@ Register the visited file for version control.
   To register the file, Emacs must choose which version control system
 to use for it.  If the file's directory already contains files
 registered in a version control system, Emacs uses that system.  If
-there is more than one system in use for a directory, Emacs uses the one
-that appears first in @code{vc-handled-backends} (@pxref{Customizing VC}).
-On the other hand, if there are no files already registered,
-Emacs uses the first system from @code{vc-handled-backends} that could
-register the file (for example, you cannot register a file under CVS if
-its directory is not already part of a CVS tree); with the default
-value of @code{vc-handled-backends}, this means that Emacs uses RCS in
-this situation.
+there is more than one system in use for a directory, Emacs uses the
+one that appears first in @code{vc-handled-backends}
+@iftex
+(@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{Customizing VC}).
+@end ifnottex
+On the other hand, if there are no files already registered, Emacs uses
+the first system from @code{vc-handled-backends} that could register
+the file (for example, you cannot register a file under CVS if its
+directory is not already part of a CVS tree); with the default value
+of @code{vc-handled-backends}, this means that Emacs uses RCS in this
+situation.
 
   If locking is in use, @kbd{C-x v i} leaves the file unlocked and
 read-only.  Type @kbd{C-x v v} if you wish to start editing it.  After
 registering a file with CVS, you must subsequently commit the initial
-version by typing @kbd{C-x v v}.
+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
@@ -1767,14 +1867,67 @@ 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
+@iftex
+(@pxref{VC Dired Mode,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{VC Dired Mode}).
+@end ifnottex
+Otherwise, just move to the beginning of the log.  A numeric prefix
+argument is a repeat count, so @kbd{C-u 10 P} would move backward 10
+files.
+
+@item N
+Move to the log of the next file, when the logs of multiple files are
+in the log buffer
+@iftex
+(@pxref{VC Dired Mode,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{VC Dired Mode}).
+@end ifnottex
+It also takes a numeric prefix argument as a repeat count.
+
+@item f
+Visit the revision indicated at the current line, like typing @kbd{C-x
+v ~} and specifying this revision's 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
 
 @table @kbd
 @item C-x v u
-Revert the buffer and the file to the last checked-in version.
+Revert the buffer and the file to the version from which you started
+editing the file.
 
 @item C-x v c
 Remove the last-entered change from the master for the visited file.
@@ -1784,11 +1937,11 @@ This undoes your last check-in.
 @kindex C-x v u
 @findex vc-revert-buffer
   If you want to discard your current set of changes and revert to the
-last version checked in, use @kbd{C-x v u} (@code{vc-revert-buffer}).
-This leaves the file unlocked; if locking is in use, you must first lock
-the file again before you change it again.  @kbd{C-x v u} requires
-confirmation, unless it sees that you haven't made any changes since the
-last checked-in version.
+version from which you started editing the file, use @kbd{C-x v u}
+(@code{vc-revert-buffer}).  This leaves the file unlocked; if locking
+is in use, you must first lock the file again before you change it
+again.  @kbd{C-x v u} requires confirmation, unless it sees that you
+haven't made any changes with respect to the master version.
 
   @kbd{C-x v u} is also the command to unlock a file if you lock it and
 then decide not to change it.
@@ -1797,9 +1950,11 @@ then decide not to change it.
 @findex vc-cancel-version
   To cancel a change that you already checked in, use @kbd{C-x v c}
 (@code{vc-cancel-version}).  This command discards all record of the
-most recent checked-in version.  @kbd{C-x v c} also offers to revert
-your work file and buffer to the previous version (the one that precedes
-the version that is deleted).
+most recent checked-in version, but only if your work file corresponds
+to that version---you cannot use @kbd{C-x v c} to cancel a version
+that is not the latest on its branch.  @kbd{C-x v c} also offers to
+revert your work file and buffer to the previous version (the one that
+precedes the version that is deleted).
 
   If you answer @kbd{no}, VC keeps your changes in the buffer, and locks
 the file.  The no-revert option is useful when you have checked in a
@@ -1807,10 +1962,16 @@ change and then discover a trivial error in it; you can cancel the
 erroneous check-in, fix the error, and check the file in again.
 
   When @kbd{C-x v c} does not revert the buffer, it unexpands all
-version control headers in the buffer instead (@pxref{Version Headers}).
+version control headers in the buffer instead
+@iftex
+(@pxref{Version Headers,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{Version Headers}).
+@end ifnottex
 This is because the buffer no longer corresponds to any existing
-version.  If you check it in again, the check-in process will expand the
-headers properly for the new version number.
+version.  If you check it in again, the check-in process will expand
+the headers properly for the new version number.
 
   However, it is impossible to unexpand the RCS @samp{@w{$}Log$} header
 automatically.  If you use that header feature, you have to unexpand it
@@ -1822,123 +1983,12 @@ confirmation with @kbd{yes}.  Note also that this command is disabled
 under CVS, because canceling versions is very dangerous and discouraged
 with CVS.
 
-@node VC Dired Mode
-@subsubsection Dired under VC
-
-@cindex PCL-CVS
-@pindex cvs
-@cindex CVS Dired Mode
-  The VC Dired Mode described here works with all the version control
-systems that VC supports.  Another more powerful facility, designed
-specifically for CVS, is called PCL-CVS.  @xref{Top, , About PCL-CVS,
-pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}.
-
-@kindex C-x v d
-@findex vc-directory
-  When you are working on a large program, it is often useful to find
-out which files have changed within an entire directory tree, or to view
-the status of all files under version control at once, and to perform
-version control operations on collections of files.  You can use the
-command @kbd{C-x v d} (@code{vc-directory}) to make a directory listing
-that includes only files relevant for version control.
-
-@vindex vc-dired-terse-display
-  @kbd{C-x v d} creates a buffer which uses VC Dired Mode.  This looks
-much like an ordinary Dired buffer (@pxref{Dired}); however, normally it
-shows only the noteworthy files (those locked or not up-to-date).  This
-is called @dfn{terse display}.  If you set the variable
-@code{vc-dired-terse-display} to @code{nil}, then VC Dired shows all
-relevant files---those managed under version control, plus all
-subdirectories (@dfn{full display}).  The command @kbd{v t} in a VC
-Dired buffer toggles between terse display and full display (@pxref{VC
-Dired Commands}).
-
-@vindex vc-dired-recurse
-  By default, VC Dired produces a recursive listing of noteworthy or
-relevant files at or below the given directory.  You can change this by
-setting the variable @code{vc-dired-recurse} to @code{nil}; then VC
-Dired shows only the files in the given directory.
-
-  The line for an individual file shows the version control state in the
-place of the hard link count, owner, group, and size of the file.  If
-the file is unmodified, in sync with the master file, the version
-control state shown is blank.  Otherwise it consists of text in
-parentheses.  Under RCS and SCCS, the name of the user locking the file
-is shown; under CVS, an abbreviated version of the @samp{cvs status}
-output is used.  Here is an example using RCS:
-
-@smallexample
-@group
-  /home/jim/project:
-
-  -rw-r--r-- (jim)      Apr  2 23:39 file1
-  -r--r--r--            Apr  5 20:21 file2
-@end group
-@end smallexample
-
-@noindent
-The files @samp{file1} and @samp{file2} are under version control,
-@samp{file1} is locked by user jim, and @samp{file2} is unlocked.
-
-  Here is an example using CVS:
-
-@smallexample
-@group
-  /home/joe/develop:
-
-  -rw-r--r-- (modified) Aug  2  1997 file1.c
-  -rw-r--r--            Apr  4 20:09 file2.c
-  -rw-r--r-- (merge)    Sep 13  1996 file3.c
-@end group
-@end smallexample
-
-  Here @samp{file1.c} is modified with respect to the repository, and
-@samp{file2.c} is not.  @samp{file3.c} is modified, but other changes
-have also been checked in to the repository---you need to merge them
-with the work file before you can check it in.
-
-@vindex vc-directory-exclusion-list
-  When VC Dired displays subdirectories (in the ``full'' display mode),
-it omits some that should never contain any files under version control.
-By default, this includes Version Control subdirectories such as
-@samp{RCS} and @samp{CVS}; you can customize this by setting the
-variable @code{vc-directory-exclusion-list}.
-
-  You can fine-tune VC Dired's format by typing @kbd{C-u C-x v d}---as in
-ordinary Dired, that allows you to specify additional switches for the
-@samp{ls} command.
-
-@node VC Dired Commands
-@subsubsection VC Dired Commands
-
-  All the usual Dired commands work normally in VC Dired mode, except
-for @kbd{v}, which is redefined as the version control prefix.  You can
-invoke VC commands such as @code{vc-diff} and @code{vc-print-log} by
-typing @kbd{v =}, or @kbd{v l}, and so on.  Most of these commands apply
-to the file name on the current line.
-
-  The command @kbd{v v} (@code{vc-next-action}) operates on all the
-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.  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
-registering or checking in several files at once, as part of the same
-change.
-
-@findex vc-dired-toggle-terse-mode
-@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
-@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
-currently locked.
+@ifnottex
+@c vc1-xtra.texi needs extra level of lowering.
+@lowersections
+@include vc1-xtra.texi
+@raisesections
+@end ifnottex
 
 @node Branches
 @subsection Multiple Branches of a File
@@ -2118,9 +2168,15 @@ own choice of selected versions, but all share the same common RCS
 records.
 
   This technique works reliably and automatically, provided that the
-source files contain RCS version headers (@pxref{Version Headers}).  The
-headers enable Emacs to be sure, at all times, which version number is
-present in the work file.
+source files contain RCS version headers
+@iftex
+(@pxref{Version Headers,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{Version Headers}).
+@end ifnottex
+The headers enable Emacs to be sure, at all times, which version
+number is present in the work file.
 
   If the files do not have version headers, you must instead tell Emacs
 explicitly in each session which branch you are working on.  To do this,
@@ -2128,703 +2184,9 @@ 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.
 
-@node Remote Repositories
-@subsection Remote Repositories
-@cindex remote repositories (CVS)
-
-  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.
-
-  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.
-* Local Version Control::  Using another version system for local editing.
-@end menu
-
-@node Version Backups
-@subsubsection Version Backups
-@cindex version backups
-
-@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 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
-@cindex local version control
-@cindex local back end (version control)
-
-When you make many changes to a file that comes from a remote
-repository, it can be convenient to have version control on your local
-machine as well.  You can then record intermediate versions, revert to
-a previous state, etc., before you actually commit your changes to the
-remote server.
-
-VC lets you do this by putting a file under a second, local version
-control system, so that the file is effectively registered in two
-systems at the same time.  For the description here, we will assume
-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 @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 @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 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 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 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
-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
-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
-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
-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
-@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} ``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
-@cindex snapshots and version control
-
-  A @dfn{snapshot} is a named set of file versions (one for each
-registered file) that you can treat as a unit.  One important kind of
-snapshot is a @dfn{release}, a (theoretically) stable version of the
-system that is ready for distribution to users.
-
-@menu
-* Making Snapshots::           The snapshot facilities.
-* Snapshot Caveats::           Things to be careful of when using snapshots.
-@end menu
-
-@node Making Snapshots
-@subsubsection Making and Using Snapshots
-
-  There are two basic commands for snapshots; one makes a
-snapshot with a given name, the other retrieves a named snapshot.
-
-@table @code
-@kindex C-x v s
-@findex vc-create-snapshot
-@item C-x v s @var{name} @key{RET}
-Define the last saved versions of every registered file in or under the
-current directory as a snapshot named @var{name}
-(@code{vc-create-snapshot}).
-
-@kindex C-x v r
-@findex vc-retrieve-snapshot
-@item C-x v r @var{name} @key{RET}
-For all registered files at or below the current directory level, select
-whatever versions correspond to the snapshot @var{name}
-(@code{vc-retrieve-snapshot}).
-
-This command reports an error if any files are locked at or below the
-current directory, without changing anything; this is to avoid
-overwriting work in progress.
-@end table
-
-  A snapshot uses a very small amount of resources---just enough to record
-the list of file names and which version belongs to the snapshot.  Thus,
-you need not hesitate to create snapshots whenever they are useful.
-
-  You can give a snapshot name as an argument to @kbd{C-x v =} or
-@kbd{C-x v ~} (@pxref{Old Versions}).  Thus, you can use it to compare a
-snapshot against the current files, or two snapshots against each other,
-or a snapshot against a named version.
-
-@node Snapshot Caveats
-@subsubsection Snapshot Caveats
-
-@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.
-
-@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.
-
-  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.
-
-  File renaming and deletion can create some difficulties with snapshots.
-This is not a VC-specific problem, but a general design issue in version
-control systems that no one has solved very well yet.
-
-  If you rename a registered file, you need to rename its master along
-with it (the command @code{vc-rename-file} does this automatically).  If
-you are using SCCS, you must also update the records of the snapshot, to
-mention the file by its new name (@code{vc-rename-file} does this,
-too).  An old snapshot that refers to a master file that no longer
-exists under the recorded name is invalid; VC can no longer retrieve
-it.  It would be beyond the scope of this manual to explain enough about
-RCS and SCCS to 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 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
-won't really work as retrieved.
-
-@node Miscellaneous VC
-@subsection Miscellaneous Commands and Features of VC
-
-  This section explains the less-frequently-used features of VC.
-
-@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
-                          file correctly.
-* Version Headers::     Inserting version control headers into working files.
-@end menu
-
-@node Change Logs and VC
-@subsubsection Change Logs and VC
-
-  If you use RCS or CVS for a program and also maintain a change log
-file for it (@pxref{Change Log}), you can generate change log entries
-automatically from the version control log entries:
-
-@table @kbd
-@item C-x v a
-@kindex C-x v a
-@findex vc-update-change-log
-Visit the current directory's change log file and, for registered files
-in that directory, create new entries for versions checked in since the
-most recent entry in the change log file.
-(@code{vc-update-change-log}).
-
-This command works with RCS or CVS only, not with SCCS.
-
-@item C-u C-x v a
-As above, but only find entries for the current buffer's file.
-
-@item M-1 C-x v a
-As above, but find entries for all the currently visited files that are
-maintained with version control.  This works only with RCS, and it puts
-all entries in the log for the default directory, which may not be
-appropriate.
-@end table
-
-  For example, suppose the first line of @file{ChangeLog} is dated
-1999-04-10, and that the only check-in since then was by Nathaniel
-Bowditch to @file{rcs2log} on 1999-05-22 with log text @samp{Ignore log
-messages that start with `#'.}.  Then @kbd{C-x v a} visits
-@file{ChangeLog} and inserts text like this:
-
-@iftex
-@medbreak
-@end iftex
-@smallexample
-@group
-1999-05-22  Nathaniel Bowditch  <nat@@apn.org>
-
-        * rcs2log: Ignore log messages that start with `#'.
-@end group
-@end smallexample
-@iftex
-@medbreak
-@end iftex
-
-@noindent
-You can then edit the new change log entry further as you wish.
-
-  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
-if the text of the log entry starts with @w{@samp{(@var{functionname}):
-}}.  For example, if the log entry for @file{vc.el} is
-@samp{(vc-do-command): Check call-process status.}, then the text in
-@file{ChangeLog} looks like this:
-
-@iftex
-@medbreak
-@end iftex
-@smallexample
-@group
-1999-05-06  Nathaniel Bowditch  <nat@@apn.org>
-
-        * vc.el (vc-do-command): Check call-process status.
-@end group
-@end smallexample
-@iftex
-@medbreak
-@end iftex
-
-  When @kbd{C-x v a} adds several change log entries at once, it groups
-related log entries together if they all are checked in by the same
-author at nearly the same time.  If the log entries for several such
-files all have the same text, it coalesces them into a single entry.
-For example, suppose the most recent check-ins have the following log
-entries:
-
-@flushleft
-@bullet{} For @file{vc.texinfo}: @samp{Fix expansion typos.}
-@bullet{} For @file{vc.el}: @samp{Don't call expand-file-name.}
-@bullet{} For @file{vc-hooks.el}: @samp{Don't call expand-file-name.}
-@end flushleft
-
-@noindent
-They appear like this in @file{ChangeLog}:
-
-@iftex
-@medbreak
-@end iftex
-@smallexample
-@group
-1999-04-01  Nathaniel Bowditch  <nat@@apn.org>
-
-        * vc.texinfo: Fix expansion typos.
-
-        * vc.el, vc-hooks.el: Don't call expand-file-name.
-@end group
-@end smallexample
-@iftex
-@medbreak
-@end iftex
-
-  Normally, @kbd{C-x v a} separates log entries by a blank line, but you
-can mark several related log entries to be clumped together (without an
-intervening blank line) by starting the text of each related log entry
-with a label of the form @w{@samp{@{@var{clumpname}@} }}.  The label
-itself is not copied to @file{ChangeLog}.  For example, suppose the log
-entries are:
-
-@flushleft
-@bullet{} For @file{vc.texinfo}: @samp{@{expand@} Fix expansion typos.}
-@bullet{} For @file{vc.el}: @samp{@{expand@} Don't call expand-file-name.}
-@bullet{} For @file{vc-hooks.el}: @samp{@{expand@} Don't call expand-file-name.}
-@end flushleft
-
-@noindent
-Then the text in @file{ChangeLog} looks like this:
-
-@iftex
-@medbreak
-@end iftex
-@smallexample
-@group
-1999-04-01  Nathaniel Bowditch  <nat@@apn.org>
-
-        * vc.texinfo: Fix expansion typos.
-        * vc.el, vc-hooks.el: Don't call expand-file-name.
-@end group
-@end smallexample
-@iftex
-@medbreak
-@end iftex
-
-  A log entry whose text begins with @samp{#} is not copied to
-@file{ChangeLog}.  For example, if you merely fix some misspellings in
-comments, you can log the change with an entry beginning with @samp{#}
-to avoid putting such trivia into @file{ChangeLog}.
-
-@node Renaming and VC
-@subsubsection Renaming VC Work Files and Master Files
-
-@findex vc-rename-file
-  When you rename a registered file, you must also rename its master
-file correspondingly to get proper results.  Use @code{vc-rename-file}
-to rename the source file as you specify, and rename its master file
-accordingly.  It also updates any snapshots (@pxref{Snapshots}) that
-mention the file, so that they use the new name; despite this, the
-snapshot thus modified may not completely work (@pxref{Snapshot
-Caveats}).
-
-  You cannot use @code{vc-rename-file} on a file that is locked by
-someone else.
-
-@node Version Headers
-@subsubsection Inserting Version Control Headers
-
-   Sometimes it is convenient to put version identification strings
-directly into working files.  Certain special strings called
-@dfn{version headers} are replaced in each successive version by the
-number of that version.
-
-  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
-master files, which is done when there are no version headers.  Note
-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} (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
-  You can use the @kbd{C-x v h} command (@code{vc-insert-headers}) to
-insert a suitable header string.
-
-@table @kbd
-@item C-x v h
-Insert headers in a file for use with your version-control system.
-@end table
-
-@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 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.  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,
-on a new line at point.  Normally the ordinary comment
-start and comment end strings of the current mode are used, but for
-certain modes, there are special comment delimiters for this purpose;
-the variable @code{vc-comment-alist} specifies them.  Each element of
-this list has the form @code{(@var{mode} @var{starter} @var{ender})}.
-
-@vindex vc-static-header-alist
-  The variable @code{vc-static-header-alist} specifies further strings
-to add based on the name of the buffer.  Its value should be a list of
-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-@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
-@group
-(("\\.c$" .
-  "\n#ifndef lint\nstatic char vcid[] = \"\%s\";\n\
-#endif /* lint */\n"))
-@end group
-@end example
-
-@noindent
-It specifies insertion of text of this form:
-
-@example
-@group
-
-#ifndef lint
-static char vcid[] = "@var{string}";
-#endif /* lint */
-@end group
-@end example
-
-@noindent
-Note that the text above starts with a blank line.
-
-  If you use more than one version header in a file, put them close
-together in the file.  The mechanism in @code{revert-buffer} that
-preserves markers may not handle markers positioned between two version
-headers.
-
-@node Customizing VC
-@subsection Customizing VC
-
-@vindex vc-handled-backends
-The variable @code{vc-handled-backends} determines which version
-control systems VC should handle.  The default value is @code{(RCS CVS
-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
-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 that apply to multiple back ends.
-* RCS and SCCS::        Options for RCS and SCCS.
-* CVS Options::         Options for CVS.
-@end menu
-
-@node General VC Options
-@subsubsection General Options
-
-@vindex vc-make-backup-files
-  Emacs normally does not save backup files for source files that are
-maintained with version control.  If you want to make backup files even
-for files that use version control, set the variable
-@code{vc-make-backup-files} to a non-@code{nil} value.
-
-@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 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.)
-
-@vindex vc-follow-symlinks
-  Editing a version-controlled file through a symbolic link can be
-dangerous.  It bypasses the version control system---you can edit the
-file without locking it, and fail to check your changes in.  Also,
-your changes might overwrite those of another user.  To protect against
-this, VC checks each symbolic link that you visit, to see if it points
-to a file under version control.
-
-  The variable @code{vc-follow-symlinks} controls what to do when a
-symbolic link points to a version-controlled file.  If it is @code{nil},
-VC only displays a warning message.  If it is @code{t}, VC automatically
-follows the link, and visits the real file instead, telling you about
-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 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
-that it should always ask for confirmation.)
-
-@vindex vc-command-messages
-  VC mode does much of its work by running the shell commands for RCS,
-CVS and SCCS.  If @code{vc-command-messages} is non-@code{nil}, VC
-displays messages to indicate which shell commands it runs, and
-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.  It is rarely necessary to
-set this variable, because VC normally finds the proper files
-automatically.
-
-@node RCS and SCCS
-@subsubsection Options for RCS and SCCS
-
-@cindex non-strict locking (RCS)
-@cindex locking, non-strict (RCS)
-  By default, RCS uses locking to coordinate the activities of several
-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 @code{rcs} manual page for details.
-
-  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
-the master file has to be consulted, which is rather expensive.  Also
-the master file can only tell you @emph{if} there's any lock on the
-file, but not whether your work file really contains that locked
-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 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
-permissions by setting the variable @code{vc-mistrust-permissions}.
-Its value can be @code{t} (always mistrust the file permissions and
-check the master file), @code{nil} (always trust the file
-permissions), or a function of one argument which makes the decision.
-The argument is the directory name of the @file{RCS} subdirectory.  A
-non-@code{nil} value from the function says to mistrust the file
-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
-
-@cindex locking (CVS)
-  By default, CVS does not use locking to coordinate the activities of
-several users; anyone can change a work file at any time.  However,
-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
-(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 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.
-
-@vindex vc-cvs-stay-local
-@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
-@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
-@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 @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 @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 @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.
+@ifnottex
+@include vc2-xtra.texi
+@end ifnottex
 
 @node Directories
 @section File Directories
@@ -2835,8 +2197,8 @@ only for repositories from hosts that match the pattern.
 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}
@@ -2886,9 +2248,10 @@ default).
 
 @vindex directory-free-space-program
 @vindex directory-free-space-args
-  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
+  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
@@ -2902,13 +2265,8 @@ 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-goto-source
-  After running @kbd{M-x diff}, you can use @kbd{C-x `} to visit
-successive changed locations in the two source files, as in
-Compilation mode (@pxref{Compilation}.)  In the @samp{*diff*} buffer,
-you can move to a particular hunk of changes and type @kbd{C-c C-c}
-(@code{diff-goto-source}) to visit the corresponding source location.
+@xref{Top,, Diff, diff, Comparing and Merging Files}, for more
+information about @command{diff} output formats.
 
 @findex diff-backup
   The command @kbd{M-x diff-backup} compares a specified file with its most
@@ -2917,13 +2275,19 @@ recent backup.  If you specify the name of a backup file,
 of.
 
 @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
@@ -2934,16 +2298,6 @@ 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.
 
-@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.''
-
 @cindex Smerge mode
 @findex smerge-mode
 @cindex failed merges
@@ -2956,8 +2310,94 @@ typically the result of a failed merge from a version control system
 mode provides commands to resolve conflicts by selecting specific
 changes.
 
-  See also @ref{Emerge}, and @ref{Top,,, ediff, The Ediff Manual}, for
-convenient facilities for merging two similar files.
+@iftex
+@xref{Emerge,,, emacs-xtra, Specialized Emacs Features},
+@end iftex
+@ifnottex
+@xref{Emerge},
+@end ifnottex
+for the Emerge facility, which provides a powerful interface for
+merging files.
+
+@node Diff Mode
+@section Diff Mode
+@cindex Diff mode
+@findex diff-mode
+@cindex patches, editing
+
+  Diff mode is used for the output of @kbd{M-x diff}; it is also
+useful for editing patches and comparisons produced by the
+@command{diff} program.  To select Diff mode manually, type @kbd{M-x
+diff-mode}.
+
+  One general feature of Diff mode is that manual edits to the patch
+automatically correct line numbers, including those in the hunk
+header, so that you can actually apply the edited patch.  Diff mode
+also provides the following commands to navigate, manipulate and apply
+parts of patches:
+
+@table @kbd
+@item M-n
+Move to the next hunk-start (@code{diff-hunk-next}).
+
+@item M-p
+Move to the previous hunk-start (@code{diff-hunk-prev}).
+
+@item M-@}
+Move to the next file-start, in a multi-file patch
+(@code{diff-file-next}).
+
+@item M-@{
+Move to the previous file-start, in a multi-file patch
+(@code{diff-file-prev}).
+
+@item M-k
+Kill the hunk at point (@code{diff-hunk-kill}).
+
+@item M-K
+In a multi-file patch, kill the current file part.
+(@code{diff-file-kill}).
+
+@item C-c C-a
+Apply this hunk to its target file (@code{diff-apply-hunk}).  With a
+prefix argument of @kbd{C-u}, revert this hunk.
+
+@item C-c C-c
+Go to the source corresponding to this hunk (@code{diff-goto-source}).
+
+@item C-c C-e
+Start an Ediff session with the patch (@code{diff-ediff-patch}).
+@xref{Top, Ediff, Ediff, ediff, The Ediff Manual}.
+
+@item C-c C-n
+Restrict the view to the current hunk (@code{diff-restrict-view}).
+@xref{Narrowing}.  With a prefix argument of @kbd{C-u}, restrict the
+view to the current patch of a multiple file patch.  To widen again,
+use @kbd{C-x n w}.
+
+@item C-c C-r
+Reverse the direction of comparison for the entire buffer
+(@code{diff-reverse-direction}).
+
+@item C-c C-s
+Split the hunk at point (@code{diff-split-hunk}).  This is for
+manually editing patches, and only works with the unified diff format.
+
+@item C-c C-u
+Convert the entire buffer to unified format
+(@code{diff-context->unified}).  With a prefix argument, convert
+unified format to context format.  In Transient Mark mode, when the
+mark is active, this command operates only on the region.
+
+@item C-c C-w
+Refine the current hunk so that it disregards changes in whitespace
+(@code{diff-refine-hunk}).
+@end table
+
+  @kbd{C-x 4 a} in Diff mode operates on behalf of the target file,
+but gets the function name from the patch itself.  @xref{Change Log}.
+This is useful for making log entries for functions that are deleted
+by the patch.
 
 @node Misc File Ops
 @section Miscellaneous File Operations
@@ -2992,8 +2432,10 @@ 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)
@@ -3053,7 +2495,7 @@ support them, this command is not defined.
 @pindex gzip
 
   Emacs automatically uncompresses compressed files when you visit
-them, and automatically recompress them if you alter them and save
+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.
@@ -3082,19 +2524,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 @key{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
+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.
@@ -3210,8 +2653,6 @@ This is achieved using the variable @code{auto-save-file-name-transforms}.
   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
@@ -3221,8 +2662,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}
@@ -3253,6 +2694,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.
@@ -3297,9 +2739,9 @@ file by name, without having to remember exactly where it is located.
 When typing a file name in the minibuffer, @kbd{C-@key{tab}}
 (@code{file-cache-minibuffer-complete}) completes it using the file
 name cache.  If you repeat @kbd{C-@key{tab}}, that cycles through the
-possible completions of what you had originally typed.  Note that the
-@kbd{C-@key{tab}} character cannot be typed on most text-only
-terminals.
+possible completions of what you had originally typed.  (However, note
+that the @kbd{C-@key{tab}} character cannot be typed on most text-only
+terminals.)
 
   The file name cache does not fill up automatically.  Instead, you
 load file names into the cache using these commands:
@@ -3324,6 +2766,10 @@ of directory names.
 Clear the cache; that is, remove all file names from it.
 @end table
 
+  The file name cache is not persistent: it is kept and maintained
+only for the duration of the Emacs session.  You can view the contents
+of the cache with the @code{file-cache-display} command.
+
 @node File Conveniences
 @section Convenience Features for Finding Files
 
@@ -3380,7 +2826,7 @@ This adds a @samp{Filesets} menu to the menu bar.
 
 @findex filesets-add-buffer
 @findex filesets-remove-buffer
-  The simplest way to define filesets is by adding files to them one
+  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