mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
(other-frame): Skip iconified and invisible frames.
This commit is contained in:
parent
0e18d8ef78
commit
a569dbc32f
1 changed files with 9 additions and 6 deletions
|
|
@ -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)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue