Variable: magit-pre-refresh-hook

magit-pre-refresh-hook is a customizable variable defined in magit-mode.el.

Value

(magit-maybe-save-repository-buffers)

Documentation

Hook run before refreshing in magit-refresh.

This hook, or magit-post-refresh-hook, should be used for functions that are not tied to a particular buffer.

To run a function with a particular buffer current, use magit-refresh-buffer-hook and use derived-mode-p inside your function.

This variable was added, or its default value changed, in magit version 2.4.0.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-mode.el
(defcustom magit-pre-refresh-hook
  (list #'magit-maybe-save-repository-buffers)
  "Hook run before refreshing in `magit-refresh'.

This hook, or `magit-post-refresh-hook', should be used
for functions that are not tied to a particular buffer.

To run a function with a particular buffer current, use
`magit-refresh-buffer-hook' and use `derived-mode-p'
inside your function."
  :package-version '(magit . "2.4.0")
  :group 'magit-refresh
  :type 'hook
  :options (list #'magit-maybe-save-repository-buffers))