Variable: magit-wip-mode-hook
magit-wip-mode-hook is a customizable variable defined in
magit-wip.el.
Value
nil
Documentation
Hook run after entering or leaving magit-wip-mode(var)/magit-wip-mode(fun).
No problems result if this variable is not bound.
add-hook automatically binds it. (This is true for all hook variables.)
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260822.1158/magit-wip.el
;;;###autoload
(define-minor-mode magit-wip-mode
"Automatically save uncommitted changes to work-in-progress refs."
:package-version '(magit . "2.90.0")
:lighter magit-wip-mode-lighter
:global t
(cond
(magit-wip-mode
(add-hook 'after-save-hook #'magit-wip-commit-buffer-file)
(add-hook 'magit-after-apply-functions #'magit-wip-commit)
(add-hook 'magit-before-change-functions #'magit-wip-commit)
(add-hook 'before-save-hook #'magit-wip-commit-initial-backup)
(add-hook 'magit-common-git-post-commit-functions
#'magit-wip-post-commit))
(t
(remove-hook 'after-save-hook #'magit-wip-commit-buffer-file)
(remove-hook 'magit-after-apply-functions #'magit-wip-commit)
(remove-hook 'magit-before-change-functions #'magit-wip-commit)
(remove-hook 'before-save-hook #'magit-wip-commit-initial-backup)
(remove-hook 'magit-common-git-post-commit-functions
#'magit-wip-post-commit))))