Function: magit-bury-buffer

magit-bury-buffer is an interactive and byte-compiled function defined in magit-files.el.

Signature

(magit-bury-buffer &optional KILL-BUFFER)

Documentation

Bury the current buffer, or with a prefix argument kill it.

If the buffer is used by an Ediff session, refuse to kill or bury just that buffer. That former would break the session and the latter makes little sense in this context. Instead offer to quit the whole session.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-files.el
(defun magit-bury-buffer (&optional kill-buffer)
  "Bury the current buffer, or with a prefix argument kill it.

If the buffer is used by an Ediff session, refuse to kill or bury just
that buffer.  That former would break the session and the latter makes
little sense in this context.  Instead offer to quit the whole session."
  (interactive "P")
  (cond ((bound-and-true-p ediff-this-buffer-ediff-sessions)
         (ediff-quit nil))
        (kill-buffer (kill-buffer))
        ((bury-buffer))))