[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 12a79dc: Document 'save-some-buffers-default-predic
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 12a79dc: Document 'save-some-buffers-default-predicate' |
Date: |
Sat, 4 Feb 2017 09:34:39 +0000 (UTC) |
branch: master
commit 12a79dc3cea50435bbd331dc5ec4c12816f1c1b5
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Document 'save-some-buffers-default-predicate'
* doc/lispref/files.texi (Saving Buffers):
* doc/emacs/files.texi (Save Commands): Document
save-some-buffers-default-predicate.
---
doc/emacs/files.texi | 6 ++++++
doc/lispref/files.texi | 26 +++++++++++++++-----------
etc/NEWS | 1 +
3 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 5c582e5..2b09c69 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -417,6 +417,12 @@ changes you would be saving. This calls the command
Display a help message about these options.
@end table
address@hidden
address@hidden save-some-buffers-default-predicate
+You can customize the value of
address@hidden 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.
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 853e844..ef37321 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -368,17 +368,21 @@ asks the user about each buffer. But if
@var{save-silently-p} is
address@hidden, 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 address@hidden).
-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 address@hidden buffer-local value of
address@hidden (@pxref{Killing Buffers}). A user who says
address@hidden 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
address@hidden 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
address@hidden is address@hidden). If @var{pred} is
address@hidden, that means to use the value of
address@hidden 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 address@hidden 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 address@hidden
value in a certain buffer, that means do offer to save that buffer.
diff --git a/etc/NEWS b/etc/NEWS
index 25e1d6e..270f880 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -758,6 +758,7 @@ instead.
* 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,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 12a79dc: Document 'save-some-buffers-default-predicate',
Eli Zaretskii <=