From: Richard M. Stallman Date: Thu, 7 Jul 1994 06:38:42 +0000 (+0000) Subject: (next_frame, prev_frame): X-Git-Tag: emacs-19.34~7685 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a9986780f6199c1a9c4ce42bd764872a3146e88e;p=emacs.git (next_frame, prev_frame): MINIBUF = 0 means try visible frames and iconified frames. (next_frame, prev_frame): Change which frames to use when MINIBUF is a window. (Fnext_frame, Fprevious_frame): Doc fixes. --- diff --git a/src/frame.c b/src/frame.c index 6228f4c8499..c658885bb9a 100644 --- a/src/frame.c +++ b/src/frame.c @@ -556,9 +556,10 @@ DEFUN ("frame-list", Fframe_list, Sframe_list, /* Return the next frame in the frame list after FRAME. If MINIBUF is nil, exclude minibuffer-only frames. - If MINIBUF is a window, include only frames using that window for - their minibuffer. + If MINIBUF is a window, include only its own frame + and any frame now using that window as the minibuffer. If MINIBUF is `visible', include all visible frames. + If MINIBUF is 0, include all visible and iconified frames. Otherwise, include all frames. */ Lisp_Object @@ -604,9 +605,21 @@ next_frame (frame, minibuf) if (FRAME_VISIBLE_P (XFRAME (f))) return f; } + else if (XFASTINT (minibuf) == 0) + { + FRAME_SAMPLE_VISIBILITY (XFRAME (f)); + if (FRAME_VISIBLE_P (XFRAME (f)) + || FRAME_ICONIFIED_P (XFRAME (f))) + return f; + } else if (WINDOWP (minibuf)) { - if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf)) + if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf) + /* Check that F either is, or has forwarded its focus to, + MINIBUF's frame. */ + && (EQ (WINDOW_FRAME (XWINDOW (minibuf)), f) + || EQ (WINDOW_FRAME (XWINDOW (minibuf)), + FRAME_FOCUS_FRAME (XFRAME (f))))) return f; } else @@ -620,9 +633,10 @@ next_frame (frame, minibuf) /* Return the previous frame in the frame list before FRAME. If MINIBUF is nil, exclude minibuffer-only frames. - If MINIBUF is a window, include only frames using that window for - their minibuffer. + If MINIBUF is a window, include only its own frame + and any frame now using that window as the minibuffer. If MINIBUF is `visible', include all visible frames. + If MINIBUF is 0, include all visible and iconified frames. Otherwise, include all frames. */ Lisp_Object @@ -658,7 +672,12 @@ prev_frame (frame, minibuf) } else if (XTYPE (minibuf) == Lisp_Window) { - if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf)) + if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf) + /* Check that F either is, or has forwarded its focus to, + MINIBUF's frame. */ + && (EQ (WINDOW_FRAME (XWINDOW (minibuf)), f) + || EQ (WINDOW_FRAME (XWINDOW (minibuf)), + FRAME_FOCUS_FRAME (XFRAME (f))))) prev = f; } else if (EQ (minibuf, Qvisible)) @@ -667,6 +686,13 @@ prev_frame (frame, minibuf) if (FRAME_VISIBLE_P (XFRAME (f))) prev = f; } + else if (XFASTINT (f) == 0) + { + FRAME_SAMPLE_VISIBILITY (XFRAME (f)); + if (FRAME_VISIBLE_P (XFRAME (f)) + || FRAME_ICONIFIED_P (XFRAME (f))) + prev = f; + } else prev = f; } @@ -689,9 +715,10 @@ DEFUN ("next-frame", Fnext_frame, Snext_frame, 0, 2, 0, By default, skip minibuffer-only frames.\n\ If omitted, FRAME defaults to the selected frame.\n\ If optional argument MINIFRAME is nil, exclude minibuffer-only frames.\n\ -If MINIFRAME is a window, include only frames using that window for their\n\ -minibuffer.\n\ +If MINIBUF is a window, include only its own frame\n\ +and any frame now using that window as the minibuffer.\n\ If MINIFRAME is `visible', include all visible frames.\n\ +If MINIBUF is 0, include all visible and iconified frames.\n\ Otherwise, include all frames.") (frame, miniframe) Lisp_Object frame, miniframe; @@ -711,9 +738,10 @@ DEFUN ("previous-frame", Fprevious_frame, Sprevious_frame, 0, 2, 0, By default, skip minibuffer-only frames.\n\ If omitted, FRAME defaults to the selected frame.\n\ If optional argument MINIFRAME is nil, exclude minibuffer-only frames.\n\ -If MINIFRAME is a window, include only frames using that window for their\n\ -minibuffer.\n\ +If MINIBUF is a window, include only its own frame\n\ +and any frame now using that window as the minibuffer.\n\ If MINIFRAME is `visible', include all visible frames.\n\ +If MINIBUF is 0, include all visible and iconified frames.\n\ Otherwise, include all frames.") (frame, miniframe) Lisp_Object frame, miniframe;