summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1993-08-03 03:33:14 +0000
committerRoland McGrath <roland@gnu.org>1993-08-03 03:33:14 +0000
commita569dbc32fb4a7aeaa8b37a22122f63bea4d2be4 (patch)
tree51ce007c256ec0cd81362bdffa7e653ea8966e49
parent0e18d8ef788ce5237035240eae0a8ce3bf0d87c1 (diff)
downloademacs-a569dbc32fb4a7aeaa8b37a22122f63bea4d2be4.tar.gz
(other-frame): Skip iconified and invisible frames.
-rw-r--r--lisp/frame.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/frame.el b/lisp/frame.el
index 90469d26b17..b915f945b97 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -351,19 +351,22 @@ the user during startup."
(defun other-frame (arg)
- "Select the ARG'th different frame, deiconify and raise it.
+ "Select the ARG'th different visible frame, and raise it.
All frames are arranged in a cyclic order.
This command selects the frame ARG steps away in that order.
A negative ARG moves in the opposite order."
(interactive "p")
(let ((frame (selected-frame)))
(while (> arg 0)
- (setq frame (next-frame frame)
- arg (1- arg)))
+ (setq frame (next-frame frame))
+ (while (not (eq (frame-visible-p frame) t))
+ (setq frame (next-frame frame)))
+ (setq arg (1- arg)))
(while (< arg 0)
- (setq frame (previous-frame frame)
- arg (1- arg)))
- (make-frame-visible frame)
+ (setq frame (previous-frame frame))
+ (while (not (eq (frame-visible-p frame) t))
+ (setq frame (previous-frame frame)))
+ (setq arg (1- arg)))
(raise-frame frame)
(select-frame frame)))