Variable: windmove-create-window

windmove-create-window is a customizable variable defined in windmove.el.gz.

Value

nil

Documentation

Whether movement off the edge of the frame creates a new window.

If this variable is set to t, moving left from the leftmost window in a frame will create a new window on the left, and similarly for the other directions. This variable may also be a function to be called in this circumstance by windmove-do-window-select. The function should accept then as argument the DIRECTION targeted, an interactive ARG and a WINDOW corresponding to the currently selected window. It should also return a valid window that windmove-do-window-select will select, or the symbol no-select to ignore that final selection.

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

Probably introduced at or before Emacs version 27.1.

Source Code

;; Defined in /usr/src/emacs/lisp/windmove.el.gz
(defcustom windmove-create-window nil
  "Whether movement off the edge of the frame creates a new window.
If this variable is set to t, moving left from the leftmost window in
a frame will create a new window on the left, and similarly for the other
directions.
This variable may also be a function to be called in this circumstance
by `windmove-do-window-select'.  The function should accept then as
argument the DIRECTION targeted, an interactive ARG and a WINDOW
corresponding to the currently selected window.  It should also return
a valid window that `windmove-do-window-select' will select,
or the symbol `no-select' to ignore that final selection."
  :type '(choice
          (const :tag "Don't create new windows" nil)
          (const :tag "Create new windows" t)
          (function :tag "Provide a function"))
  :version "28.1")