@c -*-texinfo-*-
@c This is part of the XEmacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+@c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
@c See the file lispref.texi for copying conditions.
@setfilename ../../info/backups.info
@node Backups and Auto-Saving, Buffers, Files, Top
@smallexample
@group
-(add-hook 'rmail-mode-hook
+(add-hook 'rmail-mode-hook
(function (lambda ()
- (make-local-variable
+ (make-local-variable
'make-backup-files)
(setq make-backup-files nil))))
@end group
@subsection Backup by Renaming or by Copying?
@cindex backup files, how to make them
- There are two ways that XEmacs can make a backup file:
+ There are two ways that XEmacs can make a backup file:
@itemize @bullet
@item
Some file comparison commands use this function so that they can
automatically compare a file with its most recent backup.
-@end defun
+@end defun
@node Auto-Saving
@section Auto-Saving
than a limited amount of work if the system crashes. By default,
auto-saves happen every 300 keystrokes, or after around 30 seconds of
idle time. @xref{Auto-Save, Auto-Save, Auto-Saving: Protection Against
-Disasters, emacs, The XEmacs Reference Manual}, for information on auto-save
-for users. Here we describe the functions used to implement auto-saving
-and the variables that control them.
+Disasters, xemacs, The XEmacs Lisp Reference Manual}, for information on
+auto-save for users. Here we describe the functions used to implement
+auto-saving and the variables that control them.
@defvar buffer-auto-save-file-name
This buffer-local variable is the name of the file used for
correspondingly.
@end defun
-@defun make-auto-save-file-name
+@defun make-auto-save-file-name &optional filename
This function returns the file name to use for auto-saving the current
buffer. This is just the file name with hash marks (@samp{#}) appended
and prepended to it. This function does not look at the variable
If you have made extensive changes to a file and then change your mind
about them, you can get rid of them by reading in the previous version
of the file with the @code{revert-buffer} command. @xref{Reverting, ,
-Reverting a Buffer, emacs, The XEmacs Reference Manual}.
+Reverting a Buffer, xemacs, The XEmacs Lisp Reference Manual}.
-@deffn Command revert-buffer &optional check-auto-save noconfirm
+@deffn Command revert-buffer &optional check-auto-save noconfirm preserve-modes
This command replaces the buffer text with the text of the visited
file on disk. This action undoes all changes since the file was visited
or saved.
the buffer; but if the argument @var{noconfirm} is non-@code{nil},
@code{revert-buffer} does not ask for confirmation.
+Optional third argument @var{preserve-modes} non-@code{nil} means don't
+alter the files modes. Normally we reinitialize them using
+@code{normal-mode}.
+
Reverting tries to preserve marker positions in the buffer by using the
replacement feature of @code{insert-file-contents}. If the buffer
contents and the file contents are identical before the revert