diff options
| author | Roland McGrath | 1993-08-03 03:33:14 +0000 |
|---|---|---|
| committer | Roland McGrath | 1993-08-03 03:33:14 +0000 |
| commit | a569dbc32fb4a7aeaa8b37a22122f63bea4d2be4 (patch) | |
| tree | 51ce007c256ec0cd81362bdffa7e653ea8966e49 | |
| parent | 0e18d8ef788ce5237035240eae0a8ce3bf0d87c1 (diff) | |
| download | emacs-a569dbc32fb4a7aeaa8b37a22122f63bea4d2be4.tar.gz emacs-a569dbc32fb4a7aeaa8b37a22122f63bea4d2be4.zip | |
(other-frame): Skip iconified and invisible frames.
| -rw-r--r-- | lisp/frame.el | 15 |
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. |
| 355 | All frames are arranged in a cyclic order. | 355 | All frames are arranged in a cyclic order. |
| 356 | This command selects the frame ARG steps away in that order. | 356 | This command selects the frame ARG steps away in that order. |
| 357 | A negative ARG moves in the opposite order." | 357 | A 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 | ||