Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.ca
[bpt/emacs.git] / doc / lispref / backups.texi
index 2bcb768..f2599c7 100644 (file)
@@ -1,9 +1,9 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990-1995, 1999, 2001-2012  Free Software Foundation, Inc.
+@c Copyright (C) 1990-1995, 1999, 2001-2013 Free Software Foundation,
+@c Inc.
 @c See the file elisp.texi for copying conditions.
-@setfilename ../../info/backups
-@node Backups and Auto-Saving, Buffers, Files, Top
+@node Backups and Auto-Saving
 @chapter Backups and Auto-Saving
 @cindex backups and auto-saving
 
@@ -442,12 +442,14 @@ buffer-auto-save-file-name
 @end defvar
 
 @deffn Command auto-save-mode arg
-When used interactively without an argument, this command is a toggle
-switch: it turns on auto-saving of the current buffer if it is off,
-and vice versa.  When called from Lisp with no argument, it turns
-auto-saving on.  With an argument @var{arg}, it turns auto-saving on
-if the value of @var{arg} is @code{t}, a nonempty list, or a positive
-integer; otherwise, it turns auto-saving off.
+This is the mode command for Auto Save mode, a buffer-local minor
+mode.  When Auto Save mode is enabled, auto-saving is enabled in the
+buffer.  The calling convention is the same as for other minor mode
+commands (@pxref{Minor Mode Conventions}).
+
+Unlike most minor modes, there is no @code{auto-save-mode} variable.
+Auto Save mode is enabled if @code{buffer-auto-save-file-name} is
+non-@code{nil} and @code{buffer-saved-size} (see below) is non-zero.
 @end deffn
 
 @defun auto-save-file-name-p filename
@@ -660,7 +662,7 @@ host name.
 After Emacs reads your init file, it initializes
 @code{auto-save-list-file-name} (if you have not already set it
 non-@code{nil}) based on this prefix, adding the host name and process
-ID.  If you set this to @code{nil} in your init file, then Emacs does
+ID@.  If you set this to @code{nil} in your init file, then Emacs does
 not initialize @code{auto-save-list-file-name}.
 @end defopt
 
@@ -699,11 +701,13 @@ operation, reverting preserves all the markers.  If they are not
 identical, reverting does change the buffer; in that case, it preserves
 the markers in the unchanged text (if any) at the beginning and end of
 the buffer.  Preserving any additional markers would be problematical.
-
-This command binds @code{revert-buffer-in-progress-p} to a
-non-@code{nil} value while it operates.
 @end deffn
 
+@defvar revert-buffer-in-progress-p
+@code{revert-buffer} binds this variable to a non-@code{nil} value
+while it is working.
+@end defvar
+
 You can customize how @code{revert-buffer} does its work by setting
 the variables described in the rest of this section.
 
@@ -758,7 +762,14 @@ the modified contents---but only if @code{revert-buffer-function} is
 @code{nil}.
 @end defvar
 
-@defvar revert-buffer-in-progress-p
-This variable is bound to a non-@code{nil} value by
-@code{revert-buffer} while it is working.
+@c FIXME?  Move this section from arevert-xtra to here?
+@defvar buffer-stale-function
+The value of this variable, if non-@code{nil}, specifies a function
+to call to check whether a non-file buffer needs reverting
+@iftex
+(@pxref{Supporting additional buffers,,, emacs-xtra,  Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{Supporting additional buffers,,, emacs}).
+@end ifnottex
 @end defvar