- (let* ((actual-current-window (or window (selected-window)))
- (raw-other-window-loc
- (windmove-other-window-loc dir arg actual-current-window))
- (constrained-other-window-loc
- (windmove-constrain-loc-for-movement raw-other-window-loc
- actual-current-window
- dir))
- (other-window-loc
- (if windmove-wrap-around
- (windmove-wrap-loc-for-movement constrained-other-window-loc
- actual-current-window)
- constrained-other-window-loc)))
- (window-at (car other-window-loc)
- (cdr other-window-loc))))
-