Function: magit-maybe-save-repository-buffers

magit-maybe-save-repository-buffers is a natively compiled function defined in magit-mode.el.

Signature

(magit-maybe-save-repository-buffers)

Documentation

Maybe save file-visiting buffers belonging to the current repository.

Do so if magit-save-repository-buffers(var)/magit-save-repository-buffers(fun) is non-nil. You should not remove this from any hooks, instead set that variable to nil if you so desire.

Source Code

;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-mode.el
(defun magit-maybe-save-repository-buffers ()
  "Maybe save file-visiting buffers belonging to the current repository.
Do so if `magit-save-repository-buffers' is non-nil.  You should
not remove this from any hooks, instead set that variable to nil
if you so desire."
  (when (and magit-save-repository-buffers
             (not magit--disable-save-buffers))
    (setq magit--disable-save-buffers t)
    (let ((msg (current-message)))
      (magit-save-repository-buffers
       (eq magit-save-repository-buffers 'dontask))
      (when (and msg
                 (current-message)
                 (not (equal msg (current-message))))
        (message "%s" msg)))))