diff options
| author | Dmitry Antipov | 2012-11-12 08:00:55 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-11-12 08:00:55 +0400 |
| commit | 5b04e9f9ac3212f0eb88c853dd21dd63a8bdbee2 (patch) | |
| tree | d9449b2bda744e962e336625f60c5c004e5c721e /src/window.c | |
| parent | 31f47fbaead299941c22a133ed7e2928c7b1273e (diff) | |
| download | emacs-5b04e9f9ac3212f0eb88c853dd21dd63a8bdbee2.tar.gz emacs-5b04e9f9ac3212f0eb88c853dd21dd63a8bdbee2.zip | |
Simplify by using FOR_EACH_FRAME here and there.
* frame.c (next_frame, prev_frame, other_visible_frames)
(delete_frame, visible-frame-list): Use FOR_EACH_FRAME.
* w32term.c (x_window_to_scroll_bar): Likewise.
* window.c (window_list): Likewise.
* xdisp.c (x_consider_frame_title): Likewise.
* xfaces.c ( Fdisplay_supports_face_attributes_p): Likewise.
* xfns.c (x_window_to_frame, x_any_window_to_frame)
(x_menubar_window_to_frame, x_top_window_to_frame): Likewise.
* xmenu.c (menubar_id_to_frame): Likewise.
* xselect.c (frame_for_x_selection): Likewise.
* xterm.c (x_frame_of_widget, x_window_to_scroll_bar)
(x_window_to_menu_bar): Likewise.
* w32fns.c (x_window_to_frame): Likewise. Adjust comment.
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c index 09ee20e4b86..9f3474fcd53 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -2133,10 +2133,10 @@ window_list (void) | |||
| 2133 | { | 2133 | { |
| 2134 | if (!CONSP (Vwindow_list)) | 2134 | if (!CONSP (Vwindow_list)) |
| 2135 | { | 2135 | { |
| 2136 | Lisp_Object tail; | 2136 | Lisp_Object tail, frame; |
| 2137 | 2137 | ||
| 2138 | Vwindow_list = Qnil; | 2138 | Vwindow_list = Qnil; |
| 2139 | for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) | 2139 | FOR_EACH_FRAME (tail, frame) |
| 2140 | { | 2140 | { |
| 2141 | Lisp_Object args[2]; | 2141 | Lisp_Object args[2]; |
| 2142 | 2142 | ||
| @@ -2144,7 +2144,7 @@ window_list (void) | |||
| 2144 | new windows at the front of args[1], which means we | 2144 | new windows at the front of args[1], which means we |
| 2145 | have to reverse this list at the end. */ | 2145 | have to reverse this list at the end. */ |
| 2146 | args[1] = Qnil; | 2146 | args[1] = Qnil; |
| 2147 | foreach_window (XFRAME (XCAR (tail)), add_window_to_list, &args[1]); | 2147 | foreach_window (XFRAME (frame), add_window_to_list, &args[1]); |
| 2148 | args[0] = Vwindow_list; | 2148 | args[0] = Vwindow_list; |
| 2149 | args[1] = Fnreverse (args[1]); | 2149 | args[1] = Fnreverse (args[1]); |
| 2150 | Vwindow_list = Fnconc (2, args); | 2150 | Vwindow_list = Fnconc (2, args); |