Variable: magit-setup-buffer-hook

magit-setup-buffer-hook is a customizable variable defined in magit-mode.el.

Value

(magit-maybe-save-repository-buffers
 magit-set-buffer-margins)

Documentation

Hook run by magit-setup-buffer.

This is run right after displaying the buffer and right before generating or updating its content. magit-mode-hook and other, more specific, magit-mode-*-hooks on the other hand are run right before displaying the buffer. Usually one of these hooks should be used instead of this one.

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

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-mode.el
(defcustom magit-setup-buffer-hook
  (list #'magit-maybe-save-repository-buffers
        'magit-set-buffer-margins) ; from magit-margin.el
  "Hook run by `magit-setup-buffer'.

This is run right after displaying the buffer and right before
generating or updating its content.  `magit-mode-hook' and other,
more specific, `magit-mode-*-hook's on the other hand are run
right before displaying the buffer.  Usually one of these hooks
should be used instead of this one."
  :package-version '(magit . "2.3.0")
  :group 'magit-modes
  :type 'hook
  :options (list #'magit-maybe-save-repository-buffers
                 'magit-set-buffer-margins))