changeset 4431:2fe6adb8a82f

(other-frame): Skip iconified and invisible frames.
author Roland McGrath <roland@gnu.org>
date Tue, 03 Aug 1993 03:33:14 +0000
parents ecac48eaacce
children f00905dd8a41
files lisp/frame.el
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/frame.el	Tue Aug 03 02:40:31 1993 +0000
+++ b/lisp/frame.el	Tue Aug 03 03:33:14 1993 +0000
@@ -351,19 +351,22 @@
 
 
 (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)))