aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-07-05 11:38:42 +0000
committerGerd Moellmann2000-07-05 11:38:42 +0000
commit212116d6751f8b043e400dfe7a80b1393ec5b8d6 (patch)
tree028056dfd40f00b533256153ad6c4ed0261204af /src
parent87efd256ba15272c85a212039283229a10d47bc9 (diff)
downloademacs-212116d6751f8b043e400dfe7a80b1393ec5b8d6.tar.gz
emacs-212116d6751f8b043e400dfe7a80b1393ec5b8d6.zip
(add_window_to_list): Add parameter LIST.
(window_list): Order list so that, for each frame, windows are in canonical order, and so that frames appear in the list in the order given by Vframe_list. (next_window): Reverse the handling of NEXT_P.
Diffstat (limited to 'src')
-rw-r--r--src/window.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/src/window.c b/src/window.c
index 81662b5204b..1c46dc82943 100644
--- a/src/window.c
+++ b/src/window.c
@@ -68,7 +68,7 @@ static int freeze_window_start P_ ((struct window *, int));
68static int window_fixed_size_p P_ ((struct window *, int, int)); 68static int window_fixed_size_p P_ ((struct window *, int, int));
69static void enlarge_window P_ ((Lisp_Object, int, int)); 69static void enlarge_window P_ ((Lisp_Object, int, int));
70static Lisp_Object window_list P_ ((void)); 70static Lisp_Object window_list P_ ((void));
71static int add_window_to_list P_ ((struct window *)); 71static int add_window_to_list P_ ((struct window *, Lisp_Object *));
72static int candidate_window_p P_ ((Lisp_Object, Lisp_Object, Lisp_Object)); 72static int candidate_window_p P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
73static Lisp_Object next_window P_ ((Lisp_Object, Lisp_Object, 73static Lisp_Object next_window P_ ((Lisp_Object, Lisp_Object,
74 Lisp_Object, int)); 74 Lisp_Object, int));
@@ -1180,16 +1180,17 @@ delete_window (window)
1180 Window List 1180 Window List
1181 ***********************************************************************/ 1181 ***********************************************************************/
1182 1182
1183/* Add window W to Vwindow_list. This is a callback function for 1183/* Add window W to *LIST. This is a callback function for
1184 foreach_window, used from window_list. */ 1184 foreach_window, used in function window_list. */
1185 1185
1186static int 1186static int
1187add_window_to_list (w) 1187add_window_to_list (w, list)
1188 struct window *w; 1188 struct window *w;
1189 Lisp_Object *list;
1189{ 1190{
1190 Lisp_Object window; 1191 Lisp_Object window;
1191 XSETWINDOW (window, w); 1192 XSETWINDOW (window, w);
1192 Vwindow_list = Fcons (window, Vwindow_list); 1193 *list = Fcons (window, *list);
1193 return 1; 1194 return 1;
1194} 1195}
1195 1196
@@ -1204,9 +1205,21 @@ window_list ()
1204 if (!CONSP (Vwindow_list)) 1205 if (!CONSP (Vwindow_list))
1205 { 1206 {
1206 Lisp_Object tail; 1207 Lisp_Object tail;
1208
1207 Vwindow_list = Qnil; 1209 Vwindow_list = Qnil;
1208 for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) 1210 for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail))
1209 foreach_window (XFRAME (XCAR (tail)), add_window_to_list); 1211 {
1212 Lisp_Object args[2];
1213
1214 /* We are visiting windows in canonical order, and add
1215 new windows at the front of args[1], which means we
1216 have to reverse this list at the end. */
1217 args[1] = Qnil;
1218 foreach_window (XFRAME (XCAR (tail)), add_window_to_list, &args[1]);
1219 args[0] = Vwindow_list;
1220 args[1] = Fnreverse (args[1]);
1221 Vwindow_list = Fnconc (2, args);
1222 }
1210 } 1223 }
1211 1224
1212 return Vwindow_list; 1225 return Vwindow_list;
@@ -1333,7 +1346,7 @@ next_window (window, minibuf, all_frames, next_p)
1333 && !EQ (all_frames, XWINDOW (window)->frame)) 1346 && !EQ (all_frames, XWINDOW (window)->frame))
1334 return Fframe_first_window (all_frames); 1347 return Fframe_first_window (all_frames);
1335 1348
1336 if (!next_p) 1349 if (next_p)
1337 { 1350 {
1338 Lisp_Object list; 1351 Lisp_Object list;
1339 1352