Variable: buffer-offer-save

buffer-offer-save is a customizable and buffer-local variable defined in files.el.gz.

Documentation

Non-nil in a buffer means always offer to save buffer on exiting Emacs.

Do so even if the buffer is not visiting a file. Automatically local in all buffers.

Set to the symbol always to offer to save buffer whenever save-some-buffers is called.

Note that this option has no effect on kill-buffer; if you want to control what happens when a buffer is killed, use kill-buffer-query-functions.

Probably introduced at or before Emacs version 18.

Source Code

;; Defined in /usr/src/emacs/lisp/files.el.gz
(defcustom buffer-offer-save nil
  "Non-nil in a buffer means always offer to save buffer on exiting Emacs.
Do so even if the buffer is not visiting a file.
Automatically local in all buffers.

Set to the symbol `always' to offer to save buffer whenever
`save-some-buffers' is called.

Note that this option has no effect on `kill-buffer';
if you want to control what happens when a buffer is killed,
use `kill-buffer-query-functions'."
  :type '(choice (const :tag "Never" nil)
                 (const :tag "On Emacs exit" t)
                 (const :tag "Whenever save-some-buffers is called" always))
  :group 'backup)