Commit a569dbc3 authored by Roland McGrath's avatar Roland McGrath
Browse files

(other-frame): Skip iconified and invisible frames.

parent 0e18d8ef
...@@ -351,19 +351,22 @@ the user during startup." ...@@ -351,19 +351,22 @@ the user during startup."
(defun other-frame (arg) (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. All frames are arranged in a cyclic order.
This command selects the frame ARG steps away in that order. This command selects the frame ARG steps away in that order.
A negative ARG moves in the opposite order." A negative ARG moves in the opposite order."
(interactive "p") (interactive "p")
(let ((frame (selected-frame))) (let ((frame (selected-frame)))
(while (> arg 0) (while (> arg 0)
(setq frame (next-frame frame) (setq frame (next-frame frame))
arg (1- arg))) (while (not (eq (frame-visible-p frame) t))
(setq frame (next-frame frame)))
(setq arg (1- arg)))
(while (< arg 0) (while (< arg 0)
(setq frame (previous-frame frame) (setq frame (previous-frame frame))
arg (1- arg))) (while (not (eq (frame-visible-p frame) t))
(make-frame-visible frame) (setq frame (previous-frame frame)))
(setq arg (1- arg)))
(raise-frame frame) (raise-frame frame)
(select-frame frame))) (select-frame frame)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment