]> git.eshelyaron.com Git - emacs.git/commitdiff
Document 'save-some-buffers-default-predicate'
authorEli Zaretskii <eliz@gnu.org>
Sat, 4 Feb 2017 09:33:54 +0000 (11:33 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 4 Feb 2017 09:33:54 +0000 (11:33 +0200)
* doc/lispref/files.texi (Saving Buffers):
* doc/emacs/files.texi (Save Commands): Document
save-some-buffers-default-predicate.

doc/emacs/files.texi
doc/lispref/files.texi
etc/NEWS

index 5c582e571e28248ce13f8a6b6f67f6a0b50e4f21..2b09c69945c700947d707b692cd39eca0b84c32e 100644 (file)
@@ -417,6 +417,12 @@ changes you would be saving.  This calls the command
 Display a help message about these options.
 @end table
 
+@noindent
+@vindex save-some-buffers-default-predicate
+You can customize the value of
+@code{save-some-buffers-default-predicate} to control which buffers
+Emacs will ask about.
+
   @kbd{C-x C-c}, the key sequence to exit Emacs, invokes
 @code{save-some-buffers} and therefore asks the same questions.
 
index 853e84477e25d1c64c796d01118630762ce8390d..ef3732114154c2507ad3fa8e515b190d0f0d3fff 100644 (file)
@@ -368,17 +368,21 @@ asks the user about each buffer.  But if @var{save-silently-p} is
 non-@code{nil}, it saves all the file-visiting buffers without querying
 the user.
 
-The optional @var{pred} argument controls which buffers to ask about
-(or to save silently if @var{save-silently-p} is non-@code{nil}).
-If it is @code{nil}, that means to ask only about file-visiting buffers.
-If it is @code{t}, that means also offer to save certain other non-file
-buffers---those that have a non-@code{nil} buffer-local value of
-@code{buffer-offer-save} (@pxref{Killing Buffers}).  A user who says
-@samp{yes} to saving a non-file buffer is asked to specify the file
-name to use.  The @code{save-buffers-kill-emacs} function passes the
-value @code{t} for @var{pred}.
-
-If @var{pred} is neither @code{t} nor @code{nil}, then it should be
+@vindex save-some-buffers-default-predicate
+The optional @var{pred} argument provides a predicate that controls
+which buffers to ask about (or to save silently if
+@var{save-silently-p} is non-@code{nil}).  If @var{pred} is
+@code{nil}, that means to use the value of
+@code{save-some-buffers-default-predicate} instead of @var{pred}.  If
+the result is @code{nil}, it means ask only about file-visiting
+buffers.  If it is @code{t}, that means also offer to save certain
+other non-file buffers---those that have a non-@code{nil} buffer-local
+value of @code{buffer-offer-save} (@pxref{Killing Buffers}).  A user
+who says @samp{yes} to saving a non-file buffer is asked to specify
+the file name to use.  The @code{save-buffers-kill-emacs} function
+passes the value @code{t} for @var{pred}.
+
+If the predicate is neither @code{t} nor @code{nil}, then it should be
 a function of no arguments.  It will be called in each buffer to decide
 whether to offer to save that buffer.  If it returns a non-@code{nil}
 value in a certain buffer, that means do offer to save that buffer.
index 25e1d6e83694fa6dd5b72663249a547961cfe2f7..270f8803d537fa5a053282846307b4c454d5e14b 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -758,6 +758,7 @@ instead.
 \f
 * Lisp Changes in Emacs 26.1
 
++++
 ** 'save-some-buffers' now uses 'save-some-buffers-default-predicate'
 to decide which buffers to ask about, if the PRED argument is nil.
 The default value of 'save-some-buffers-default-predicate' is nil,