[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 46106ee: Have 'window-in-direction' handle 'up' and
From: |
Martin Rudalics |
Subject: |
[Emacs-diffs] master 46106ee: Have 'window-in-direction' handle 'up' and 'down' values (Bug#32790) |
Date: |
Thu, 18 Oct 2018 03:13:09 -0400 (EDT) |
branch: master
commit 46106eec16ddb2294e06f9e482b9183777b90014
Author: Martin Rudalics <address@hidden>
Commit: Martin Rudalics <address@hidden>
Have 'window-in-direction' handle 'up' and 'down' values (Bug#32790)
* lisp/window.el (window-in-direction): Handle values of 'up'
and 'down' for DIRECTION argument (Bug#32790). Suggested by
Juri Linkov <address@hidden>.
* lisp/windmove.el (windmove-find-other-window): Don't convert
first argument of 'window-in-direction'.
---
lisp/windmove.el | 7 +------
lisp/window.el | 9 +++++++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lisp/windmove.el b/lisp/windmove.el
index f565068..42e10b5 100644
--- a/lisp/windmove.el
+++ b/lisp/windmove.el
@@ -464,12 +464,7 @@ movement is relative to."
(defun windmove-find-other-window (dir &optional arg window)
"Return the window object in direction DIR.
DIR, ARG, and WINDOW are handled as by `windmove-other-window-loc'."
- (window-in-direction
- (cond
- ((eq dir 'up) 'above)
- ((eq dir 'down) 'below)
- (t dir))
- window nil arg windmove-wrap-around t))
+ (window-in-direction dir window nil arg windmove-wrap-around t))
;; Selects the window that's hopefully at the location returned by
;; `windmove-other-window-loc', or screams if there's no window there.
diff --git a/lisp/window.el b/lisp/window.el
index a731830..47dbf0e 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2288,8 +2288,13 @@ if WRAP is non-nil, always act as if MINI were nil.
Return nil if no suitable window can be found."
(setq window (window-normalize-window window t))
- (unless (memq direction '(above below left right))
- (error "Wrong direction %s" direction))
+ (cond
+ ((eq direction 'up)
+ (setq direction 'above))
+ ((eq direction 'down)
+ (setq direction 'below))
+ ((not (memq direction '(above below left right)))
+ (error "Wrong direction %s" direction)))
(let* ((frame (window-frame window))
(hor (memq direction '(left right)))
(first (if hor
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 46106ee: Have 'window-in-direction' handle 'up' and 'down' values (Bug#32790),
Martin Rudalics <=