diff options
| -rw-r--r-- | doc/emacs/files.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/files.texi | 26 | ||||
| -rw-r--r-- | etc/NEWS | 1 |
3 files changed, 22 insertions, 11 deletions
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 5c582e571e2..2b09c69945c 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi | |||
| @@ -417,6 +417,12 @@ changes you would be saving. This calls the command | |||
| 417 | Display a help message about these options. | 417 | Display a help message about these options. |
| 418 | @end table | 418 | @end table |
| 419 | 419 | ||
| 420 | @noindent | ||
| 421 | @vindex save-some-buffers-default-predicate | ||
| 422 | You can customize the value of | ||
| 423 | @code{save-some-buffers-default-predicate} to control which buffers | ||
| 424 | Emacs will ask about. | ||
| 425 | |||
| 420 | @kbd{C-x C-c}, the key sequence to exit Emacs, invokes | 426 | @kbd{C-x C-c}, the key sequence to exit Emacs, invokes |
| 421 | @code{save-some-buffers} and therefore asks the same questions. | 427 | @code{save-some-buffers} and therefore asks the same questions. |
| 422 | 428 | ||
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 853e84477e2..ef373211415 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 | |||
| 368 | non-@code{nil}, it saves all the file-visiting buffers without querying | 368 | non-@code{nil}, it saves all the file-visiting buffers without querying |
| 369 | the user. | 369 | the user. |
| 370 | 370 | ||
| 371 | The optional @var{pred} argument controls which buffers to ask about | 371 | @vindex save-some-buffers-default-predicate |
| 372 | (or to save silently if @var{save-silently-p} is non-@code{nil}). | 372 | The optional @var{pred} argument provides a predicate that controls |
| 373 | If it is @code{nil}, that means to ask only about file-visiting buffers. | 373 | which buffers to ask about (or to save silently if |
| 374 | If it is @code{t}, that means also offer to save certain other non-file | 374 | @var{save-silently-p} is non-@code{nil}). If @var{pred} is |
| 375 | buffers---those that have a non-@code{nil} buffer-local value of | 375 | @code{nil}, that means to use the value of |
| 376 | @code{buffer-offer-save} (@pxref{Killing Buffers}). A user who says | 376 | @code{save-some-buffers-default-predicate} instead of @var{pred}. If |
| 377 | @samp{yes} to saving a non-file buffer is asked to specify the file | 377 | the result is @code{nil}, it means ask only about file-visiting |
| 378 | name to use. The @code{save-buffers-kill-emacs} function passes the | 378 | buffers. If it is @code{t}, that means also offer to save certain |
| 379 | value @code{t} for @var{pred}. | 379 | other non-file buffers---those that have a non-@code{nil} buffer-local |
| 380 | 380 | value of @code{buffer-offer-save} (@pxref{Killing Buffers}). A user | |
| 381 | If @var{pred} is neither @code{t} nor @code{nil}, then it should be | 381 | who says @samp{yes} to saving a non-file buffer is asked to specify |
| 382 | the file name to use. The @code{save-buffers-kill-emacs} function | ||
| 383 | passes the value @code{t} for @var{pred}. | ||
| 384 | |||
| 385 | If the predicate is neither @code{t} nor @code{nil}, then it should be | ||
| 382 | a function of no arguments. It will be called in each buffer to decide | 386 | a function of no arguments. It will be called in each buffer to decide |
| 383 | whether to offer to save that buffer. If it returns a non-@code{nil} | 387 | whether to offer to save that buffer. If it returns a non-@code{nil} |
| 384 | value in a certain buffer, that means do offer to save that buffer. | 388 | value in a certain buffer, that means do offer to save that buffer. |
| @@ -758,6 +758,7 @@ instead. | |||
| 758 | 758 | ||
| 759 | * Lisp Changes in Emacs 26.1 | 759 | * Lisp Changes in Emacs 26.1 |
| 760 | 760 | ||
| 761 | +++ | ||
| 761 | ** 'save-some-buffers' now uses 'save-some-buffers-default-predicate' | 762 | ** 'save-some-buffers' now uses 'save-some-buffers-default-predicate' |
| 762 | to decide which buffers to ask about, if the PRED argument is nil. | 763 | to decide which buffers to ask about, if the PRED argument is nil. |
| 763 | The default value of 'save-some-buffers-default-predicate' is nil, | 764 | The default value of 'save-some-buffers-default-predicate' is nil, |