Next: , Previous: , Up: Saving Files   [Index]


7.3.3.2 save-some-buffers

Function: save-some-buffers &optional ARG PRED

Save some modified file-visiting buffers. Asks user about each one. You can answer ‘y’ to save, ‘n’ not to save, ‘C-r’ to look at the buffer in question with view-buffer before deciding or ‘d’ to view the differences using diff-buffer-with-file.

This command first saves any buffers where buffer-save-without-query is non-nil, without asking.

ARG

Optional argument ARG (interactively, prefix argument) non-nil means save all with no questions.

PRED

Optional second argument PRED determines which buffers are considered:

  • If PRED is nil, all the file-visiting buffers are considered.
  • If PRED is t, then certain non-file buffers will also be considered.
  • If PRED is a zero-argument function, it indicates for each buffer whether to consider it or not when called with that buffer current.
  • PRED defaults to the value of ‘save-some-buffers-default-predicate’.

See save-some-buffers-action-alist if you want to change the additional actions you can take on files.