aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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."
351 351
352 352
353(defun other-frame (arg) 353(defun other-frame (arg)
354 "Select the ARG'th different frame, deiconify and raise it. 354 "Select the ARG'th different visible frame, and raise it.
355All frames are arranged in a cyclic order. 355All frames are arranged in a cyclic order.
356This command selects the frame ARG steps away in that order. 356This command selects the frame ARG steps away in that order.
357A negative ARG moves in the opposite order." 357A negative ARG moves in the opposite order."
358 (interactive "p") 358 (interactive "p")
359 (let ((frame (selected-frame))) 359 (let ((frame (selected-frame)))
360 (while (> arg 0) 360 (while (> arg 0)
361 (setq frame (next-frame frame) 361 (setq frame (next-frame frame))
362 arg (1- arg))) 362 (while (not (eq (frame-visible-p frame) t))
363 (setq frame (next-frame frame)))
364 (setq arg (1- arg)))
363 (while (< arg 0) 365 (while (< arg 0)
364 (setq frame (previous-frame frame) 366 (setq frame (previous-frame frame))
365 arg (1- arg))) 367 (while (not (eq (frame-visible-p frame) t))
366 (make-frame-visible frame) 368 (setq frame (previous-frame frame)))
369 (setq arg (1- arg)))
367 (raise-frame frame) 370 (raise-frame frame)
368 (select-frame frame))) 371 (select-frame frame)))
369 372