Variable: windmove-display-no-select

windmove-display-no-select is a customizable variable defined in windmove.el.gz.

Value

nil

Documentation

Whether the window should be selected after displaying the buffer in it.

If nil, then the new window where the buffer is displayed will be selected. If ignore, then don't select a window: neither the new nor the old window, thus allowing the next command to decide what window it selects. Other non-nil values will reselect the old window that was selected before.

The value of this variable can be overridden by the prefix arg of the windmove-display-* commands that use windmove-display-in-direction.

When switch-to-buffer-obey-display-actions is non-nil, switch-to-buffer commands are also supported.

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

Source Code

;; Defined in /usr/src/emacs/lisp/windmove.el.gz
;;; Directional window display and selection

(defcustom windmove-display-no-select nil
  "Whether the window should be selected after displaying the buffer in it.
If nil, then the new window where the buffer is displayed will be selected.
If `ignore', then don't select a window: neither the new nor the old window,
thus allowing the next command to decide what window it selects.
Other non-nil values will reselect the old window that was selected before.

The value of this variable can be overridden by the prefix arg of the
windmove-display-* commands that use `windmove-display-in-direction'.

When `switch-to-buffer-obey-display-actions' is non-nil,
`switch-to-buffer' commands are also supported."
  :type '(choice (const :tag "Select new window" nil)
                 (const :tag "Select old window" t)
                 (const :tag "Don't select a window" ignore))
  :version "27.1")