Variable: magit-save-repository-buffers

magit-save-repository-buffers is a customizable variable defined in magit-mode.el.

Value

t

Documentation

Whether to save file-visiting buffers when appropriate.

If non-nil, then all modified file-visiting buffers belonging to the current repository may be saved before running Magit commands and before creating or refreshing Magit buffers. If dontask, then this is done without user intervention, for any other non-nil value the user has to confirm each save.

The default is t to avoid surprises, but dontask is the recommended value.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-mode.el
(defcustom magit-save-repository-buffers t
  "Whether to save file-visiting buffers when appropriate.

If non-nil, then all modified file-visiting buffers belonging
to the current repository may be saved before running Magit
commands and before creating or refreshing Magit buffers.
If `dontask', then this is done without user intervention, for
any other non-nil value the user has to confirm each save.

The default is t to avoid surprises, but `dontask' is the
recommended value."
  :group 'magit-essentials
  :group 'magit-buffers
  :type '(choice (const :tag "Never" nil)
                 (const :tag "Ask" t)
                 (const :tag "Save without asking" dontask)))