Variable: quit-restore-window-no-switch
quit-restore-window-no-switch is a customizable variable defined in
window.el.gz.
Value
nil
Documentation
Non-nil means quit-restore-window preferably won't switch buffers.
If this is nil, quit-restore-window unconditionally calls
switch-to-prev-buffer unless the window is dedicated or has been made
by display-buffer. If this is t, quit-restore-window will try to
delete the window unless a live buffer exists that was previously shown
in that window. If this is the symbol skip-first, it will switch to a
previous buffer only if there are at least two of them.
The net effect of making this non-nil is that if quit-restore-window
doesn't find a suitable buffer previously shown in the window, it will
rather try to delete the window (and maybe its frame) than show a buffer
the window has never shown before.
This variable was added, or its default value changed, in Emacs 31.1.
Probably introduced at or before Emacs version 31.1.
Source Code
;; Defined in /usr/src/emacs/lisp/window.el.gz
(defcustom quit-restore-window-no-switch nil
"Non-nil means `quit-restore-window' preferably won't switch buffers.
If this is nil, `quit-restore-window' unconditionally calls
`switch-to-prev-buffer' unless the window is dedicated or has been made
by `display-buffer'. If this is t, `quit-restore-window' will try to
delete the window unless a live buffer exists that was previously shown
in that window. If this is the symbol `skip-first', it will switch to a
previous buffer only if there are at least two of them.
The net effect of making this non-nil is that if `quit-restore-window'
doesn't find a suitable buffer previously shown in the window, it will
rather try to delete the window (and maybe its frame) than show a buffer
the window has never shown before."
:type 'boolean
:version "31.1"
:group 'windows)