(t (window-in-direction
dir nil nil
(and arg (prefix-numeric-value arg))
- windmove-wrap-around)))))
+ windmove-wrap-around 'nomini)))))
(unless window
(setq window (split-window nil nil dir) type 'window))
(cons window type)))
When `windmove-wrap-around' is non-nil, takes the window
from the opposite side of the frame."
(let ((other-window (window-in-direction dir nil nil arg
- windmove-wrap-around t)))
+ windmove-wrap-around 'nomini)))
(cond ((null other-window)
(user-error "No window %s from selected window" dir))
(t
When `windmove-wrap-around' is non-nil, takes the window
from the opposite side of the frame."
(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))
(user-error "No window %s from selected window" dir))
(t
;; Neither of these allow one to selectively ignore specific windows
;; (windows whose `no-other-window' parameter is non-nil) as targets of
;; 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.
More precisely, return the nearest window in direction DIRECTION
as seen from the position of `window-point' in window WINDOW.
frame and DIRECTION `above' the minibuffer window if the frame
has one, and a window at the bottom of the frame otherwise.
-Optional argument MINI nil means to return the minibuffer window
-if and only if it is currently active. MINI non-nil means to
-return the minibuffer window even when it's not active. However,
-if WRAP is non-nil, always act as if MINI were nil.
+Optional argument MINIBUF t means to return the minibuffer
+window even if it isn't active. MINIBUF nil or omitted means
+to return the minibuffer window if and only if it is currently active.
+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."
(setq window (window-normalize-window window t))
(setq best-edge-2 w-top)
(setq best-diff-2 best-diff-2-new)
(setq best-2 w)))))
- frame nil (and mini t))
+ frame nil minibuf)
(or best best-2)))
(defun get-window-with-predicate (predicate &optional minibuf all-frames default)