Variable: quit-window-kill-buffer

quit-window-kill-buffer is a customizable variable defined in window.el.gz.

Value

nil

Documentation

Non-nil means quit-window will try to kill buffer of WINDOW it quits.

If this variable is nil (the default), quit-window will bury WINDOW's buffer if the KILL argument is nil and kill it otherwise. If this is t, quit-window will try to kill WINDOW's buffer regardless of the value of KILL. If this is a list of major modes, quit-window will kill the WINDOW's buffer regardless of the value of KILL if that buffer's major mode is either a member of this list or is derived from a member of this list. For any other value, quit-window will kill the buffer only if KILL is non-nil and bury it otherwise.

This variable was added, or its default value changed, in Emacs 31.1.

View in manual

Probably introduced at or before Emacs version 31.1.

Source Code

;; Defined in /usr/src/emacs/lisp/window.el.gz
(defcustom quit-window-kill-buffer nil
  "Non-nil means `quit-window' will try to kill buffer of WINDOW it quits.
If this variable is nil (the default), `quit-window' will bury WINDOW's
buffer if the KILL argument is nil and kill it otherwise.
If this is t, `quit-window' will try to kill WINDOW's buffer regardless
of the value of KILL.
If this is a list of major modes, `quit-window' will kill the WINDOW's
buffer regardless of the value of KILL if that buffer's major mode is
either a member of this list or is derived from a member of this list.
For any other value, `quit-window' will kill the buffer only if KILL is
non-nil and bury it otherwise."
  :type '(choice (boolean :tag "All major modes")
		 (repeat (symbol :tag "Major mode")))
  :version "31.1"
  :group 'windows)