>From e169fd4102cc82bfb19726759af1913496024fb6 Mon Sep 17 00:00:00 2001 From: Davis Herring Date: Wed, 6 Jul 2016 07:30:49 -0600 Subject: [PATCH 5/6] Document `all-frames' argument once * src/window.c (candidate_window_p, Fnext_window, Fprevious_window, Fget_buffer_window): Rephrase documentation and comments in terms of Fwindow_list_1. (window_list_1): Remove reference to `next-window'. (window_loop): Phrase comment in terms of Fget_buffer_window. --- src/window.c | 72 ++++++++------------------------------------------------- 1 files changed, 10 insertions(+), 62 deletions(-) diff --git a/src/window.c b/src/window.c index e123b89..2701ed9 100644 --- a/src/window.c +++ b/src/window.c @@ -2318,14 +2318,10 @@ struct Lisp_Char_Table * `lambda' means WINDOW may not be a minibuffer window. a window means a specific minibuffer window - ALL_FRAMES t means search all frames, - nil means search just current frame, - `visible' means search just visible frames on the - current terminal, - 0 means search visible and iconified frames on the - current terminal, - a window means search the frame that window belongs to, - a frame means consider windows on that frame, only. */ + ALL_FRAMES as in `window-list-1', except that nil is equivalent + to OWINDOW's frame; additionally, a window means + search its frame and any others that use it as a + minibuffer or have its frame as a focus frame. */ static bool candidate_window_p (Lisp_Object window, Lisp_Object owindow, @@ -2506,23 +2502,7 @@ struct Lisp_Char_Table * even if the minibuffer is not active. Any other value means do not consider the minibuffer window even if the minibuffer is active. -ALL-FRAMES nil or omitted means consider all windows on WINDOW's frame, -plus the minibuffer window if specified by the MINIBUF argument. If the -minibuffer counts, consider all windows on all frames that share that -minibuffer too. The following non-nil values of ALL-FRAMES have special -meanings: - -- t means consider all windows on all existing frames. - -- `visible' means consider all windows on all visible frames. - -- 0 (the number zero) means consider all windows on all visible and - iconified frames. - -- A frame means consider all windows on that frame only. - -Anything else means consider all windows on WINDOW's frame and no -others. +See `window-list-1' for the meaning of ALL-FRAMES. If you use consistent values for MINIBUF and ALL-FRAMES, you can use `next-window' to iterate through the entire cycle of acceptable @@ -2545,23 +2525,7 @@ struct Lisp_Char_Table * even if the minibuffer is not active. Any other value means do not consider the minibuffer window even if the minibuffer is active. -ALL-FRAMES nil or omitted means consider all windows on WINDOW's frame, -plus the minibuffer window if specified by the MINIBUF argument. If the -minibuffer counts, consider all windows on all frames that share that -minibuffer too. The following non-nil values of ALL-FRAMES have special -meanings: - -- t means consider all windows on all existing frames. - -- `visible' means consider all windows on all visible frames. - -- 0 (the number zero) means consider all windows on all visible and - iconified frames. - -- A frame means consider all windows on that frame only. - -Anything else means consider all windows on WINDOW's frame and no -others. +See `window-list-1' for the meaning of ALL-FRAMES. If you use consistent values for MINIBUF and ALL-FRAMES, you can use `previous-window' to iterate through the entire cycle of @@ -2574,9 +2538,6 @@ struct Lisp_Char_Table * } -/* Return a list of windows in cyclic ordering. Arguments are like - for `next-window'. */ - static Lisp_Object window_list_1 (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames) { @@ -2664,10 +2625,7 @@ struct Lisp_Char_Table * /* Look at all windows, performing an operation specified by TYPE with argument OBJ. - If FRAMES is Qt, look at all frames; - Qnil, look at just the selected frame; - Qvisible, look at visible frames; - a frame, just look at windows on that frame. + FRAMES is like ALL_FRAMES for `get-buffer-window'. If MINI, perform the operation on minibuffer windows too. */ enum window_loop @@ -2829,19 +2787,9 @@ enum window_loop BUFFER-OR-NAME may be a buffer or a buffer name and defaults to the current buffer. -The optional argument ALL-FRAMES specifies the frames to consider: - -- t means consider all windows on all existing frames. - -- `visible' means consider all windows on all visible frames. - -- 0 (the number zero) means consider all windows on all visible - and iconified frames. - -- A frame means consider all windows on that frame only. - -Any other value of ALL-FRAMES means consider all windows on the -selected frame and no others. */) +See `window-list-1' for the meaning of the optional argument +ALL-FRAMES, except that nil is not a special value; the selected +window is used for WINDOW. */) (Lisp_Object buffer_or_name, Lisp_Object all_frames) { Lisp_Object buffer; -- 1.7.1