]> code.delx.au - gnu-emacs/blobdiff - doc/lispref/backups.texi
Merge from emacs-24
[gnu-emacs] / doc / lispref / backups.texi
index c710ac190bca96fb500edc65a8f2a62f929c47bd..04aa28e9f045ba6ce49bb32b38905e27ff71ea21 100644 (file)
@@ -1,10 +1,8 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2001, 2002, 2003,
-@c   2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+@c Copyright (C) 1990-1995, 1999, 2001-2012 Free Software Foundation, 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
 
@@ -58,12 +56,13 @@ buffer, if appropriate.  It is called by @code{save-buffer} before
 saving the buffer the first time.
 
 If a backup was made by renaming, the return value is a cons cell of
-the form (@var{modes} . @var{backupname}), where @var{modes} are the
-mode bits of the original file, as returned by @code{file-modes}
-(@pxref{File Attributes,, Other Information about Files}), and
-@var{backupname} is the name of the backup.  In all other cases, that
-is, if a backup was made by copying or if no backup was made, this
-function returns @code{nil}.
+the form (@var{modes} @var{context} @var{backupname}), where
+@var{modes} are the mode bits of the original file, as returned by
+@code{file-modes} (@pxref{File Attributes,, Other Information about
+Files}), @var{context} is a list describing the original file's
+SELinux context (@pxref{File Attributes}), and @var{backupname} is the
+name of the backup.  In all other cases, that is, if a backup was made
+by copying or if no backup was made, this function returns @code{nil}.
 @end defun
 
 @defvar buffer-backed-up
@@ -88,10 +87,8 @@ save disk space.  (You would put this code in your init file.)
 @smallexample
 @group
 (add-hook 'rmail-mode-hook
-          (function (lambda ()
-                      (make-local-variable
-                       'make-backup-files)
-                      (setq make-backup-files nil))))
+          (lambda ()
+            (set (make-local-variable 'make-backup-files) nil)))
 @end group
 @end smallexample
 @end defopt
@@ -122,7 +119,7 @@ its value.  Major modes should not set this variable---they should set
 @code{make-backup-files} instead.
 @end defvar
 
-@defvar backup-directory-alist
+@defopt backup-directory-alist
 This variable's value is an alist of filename patterns and backup
 directory names.  Each element looks like
 @smallexample
@@ -142,14 +139,14 @@ For the common case of all backups going into one directory, the alist
 should contain a single element pairing @samp{"."} with the appropriate
 directory name.
 
-If this variable is @code{nil}, or it fails to match a filename, the
-backup is made in the original file's directory.
+If this variable is @code{nil} (the default), or it fails to match a
+filename, the backup is made in the original file's directory.
 
 On MS-DOS filesystems without long names this variable is always
 ignored.
-@end defvar
+@end defopt
 
-@defvar make-backup-file-name-function
+@defopt make-backup-file-name-function
 This variable's value is a function to use for making backups instead
 of the default @code{make-backup-file-name}.  A value of @code{nil}
 gives the default @code{make-backup-file-name} behavior.
@@ -158,7 +155,7 @@ gives the default @code{make-backup-file-name} behavior.
 This could be buffer-local to do something special for specific
 files.  If you define it, you may need to change
 @code{backup-file-name-p} and @code{file-name-sans-versions} too.
-@end defvar
+@end defopt
 
 
 @node Rename or Copy
@@ -194,7 +191,7 @@ significance).  @xref{Saving Buffers}.
 
 @defopt backup-by-copying
 If this variable is non-@code{nil}, Emacs always makes backup files by
-copying.
+copying.  The default is @code{nil}.
 @end defopt
 
   The following three variables, when non-@code{nil}, cause the second
@@ -203,7 +200,7 @@ treatment of files that don't fall into the special cases.
 
 @defopt backup-by-copying-when-linked
 If this variable is non-@code{nil}, Emacs makes backups by copying for
-files with multiple names (hard links).
+files with multiple names (hard links).  The default is @code{nil}.
 
 This variable is significant only if @code{backup-by-copying} is
 @code{nil}, since copying is always used when that variable is
@@ -211,8 +208,9 @@ non-@code{nil}.
 @end defopt
 
 @defopt backup-by-copying-when-mismatch
-If this variable is non-@code{nil}, Emacs makes backups by copying in cases
-where renaming would change either the owner or the group of the file.
+If this variable is non-@code{nil} (the default), Emacs makes backups
+by copying in cases where renaming would change either the owner or
+the group of the file.
 
 The value has no effect when renaming would not alter the owner or
 group of the file; that is, for files which are owned by the user and
@@ -444,10 +442,11 @@ buffer-auto-save-file-name
 
 @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.  With an argument @var{arg}, the command 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.
+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.
 @end deffn
 
 @defun auto-save-file-name-p filename
@@ -632,6 +631,10 @@ this buffer due to a substantial decrease in size.  Explicitly saving
 the buffer stores a positive value in this variable, thus reenabling
 auto-saving.  Turning auto-save mode off or on also updates this
 variable, so that the substantial decrease in size is forgotten.
+
+If it is @minus{}2, that means this buffer should disregard changes in
+buffer size; in particular, it should not shut off auto-saving
+temporarily due to changes in buffer size.
 @end defvar
 
 @defvar auto-save-list-file-name
@@ -652,13 +655,13 @@ with @samp{.saves-}.  It also contains the Emacs process @acronym{ID} and the
 host name.
 @end defvar
 
-@defvar auto-save-list-file-prefix
+@defopt auto-save-list-file-prefix
 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
 not initialize @code{auto-save-list-file-name}.
-@end defvar
+@end defopt
 
 @node Reverting
 @section Reverting
@@ -697,6 +700,11 @@ the markers in the unchanged text (if any) at the beginning and end of
 the buffer.  Preserving any additional markers would be problematical.
 @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.
 
@@ -751,6 +759,15 @@ the modified contents---but only if @code{revert-buffer-function} is
 @code{nil}.
 @end defvar
 
-@ignore
-   arch-tag: 295a6321-e5ab-46d5-aef5-0bb4f447a67f
-@end ignore
+@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
+