mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-19 12:20:17 -08:00
Fix MINIBUF 'nomini' arg for windmove/window-in-direction (bug#44932)
* lisp/windmove.el (windmove-display-in-direction) (windmove-delete-in-direction, windmove-swap-states-in-direction): Add 'nomini' as MINIBUF arg of window-in-direction. * lisp/window.el (window-in-direction): Rename arg MINI to MINIBUF. Update docstring from walk-window-tree. Send MINIBUF arg to walk-window-tree unchanged.
This commit is contained in:
parent
a91ca6560c
commit
6355fa5183
2 changed files with 10 additions and 9 deletions
|
|
@ -485,7 +485,7 @@ When `switch-to-buffer-obey-display-actions' is non-nil,
|
||||||
(t (window-in-direction
|
(t (window-in-direction
|
||||||
dir nil nil
|
dir nil nil
|
||||||
(and arg (prefix-numeric-value arg))
|
(and arg (prefix-numeric-value arg))
|
||||||
windmove-wrap-around)))))
|
windmove-wrap-around 'nomini)))))
|
||||||
(unless window
|
(unless window
|
||||||
(setq window (split-window nil nil dir) type 'window))
|
(setq window (split-window nil nil dir) type 'window))
|
||||||
(cons window type)))
|
(cons window type)))
|
||||||
|
|
@ -569,7 +569,7 @@ select the window at direction DIR.
|
||||||
When `windmove-wrap-around' is non-nil, takes the window
|
When `windmove-wrap-around' is non-nil, takes the window
|
||||||
from the opposite side of the frame."
|
from the opposite side of the frame."
|
||||||
(let ((other-window (window-in-direction dir nil nil arg
|
(let ((other-window (window-in-direction dir nil nil arg
|
||||||
windmove-wrap-around t)))
|
windmove-wrap-around 'nomini)))
|
||||||
(cond ((null other-window)
|
(cond ((null other-window)
|
||||||
(user-error "No window %s from selected window" dir))
|
(user-error "No window %s from selected window" dir))
|
||||||
(t
|
(t
|
||||||
|
|
@ -637,7 +637,7 @@ a single modifier. Default value of PREFIX is `C-x' and MODIFIERS is `shift'."
|
||||||
When `windmove-wrap-around' is non-nil, takes the window
|
When `windmove-wrap-around' is non-nil, takes the window
|
||||||
from the opposite side of the frame."
|
from the opposite side of the frame."
|
||||||
(let ((other-window (window-in-direction dir nil nil nil
|
(let ((other-window (window-in-direction dir nil nil nil
|
||||||
windmove-wrap-around t)))
|
windmove-wrap-around 'nomini)))
|
||||||
(cond ((or (null other-window) (window-minibuffer-p other-window))
|
(cond ((or (null other-window) (window-minibuffer-p other-window))
|
||||||
(user-error "No window %s from selected window" dir))
|
(user-error "No window %s from selected window" dir))
|
||||||
(t
|
(t
|
||||||
|
|
|
||||||
|
|
@ -2309,7 +2309,7 @@ SIDE can be any of the symbols `left', `top', `right' or
|
||||||
;; Neither of these allow one to selectively ignore specific windows
|
;; Neither of these allow one to selectively ignore specific windows
|
||||||
;; (windows whose `no-other-window' parameter is non-nil) as targets of
|
;; (windows whose `no-other-window' parameter is non-nil) as targets of
|
||||||
;; the movement.
|
;; the movement.
|
||||||
(defun window-in-direction (direction &optional window ignore sign wrap mini)
|
(defun window-in-direction (direction &optional window ignore sign wrap minibuf)
|
||||||
"Return window in DIRECTION as seen from WINDOW.
|
"Return window in DIRECTION as seen from WINDOW.
|
||||||
More precisely, return the nearest window in direction DIRECTION
|
More precisely, return the nearest window in direction DIRECTION
|
||||||
as seen from the position of `window-point' in window WINDOW.
|
as seen from the position of `window-point' in window WINDOW.
|
||||||
|
|
@ -2332,10 +2332,11 @@ frame borders. This means to return for WINDOW at the top of the
|
||||||
frame and DIRECTION `above' the minibuffer window if the frame
|
frame and DIRECTION `above' the minibuffer window if the frame
|
||||||
has one, and a window at the bottom of the frame otherwise.
|
has one, and a window at the bottom of the frame otherwise.
|
||||||
|
|
||||||
Optional argument MINI nil means to return the minibuffer window
|
Optional argument MINIBUF t means to return the minibuffer
|
||||||
if and only if it is currently active. MINI non-nil means to
|
window even if it isn't active. MINIBUF nil or omitted means
|
||||||
return the minibuffer window even when it's not active. However,
|
to return the minibuffer window if and only if it is currently active.
|
||||||
if WRAP is non-nil, always act as if MINI were nil.
|
MINIBUF neither nil nor t means never return the minibuffer window.
|
||||||
|
However, if WRAP is non-nil, always act as if MINIBUF were nil.
|
||||||
|
|
||||||
Return nil if no suitable window can be found."
|
Return nil if no suitable window can be found."
|
||||||
(setq window (window-normalize-window window t))
|
(setq window (window-normalize-window window t))
|
||||||
|
|
@ -2451,7 +2452,7 @@ Return nil if no suitable window can be found."
|
||||||
(setq best-edge-2 w-top)
|
(setq best-edge-2 w-top)
|
||||||
(setq best-diff-2 best-diff-2-new)
|
(setq best-diff-2 best-diff-2-new)
|
||||||
(setq best-2 w)))))
|
(setq best-2 w)))))
|
||||||
frame nil (and mini t))
|
frame nil minibuf)
|
||||||
(or best best-2)))
|
(or best best-2)))
|
||||||
|
|
||||||
(defun get-window-with-predicate (predicate &optional minibuf all-frames default)
|
(defun get-window-with-predicate (predicate &optional minibuf all-frames default)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue