diff options
| -rw-r--r-- | lisp/windmove.el | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/lisp/windmove.el b/lisp/windmove.el index f5589036812..ac146ab2dc7 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el | |||
| @@ -138,8 +138,7 @@ If this variable is set to t, moving left from the leftmost window in | |||
| 138 | a frame will find the rightmost one, and similarly for the other | 138 | a frame will find the rightmost one, and similarly for the other |
| 139 | directions. The minibuffer is skipped over in up/down movements if it | 139 | directions. The minibuffer is skipped over in up/down movements if it |
| 140 | is inactive." | 140 | is inactive." |
| 141 | :type 'boolean | 141 | :type 'boolean) |
| 142 | :group 'windmove) | ||
| 143 | 142 | ||
| 144 | (defcustom windmove-create-window nil | 143 | (defcustom windmove-create-window nil |
| 145 | "Whether movement off the edge of the frame creates a new window. | 144 | "Whether movement off the edge of the frame creates a new window. |
| @@ -147,7 +146,6 @@ If this variable is set to t, moving left from the leftmost window in | |||
| 147 | a frame will create a new window on the left, and similarly for the other | 146 | a frame will create a new window on the left, and similarly for the other |
| 148 | directions." | 147 | directions." |
| 149 | :type 'boolean | 148 | :type 'boolean |
| 150 | :group 'windmove | ||
| 151 | :version "27.1") | 149 | :version "27.1") |
| 152 | 150 | ||
| 153 | ;; If your Emacs sometimes places an empty column between two adjacent | 151 | ;; If your Emacs sometimes places an empty column between two adjacent |
| @@ -157,11 +155,18 @@ directions." | |||
| 157 | Measured in characters either horizontally or vertically; setting this | 155 | Measured in characters either horizontally or vertically; setting this |
| 158 | to a value larger than 1 may be useful in getting around window- | 156 | to a value larger than 1 may be useful in getting around window- |
| 159 | placement bugs in old versions of Emacs." | 157 | placement bugs in old versions of Emacs." |
| 160 | :type 'number | 158 | :type 'number) |
| 161 | :group 'windmove) | ||
| 162 | (make-obsolete-variable 'windmove-window-distance-delta | 159 | (make-obsolete-variable 'windmove-window-distance-delta |
| 163 | "no longer used." "27.1") | 160 | "no longer used." "27.1") |
| 164 | 161 | ||
| 162 | (defcustom windmove-allow-all-windows nil | ||
| 163 | "Whether the windmove commands are allowed to target all type of windows. | ||
| 164 | If this variable is set to non-nil, all windmove commmands will | ||
| 165 | ignore the `no-other-window' parameter applied by `display-buffer-alist' | ||
| 166 | or `set-window-parameter'." | ||
| 167 | :type 'boolean | ||
| 168 | :version "28.1") | ||
| 169 | |||
| 165 | 170 | ||
| 166 | ;; Note: | 171 | ;; Note: |
| 167 | ;; | 172 | ;; |
| @@ -342,7 +347,8 @@ WINDOW must be a live window and defaults to the selected one. | |||
| 342 | Optional ARG, if negative, means to use the right or bottom edge of | 347 | Optional ARG, if negative, means to use the right or bottom edge of |
| 343 | WINDOW as reference position, instead of `window-point'; if positive, | 348 | WINDOW as reference position, instead of `window-point'; if positive, |
| 344 | use the left or top edge of WINDOW as reference point." | 349 | use the left or top edge of WINDOW as reference point." |
| 345 | (window-in-direction dir window nil arg windmove-wrap-around t)) | 350 | (window-in-direction dir window windmove-allow-all-windows |
| 351 | arg windmove-wrap-around t)) | ||
| 346 | 352 | ||
| 347 | ;; Selects the window that's hopefully at the location returned by | 353 | ;; Selects the window that's hopefully at the location returned by |
| 348 | ;; `windmove-find-other-window', or screams if there's no window there. | 354 | ;; `windmove-find-other-window', or screams if there's no window there. |
| @@ -480,7 +486,6 @@ Default value of MODIFIERS is `shift'." | |||
| 480 | (defcustom windmove-display-no-select nil | 486 | (defcustom windmove-display-no-select nil |
| 481 | "Whether the window should be selected after displaying the buffer in it." | 487 | "Whether the window should be selected after displaying the buffer in it." |
| 482 | :type 'boolean | 488 | :type 'boolean |
| 483 | :group 'windmove | ||
| 484 | :version "27.1") | 489 | :version "27.1") |
| 485 | 490 | ||
| 486 | (defun windmove-display-in-direction (dir &optional arg) | 491 | (defun windmove-display-in-direction (dir &optional arg) |
| @@ -517,7 +522,7 @@ When `switch-to-buffer-obey-display-actions' is non-nil, | |||
| 517 | ((eq dir 'same-window) | 522 | ((eq dir 'same-window) |
| 518 | (selected-window)) | 523 | (selected-window)) |
| 519 | (t (window-in-direction | 524 | (t (window-in-direction |
| 520 | dir nil nil | 525 | dir nil windmove-allow-all-windows |
| 521 | (and arg (prefix-numeric-value arg)) | 526 | (and arg (prefix-numeric-value arg)) |
| 522 | windmove-wrap-around 'nomini))))) | 527 | windmove-wrap-around 'nomini))))) |
| 523 | (unless window | 528 | (unless window |
| @@ -606,8 +611,8 @@ With `M-0' prefix, delete the selected window and | |||
| 606 | select the window at direction DIR. | 611 | select the window at direction DIR. |
| 607 | When `windmove-wrap-around' is non-nil, takes the window | 612 | When `windmove-wrap-around' is non-nil, takes the window |
| 608 | from the opposite side of the frame." | 613 | from the opposite side of the frame." |
| 609 | (let ((other-window (window-in-direction dir nil nil arg | 614 | (let ((other-window (window-in-direction dir nil windmove-allow-all-windows |
| 610 | windmove-wrap-around 'nomini))) | 615 | arg windmove-wrap-around 'nomini))) |
| 611 | (cond ((null other-window) | 616 | (cond ((null other-window) |
| 612 | (user-error "No window %s from selected window" dir)) | 617 | (user-error "No window %s from selected window" dir)) |
| 613 | (t | 618 | (t |
| @@ -680,8 +685,8 @@ Default value of PREFIX is `C-x' and MODIFIERS is `shift'." | |||
| 680 | "Swap the states of the selected window and the window at direction DIR. | 685 | "Swap the states of the selected window and the window at direction DIR. |
| 681 | When `windmove-wrap-around' is non-nil, takes the window | 686 | When `windmove-wrap-around' is non-nil, takes the window |
| 682 | from the opposite side of the frame." | 687 | from the opposite side of the frame." |
| 683 | (let ((other-window (window-in-direction dir nil nil nil | 688 | (let ((other-window (window-in-direction dir nil windmove-allow-all-windows |
| 684 | windmove-wrap-around 'nomini))) | 689 | nil windmove-wrap-around 'nomini))) |
| 685 | (cond ((or (null other-window) (window-minibuffer-p other-window)) | 690 | (cond ((or (null other-window) (window-minibuffer-p other-window)) |
| 686 | (user-error "No window %s from selected window" dir)) | 691 | (user-error "No window %s from selected window" dir)) |
| 687 | (t | 692 | (t |
| @@ -761,8 +766,7 @@ See `windmove-default-keybindings' for more detail." | |||
| 761 | (null val)) | 766 | (null val)) |
| 762 | (set-default sym val)) | 767 | (set-default sym val)) |
| 763 | :type windmove--default-keybindings-type | 768 | :type windmove--default-keybindings-type |
| 764 | :version "28.1" | 769 | :version "28.1") |
| 765 | :group 'windmove) | ||
| 766 | 770 | ||
| 767 | (defcustom windmove-display-default-keybindings nil | 771 | (defcustom windmove-display-default-keybindings nil |
| 768 | "Default keybindings for windmove directional buffer display commands. | 772 | "Default keybindings for windmove directional buffer display commands. |
| @@ -780,8 +784,7 @@ See `windmove-display-default-keybindings' for more detail." | |||
| 780 | (null val)) | 784 | (null val)) |
| 781 | (set-default sym val)) | 785 | (set-default sym val)) |
| 782 | :type windmove--default-keybindings-type | 786 | :type windmove--default-keybindings-type |
| 783 | :version "28.1" | 787 | :version "28.1") |
| 784 | :group 'windmove) | ||
| 785 | 788 | ||
| 786 | (defcustom windmove-delete-default-keybindings nil | 789 | (defcustom windmove-delete-default-keybindings nil |
| 787 | "Default keybindings for windmove directional window deletion commands. | 790 | "Default keybindings for windmove directional window deletion commands. |
| @@ -796,8 +799,7 @@ See `windmove-delete-default-keybindings' for more detail." | |||
| 796 | (null val)) | 799 | (null val)) |
| 797 | (set-default sym val)) | 800 | (set-default sym val)) |
| 798 | :type windmove--default-keybindings-type | 801 | :type windmove--default-keybindings-type |
| 799 | :version "28.1" | 802 | :version "28.1") |
| 800 | :group 'windmove) | ||
| 801 | 803 | ||
| 802 | (defcustom windmove-swap-states-default-keybindings nil | 804 | (defcustom windmove-swap-states-default-keybindings nil |
| 803 | "Default keybindings for windmove's directional window swap-state commands. | 805 | "Default keybindings for windmove's directional window swap-state commands. |
| @@ -812,8 +814,7 @@ See `windmove-swap-states-default-keybindings' for more detail." | |||
| 812 | (null val)) | 814 | (null val)) |
| 813 | (set-default sym val)) | 815 | (set-default sym val)) |
| 814 | :type windmove--default-keybindings-type | 816 | :type windmove--default-keybindings-type |
| 815 | :version "28.1" | 817 | :version "28.1") |
| 816 | :group 'windmove) | ||
| 817 | 818 | ||
| 818 | 819 | ||
| 819 | (provide 'windmove) | 820 | (provide 'windmove) |