diff options
| author | Karl Heuer | 1996-09-01 21:04:32 +0000 |
|---|---|---|
| committer | Karl Heuer | 1996-09-01 21:04:32 +0000 |
| commit | e3678b64333787df03e203b1ed5a4c2ec76d0272 (patch) | |
| tree | 1477eeda61aa36cf198eeb1af76a351bb424464c /src/window.c | |
| parent | 8c09486ac8aff2efb726ea76a58bcbac030b7bfa (diff) | |
| download | emacs-e3678b64333787df03e203b1ed5a4c2ec76d0272.tar.gz emacs-e3678b64333787df03e203b1ed5a4c2ec76d0272.zip | |
Removed support for !MULTI_FRAME.
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 103 |
1 files changed, 2 insertions, 101 deletions
diff --git a/src/window.c b/src/window.c index 19fd3802e82..9b59640497d 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -176,12 +176,10 @@ used by that frame.") | |||
| 176 | (frame) | 176 | (frame) |
| 177 | Lisp_Object frame; | 177 | Lisp_Object frame; |
| 178 | { | 178 | { |
| 179 | #ifdef MULTI_FRAME | ||
| 180 | if (NILP (frame)) | 179 | if (NILP (frame)) |
| 181 | XSETFRAME (frame, selected_frame); | 180 | XSETFRAME (frame, selected_frame); |
| 182 | else | 181 | else |
| 183 | CHECK_LIVE_FRAME (frame, 0); | 182 | CHECK_LIVE_FRAME (frame, 0); |
| 184 | #endif | ||
| 185 | 183 | ||
| 186 | return FRAME_MINIBUF_WINDOW (XFRAME (frame)); | 184 | return FRAME_MINIBUF_WINDOW (XFRAME (frame)); |
| 187 | } | 185 | } |
| @@ -487,12 +485,10 @@ column 0.") | |||
| 487 | { | 485 | { |
| 488 | int part; | 486 | int part; |
| 489 | 487 | ||
| 490 | #ifdef MULTI_FRAME | ||
| 491 | if (NILP (frame)) | 488 | if (NILP (frame)) |
| 492 | XSETFRAME (frame, selected_frame); | 489 | XSETFRAME (frame, selected_frame); |
| 493 | else | 490 | else |
| 494 | CHECK_LIVE_FRAME (frame, 2); | 491 | CHECK_LIVE_FRAME (frame, 2); |
| 495 | #endif | ||
| 496 | CHECK_NUMBER (x, 0); | 492 | CHECK_NUMBER (x, 0); |
| 497 | CHECK_NUMBER (y, 1); | 493 | CHECK_NUMBER (y, 1); |
| 498 | 494 | ||
| @@ -955,7 +951,6 @@ DEFUN ("next-window", Fnext_window, Snext_window, 0, 3, 0, | |||
| 955 | lambda => count none of them, | 951 | lambda => count none of them, |
| 956 | or a specific minibuffer window (the active one) to count. */ | 952 | or a specific minibuffer window (the active one) to count. */ |
| 957 | 953 | ||
| 958 | #ifdef MULTI_FRAME | ||
| 959 | /* all_frames == nil doesn't specify which frames to include. */ | 954 | /* all_frames == nil doesn't specify which frames to include. */ |
| 960 | if (NILP (all_frames)) | 955 | if (NILP (all_frames)) |
| 961 | all_frames = (! EQ (minibuf, Qlambda) | 956 | all_frames = (! EQ (minibuf, Qlambda) |
| @@ -979,7 +974,6 @@ DEFUN ("next-window", Fnext_window, Snext_window, 0, 3, 0, | |||
| 979 | visible meaning search just visible frames, | 974 | visible meaning search just visible frames, |
| 980 | 0 meaning search visible and iconified frames, | 975 | 0 meaning search visible and iconified frames, |
| 981 | or a window, meaning search the frame that window belongs to. */ | 976 | or a window, meaning search the frame that window belongs to. */ |
| 982 | #endif | ||
| 983 | 977 | ||
| 984 | /* Do this loop at least once, to get the next window, and perhaps | 978 | /* Do this loop at least once, to get the next window, and perhaps |
| 985 | again, if we hit the minibuffer and that is not acceptable. */ | 979 | again, if we hit the minibuffer and that is not acceptable. */ |
| @@ -995,7 +989,6 @@ DEFUN ("next-window", Fnext_window, Snext_window, 0, 3, 0, | |||
| 995 | /* We've reached the end of this frame. | 989 | /* We've reached the end of this frame. |
| 996 | Which other frames are acceptable? */ | 990 | Which other frames are acceptable? */ |
| 997 | tem = WINDOW_FRAME (XWINDOW (window)); | 991 | tem = WINDOW_FRAME (XWINDOW (window)); |
| 998 | #ifdef MULTI_FRAME | ||
| 999 | if (! NILP (all_frames)) | 992 | if (! NILP (all_frames)) |
| 1000 | { | 993 | { |
| 1001 | Lisp_Object tem1; | 994 | Lisp_Object tem1; |
| @@ -1010,7 +1003,6 @@ DEFUN ("next-window", Fnext_window, Snext_window, 0, 3, 0, | |||
| 1010 | if (EQ (tem, tem1)) | 1003 | if (EQ (tem, tem1)) |
| 1011 | XSETFRAME (tem, selected_frame); | 1004 | XSETFRAME (tem, selected_frame); |
| 1012 | } | 1005 | } |
| 1013 | #endif | ||
| 1014 | tem = FRAME_ROOT_WINDOW (XFRAME (tem)); | 1006 | tem = FRAME_ROOT_WINDOW (XFRAME (tem)); |
| 1015 | 1007 | ||
| 1016 | break; | 1008 | break; |
| @@ -1101,7 +1093,6 @@ DEFUN ("previous-window", Fprevious_window, Sprevious_window, 0, 3, 0, | |||
| 1101 | lambda => count none of them, | 1093 | lambda => count none of them, |
| 1102 | or a specific minibuffer window (the active one) to count. */ | 1094 | or a specific minibuffer window (the active one) to count. */ |
| 1103 | 1095 | ||
| 1104 | #ifdef MULTI_FRAME | ||
| 1105 | /* all_frames == nil doesn't specify which frames to include. | 1096 | /* all_frames == nil doesn't specify which frames to include. |
| 1106 | Decide which frames it includes. */ | 1097 | Decide which frames it includes. */ |
| 1107 | if (NILP (all_frames)) | 1098 | if (NILP (all_frames)) |
| @@ -1126,7 +1117,6 @@ DEFUN ("previous-window", Fprevious_window, Sprevious_window, 0, 3, 0, | |||
| 1126 | visible meaning search just visible frames, | 1117 | visible meaning search just visible frames, |
| 1127 | 0 meaning search visible and iconified frames, | 1118 | 0 meaning search visible and iconified frames, |
| 1128 | or a window, meaning search the frame that window belongs to. */ | 1119 | or a window, meaning search the frame that window belongs to. */ |
| 1129 | #endif | ||
| 1130 | 1120 | ||
| 1131 | /* Do this loop at least once, to get the previous window, and perhaps | 1121 | /* Do this loop at least once, to get the previous window, and perhaps |
| 1132 | again, if we hit the minibuffer and that is not acceptable. */ | 1122 | again, if we hit the minibuffer and that is not acceptable. */ |
| @@ -1142,7 +1132,6 @@ DEFUN ("previous-window", Fprevious_window, Sprevious_window, 0, 3, 0, | |||
| 1142 | /* We have found the top window on the frame. | 1132 | /* We have found the top window on the frame. |
| 1143 | Which frames are acceptable? */ | 1133 | Which frames are acceptable? */ |
| 1144 | tem = WINDOW_FRAME (XWINDOW (window)); | 1134 | tem = WINDOW_FRAME (XWINDOW (window)); |
| 1145 | #ifdef MULTI_FRAME | ||
| 1146 | if (! NILP (all_frames)) | 1135 | if (! NILP (all_frames)) |
| 1147 | /* It's actually important that we use prev_frame here, | 1136 | /* It's actually important that we use prev_frame here, |
| 1148 | rather than next_frame. All the windows acceptable | 1137 | rather than next_frame. All the windows acceptable |
| @@ -1166,7 +1155,6 @@ DEFUN ("previous-window", Fprevious_window, Sprevious_window, 0, 3, 0, | |||
| 1166 | if (EQ (tem, tem1)) | 1155 | if (EQ (tem, tem1)) |
| 1167 | XSETFRAME (tem, selected_frame); | 1156 | XSETFRAME (tem, selected_frame); |
| 1168 | } | 1157 | } |
| 1169 | #endif | ||
| 1170 | /* If this frame has a minibuffer, find that window first, | 1158 | /* If this frame has a minibuffer, find that window first, |
| 1171 | because it is conceptually the last window in that frame. */ | 1159 | because it is conceptually the last window in that frame. */ |
| 1172 | if (FRAME_HAS_MINIBUF_P (XFRAME (tem))) | 1160 | if (FRAME_HAS_MINIBUF_P (XFRAME (tem))) |
| @@ -1269,7 +1257,6 @@ window_loop (type, obj, mini, frames) | |||
| 1269 | Lisp_Object frame_arg; | 1257 | Lisp_Object frame_arg; |
| 1270 | frame_arg = Qt; | 1258 | frame_arg = Qt; |
| 1271 | 1259 | ||
| 1272 | #ifdef MULTI_FRAME | ||
| 1273 | /* If we're only looping through windows on a particular frame, | 1260 | /* If we're only looping through windows on a particular frame, |
| 1274 | frame points to that frame. If we're looping through windows | 1261 | frame points to that frame. If we're looping through windows |
| 1275 | on all frames, frame is 0. */ | 1262 | on all frames, frame is 0. */ |
| @@ -1285,9 +1272,6 @@ window_loop (type, obj, mini, frames) | |||
| 1285 | frame_arg = frames; | 1272 | frame_arg = frames; |
| 1286 | else if (EQ (frames, Qvisible)) | 1273 | else if (EQ (frames, Qvisible)) |
| 1287 | frame_arg = frames; | 1274 | frame_arg = frames; |
| 1288 | #else | ||
| 1289 | frame = 0; | ||
| 1290 | #endif | ||
| 1291 | 1275 | ||
| 1292 | /* frame_arg is Qlambda to stick to one frame, | 1276 | /* frame_arg is Qlambda to stick to one frame, |
| 1293 | Qvisible to consider all visible frames, | 1277 | Qvisible to consider all visible frames, |
| @@ -1354,7 +1338,6 @@ window_loop (type, obj, mini, frames) | |||
| 1354 | case DELETE_BUFFER_WINDOWS: | 1338 | case DELETE_BUFFER_WINDOWS: |
| 1355 | if (EQ (XWINDOW (w)->buffer, obj)) | 1339 | if (EQ (XWINDOW (w)->buffer, obj)) |
| 1356 | { | 1340 | { |
| 1357 | #ifdef MULTI_FRAME | ||
| 1358 | FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (w))); | 1341 | FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (w))); |
| 1359 | 1342 | ||
| 1360 | /* If this window is dedicated, and in a frame of its own, | 1343 | /* If this window is dedicated, and in a frame of its own, |
| @@ -1383,7 +1366,6 @@ window_loop (type, obj, mini, frames) | |||
| 1383 | Fdelete_frame (WINDOW_FRAME (XWINDOW (w)), Qnil); | 1366 | Fdelete_frame (WINDOW_FRAME (XWINDOW (w)), Qnil); |
| 1384 | } | 1367 | } |
| 1385 | else | 1368 | else |
| 1386 | #endif | ||
| 1387 | /* If we're deleting the buffer displayed in the only window | 1369 | /* If we're deleting the buffer displayed in the only window |
| 1388 | on the frame, find a new buffer to display there. */ | 1370 | on the frame, find a new buffer to display there. */ |
| 1389 | if (NILP (XWINDOW (w)->parent)) | 1371 | if (NILP (XWINDOW (w)->parent)) |
| @@ -1428,7 +1410,6 @@ window_loop (type, obj, mini, frames) | |||
| 1428 | if (NILP (another_buffer)) | 1410 | if (NILP (another_buffer)) |
| 1429 | another_buffer | 1411 | another_buffer |
| 1430 | = Fget_buffer_create (build_string ("*scratch*")); | 1412 | = Fget_buffer_create (build_string ("*scratch*")); |
| 1431 | #ifdef MULTI_FRAME | ||
| 1432 | /* If this window is dedicated, and in a frame of its own, | 1413 | /* If this window is dedicated, and in a frame of its own, |
| 1433 | kill the frame. */ | 1414 | kill the frame. */ |
| 1434 | if (EQ (w, FRAME_ROOT_WINDOW (f)) | 1415 | if (EQ (w, FRAME_ROOT_WINDOW (f)) |
| @@ -1455,7 +1436,6 @@ window_loop (type, obj, mini, frames) | |||
| 1455 | Fdelete_frame (WINDOW_FRAME (XWINDOW (w)), Qnil); | 1436 | Fdelete_frame (WINDOW_FRAME (XWINDOW (w)), Qnil); |
| 1456 | } | 1437 | } |
| 1457 | else | 1438 | else |
| 1458 | #endif | ||
| 1459 | { | 1439 | { |
| 1460 | /* Otherwise show a different buffer in the window. */ | 1440 | /* Otherwise show a different buffer in the window. */ |
| 1461 | XWINDOW (w)->dedicated = Qnil; | 1441 | XWINDOW (w)->dedicated = Qnil; |
| @@ -1597,14 +1577,10 @@ If a frame, delete only windows showing BUFFER in that frame.") | |||
| 1597 | (buffer, frame) | 1577 | (buffer, frame) |
| 1598 | Lisp_Object buffer, frame; | 1578 | Lisp_Object buffer, frame; |
| 1599 | { | 1579 | { |
| 1600 | #ifdef MULTI_FRAME | ||
| 1601 | /* FRAME uses t and nil to mean the opposite of what window_loop | 1580 | /* FRAME uses t and nil to mean the opposite of what window_loop |
| 1602 | expects. */ | 1581 | expects. */ |
| 1603 | if (! FRAMEP (frame)) | 1582 | if (! FRAMEP (frame)) |
| 1604 | frame = NILP (frame) ? Qt : Qnil; | 1583 | frame = NILP (frame) ? Qt : Qnil; |
| 1605 | #else | ||
| 1606 | frame = Qt; | ||
| 1607 | #endif | ||
| 1608 | 1584 | ||
| 1609 | if (!NILP (buffer)) | 1585 | if (!NILP (buffer)) |
| 1610 | { | 1586 | { |
| @@ -1927,7 +1903,6 @@ before each command.") | |||
| 1927 | ow->buffer); | 1903 | ow->buffer); |
| 1928 | 1904 | ||
| 1929 | selected_window = window; | 1905 | selected_window = window; |
| 1930 | #ifdef MULTI_FRAME | ||
| 1931 | if (XFRAME (WINDOW_FRAME (w)) != selected_frame) | 1906 | if (XFRAME (WINDOW_FRAME (w)) != selected_frame) |
| 1932 | { | 1907 | { |
| 1933 | XFRAME (WINDOW_FRAME (w))->selected_window = window; | 1908 | XFRAME (WINDOW_FRAME (w))->selected_window = window; |
| @@ -1939,7 +1914,6 @@ before each command.") | |||
| 1939 | } | 1914 | } |
| 1940 | else | 1915 | else |
| 1941 | selected_frame->selected_window = window; | 1916 | selected_frame->selected_window = window; |
| 1942 | #endif | ||
| 1943 | 1917 | ||
| 1944 | record_buffer (w->buffer); | 1918 | record_buffer (w->buffer); |
| 1945 | Fset_buffer (w->buffer); | 1919 | Fset_buffer (w->buffer); |
| @@ -1977,7 +1951,6 @@ static Lisp_Object | |||
| 1977 | display_buffer_1 (window) | 1951 | display_buffer_1 (window) |
| 1978 | Lisp_Object window; | 1952 | Lisp_Object window; |
| 1979 | { | 1953 | { |
| 1980 | #ifdef MULTI_FRAME | ||
| 1981 | FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (window))); | 1954 | FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (window))); |
| 1982 | FRAME_SAMPLE_VISIBILITY (f); | 1955 | FRAME_SAMPLE_VISIBILITY (f); |
| 1983 | if (f != selected_frame) | 1956 | if (f != selected_frame) |
| @@ -1987,7 +1960,6 @@ display_buffer_1 (window) | |||
| 1987 | else if (FRAME_VISIBLE_P (f)) | 1960 | else if (FRAME_VISIBLE_P (f)) |
| 1988 | Fraise_frame (WINDOW_FRAME (XWINDOW (window))); | 1961 | Fraise_frame (WINDOW_FRAME (XWINDOW (window))); |
| 1989 | } | 1962 | } |
| 1990 | #endif | ||
| 1991 | return window; | 1963 | return window; |
| 1992 | } | 1964 | } |
| 1993 | 1965 | ||
| @@ -2057,14 +2029,12 @@ buffer names are handled.") | |||
| 2057 | } | 2029 | } |
| 2058 | } | 2030 | } |
| 2059 | 2031 | ||
| 2060 | #ifdef MULTI_FRAME | ||
| 2061 | /* If pop_up_frames, | 2032 | /* If pop_up_frames, |
| 2062 | look for a window showing BUFFER on any visible or iconified frame. | 2033 | look for a window showing BUFFER on any visible or iconified frame. |
| 2063 | Otherwise search only the current frame. */ | 2034 | Otherwise search only the current frame. */ |
| 2064 | if (pop_up_frames || last_nonminibuf_frame == 0) | 2035 | if (pop_up_frames || last_nonminibuf_frame == 0) |
| 2065 | XSETFASTINT (tem, 0); | 2036 | XSETFASTINT (tem, 0); |
| 2066 | else | 2037 | else |
| 2067 | #endif | ||
| 2068 | XSETFRAME (tem, last_nonminibuf_frame); | 2038 | XSETFRAME (tem, last_nonminibuf_frame); |
| 2069 | window = Fget_buffer_window (buffer, tem); | 2039 | window = Fget_buffer_window (buffer, tem); |
| 2070 | if (!NILP (window) | 2040 | if (!NILP (window) |
| @@ -2100,7 +2070,6 @@ buffer names are handled.") | |||
| 2100 | } | 2070 | } |
| 2101 | } | 2071 | } |
| 2102 | 2072 | ||
| 2103 | #ifdef MULTI_FRAME | ||
| 2104 | /* If there are no frames open that have more than a minibuffer, | 2073 | /* If there are no frames open that have more than a minibuffer, |
| 2105 | we need to create a new frame. */ | 2074 | we need to create a new frame. */ |
| 2106 | if (pop_up_frames || last_nonminibuf_frame == 0) | 2075 | if (pop_up_frames || last_nonminibuf_frame == 0) |
| @@ -2109,24 +2078,19 @@ buffer names are handled.") | |||
| 2109 | Fset_window_buffer (window, buffer); | 2078 | Fset_window_buffer (window, buffer); |
| 2110 | return display_buffer_1 (window); | 2079 | return display_buffer_1 (window); |
| 2111 | } | 2080 | } |
| 2112 | #endif /* MULTI_FRAME */ | ||
| 2113 | 2081 | ||
| 2114 | if (pop_up_windows | 2082 | if (pop_up_windows |
| 2115 | #ifdef MULTI_FRAME | ||
| 2116 | || FRAME_MINIBUF_ONLY_P (selected_frame) | 2083 | || FRAME_MINIBUF_ONLY_P (selected_frame) |
| 2117 | /* If the current frame is a special display frame, | 2084 | /* If the current frame is a special display frame, |
| 2118 | don't try to reuse its windows. */ | 2085 | don't try to reuse its windows. */ |
| 2119 | || !NILP (XWINDOW (FRAME_ROOT_WINDOW (selected_frame))->dedicated) | 2086 | || !NILP (XWINDOW (FRAME_ROOT_WINDOW (selected_frame))->dedicated) |
| 2120 | #endif | ||
| 2121 | ) | 2087 | ) |
| 2122 | { | 2088 | { |
| 2123 | Lisp_Object frames; | 2089 | Lisp_Object frames; |
| 2124 | 2090 | ||
| 2125 | frames = Qnil; | 2091 | frames = Qnil; |
| 2126 | #ifdef MULTI_FRAME | ||
| 2127 | if (FRAME_MINIBUF_ONLY_P (selected_frame)) | 2092 | if (FRAME_MINIBUF_ONLY_P (selected_frame)) |
| 2128 | XSETFRAME (frames, last_nonminibuf_frame); | 2093 | XSETFRAME (frames, last_nonminibuf_frame); |
| 2129 | #endif | ||
| 2130 | /* Don't try to create a window if would get an error */ | 2094 | /* Don't try to create a window if would get an error */ |
| 2131 | if (split_height_threshold < window_min_height << 1) | 2095 | if (split_height_threshold < window_min_height << 1) |
| 2132 | split_height_threshold = window_min_height << 1; | 2096 | split_height_threshold = window_min_height << 1; |
| @@ -2135,7 +2099,6 @@ buffer names are handled.") | |||
| 2135 | ignore minibuffers and dedicated windows. | 2099 | ignore minibuffers and dedicated windows. |
| 2136 | This means they can return nil. */ | 2100 | This means they can return nil. */ |
| 2137 | 2101 | ||
| 2138 | #ifdef MULTI_FRAME | ||
| 2139 | /* If the frame we would try to split cannot be split, | 2102 | /* If the frame we would try to split cannot be split, |
| 2140 | try other frames. */ | 2103 | try other frames. */ |
| 2141 | if (FRAME_NO_SPLIT_P (NILP (frames) ? selected_frame | 2104 | if (FRAME_NO_SPLIT_P (NILP (frames) ? selected_frame |
| @@ -2150,7 +2113,6 @@ buffer names are handled.") | |||
| 2150 | window = Fget_largest_window (Qt); | 2113 | window = Fget_largest_window (Qt); |
| 2151 | } | 2114 | } |
| 2152 | else | 2115 | else |
| 2153 | #endif | ||
| 2154 | window = Fget_largest_window (frames); | 2116 | window = Fget_largest_window (frames); |
| 2155 | 2117 | ||
| 2156 | /* If we got a tall enough full-width window that can be split, | 2118 | /* If we got a tall enough full-width window that can be split, |
| @@ -2174,7 +2136,6 @@ buffer names are handled.") | |||
| 2174 | || EQ (XWINDOW (window)->parent, Qnil)) | 2136 | || EQ (XWINDOW (window)->parent, Qnil)) |
| 2175 | && window_height (window) >= window_min_height << 1) | 2137 | && window_height (window) >= window_min_height << 1) |
| 2176 | window = Fsplit_window (window, Qnil, Qnil); | 2138 | window = Fsplit_window (window, Qnil, Qnil); |
| 2177 | #ifdef MULTI_FRAME | ||
| 2178 | /* If Fget_lru_window returned nil, try other approaches. */ | 2139 | /* If Fget_lru_window returned nil, try other approaches. */ |
| 2179 | /* Try visible frames first. */ | 2140 | /* Try visible frames first. */ |
| 2180 | if (NILP (window)) | 2141 | if (NILP (window)) |
| @@ -2188,11 +2149,6 @@ buffer names are handled.") | |||
| 2188 | /* As a last resort, make a new frame. */ | 2149 | /* As a last resort, make a new frame. */ |
| 2189 | if (NILP (window)) | 2150 | if (NILP (window)) |
| 2190 | window = Fframe_selected_window (call0 (Vpop_up_frame_function)); | 2151 | window = Fframe_selected_window (call0 (Vpop_up_frame_function)); |
| 2191 | #else | ||
| 2192 | /* As a last resort, use a non minibuffer window. */ | ||
| 2193 | if (NILP (window)) | ||
| 2194 | window = Fframe_first_window (Fselected_frame ()); | ||
| 2195 | #endif | ||
| 2196 | /* If window appears above or below another, | 2152 | /* If window appears above or below another, |
| 2197 | even out their heights. */ | 2153 | even out their heights. */ |
| 2198 | other = upper = lower = Qnil; | 2154 | other = upper = lower = Qnil; |
| @@ -2244,10 +2200,8 @@ temp_output_buffer_show (buf) | |||
| 2244 | { | 2200 | { |
| 2245 | window = Fdisplay_buffer (buf, Qnil); | 2201 | window = Fdisplay_buffer (buf, Qnil); |
| 2246 | 2202 | ||
| 2247 | #ifdef MULTI_FRAME | ||
| 2248 | if (XFRAME (XWINDOW (window)->frame) != selected_frame) | 2203 | if (XFRAME (XWINDOW (window)->frame) != selected_frame) |
| 2249 | Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window))); | 2204 | Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window))); |
| 2250 | #endif /* MULTI_FRAME */ | ||
| 2251 | Vminibuf_scroll_window = window; | 2205 | Vminibuf_scroll_window = window; |
| 2252 | w = XWINDOW (window); | 2206 | w = XWINDOW (window); |
| 2253 | XSETFASTINT (w->hscroll, 0); | 2207 | XSETFASTINT (w->hscroll, 0); |
| @@ -3081,7 +3035,7 @@ by `current-window-configuration' (which see).") | |||
| 3081 | if (XFASTINT (data->frame_height) != previous_frame_height | 3035 | if (XFASTINT (data->frame_height) != previous_frame_height |
| 3082 | || XFASTINT (data->frame_width) != previous_frame_width) | 3036 | || XFASTINT (data->frame_width) != previous_frame_width) |
| 3083 | change_frame_size (f, data->frame_height, data->frame_width, 0, 0); | 3037 | change_frame_size (f, data->frame_height, data->frame_width, 0, 0); |
| 3084 | #if defined (HAVE_WINDOW_SYSTEM) || (defined (MSDOS) && defined (MULTI_FRAME)) | 3038 | #if defined (HAVE_WINDOW_SYSTEM) || defined (MSDOS) |
| 3085 | if (XFASTINT (data->frame_menu_bar_lines) | 3039 | if (XFASTINT (data->frame_menu_bar_lines) |
| 3086 | != previous_frame_menu_bar_lines) | 3040 | != previous_frame_menu_bar_lines) |
| 3087 | x_set_menu_bar_lines (f, data->frame_menu_bar_lines, 0); | 3041 | x_set_menu_bar_lines (f, data->frame_menu_bar_lines, 0); |
| @@ -3209,28 +3163,24 @@ by `current-window-configuration' (which see).") | |||
| 3209 | FRAME_ROOT_WINDOW (f) = data->root_window; | 3163 | FRAME_ROOT_WINDOW (f) = data->root_window; |
| 3210 | Fselect_window (data->current_window); | 3164 | Fselect_window (data->current_window); |
| 3211 | 3165 | ||
| 3212 | #ifdef MULTI_FRAME | ||
| 3213 | if (NILP (data->focus_frame) | 3166 | if (NILP (data->focus_frame) |
| 3214 | || (FRAMEP (data->focus_frame) | 3167 | || (FRAMEP (data->focus_frame) |
| 3215 | && FRAME_LIVE_P (XFRAME (data->focus_frame)))) | 3168 | && FRAME_LIVE_P (XFRAME (data->focus_frame)))) |
| 3216 | Fredirect_frame_focus (frame, data->focus_frame); | 3169 | Fredirect_frame_focus (frame, data->focus_frame); |
| 3217 | #endif | ||
| 3218 | 3170 | ||
| 3219 | #if 0 /* I don't understand why this is needed, and it causes problems | 3171 | #if 0 /* I don't understand why this is needed, and it causes problems |
| 3220 | when the frame's old selected window has been deleted. */ | 3172 | when the frame's old selected window has been deleted. */ |
| 3221 | #ifdef MULTI_FRAME | ||
| 3222 | if (f != selected_frame && FRAME_WINDOW_P (f)) | 3173 | if (f != selected_frame && FRAME_WINDOW_P (f)) |
| 3223 | do_switch_frame (WINDOW_FRAME (XWINDOW (data->root_window)), | 3174 | do_switch_frame (WINDOW_FRAME (XWINDOW (data->root_window)), |
| 3224 | Qnil, 0); | 3175 | Qnil, 0); |
| 3225 | #endif | 3176 | #endif |
| 3226 | #endif | ||
| 3227 | 3177 | ||
| 3228 | /* Set the screen height to the value it had before this function. */ | 3178 | /* Set the screen height to the value it had before this function. */ |
| 3229 | if (previous_frame_height != FRAME_HEIGHT (f) | 3179 | if (previous_frame_height != FRAME_HEIGHT (f) |
| 3230 | || previous_frame_width != FRAME_WIDTH (f)) | 3180 | || previous_frame_width != FRAME_WIDTH (f)) |
| 3231 | change_frame_size (f, previous_frame_height, previous_frame_width, | 3181 | change_frame_size (f, previous_frame_height, previous_frame_width, |
| 3232 | 0, 0); | 3182 | 0, 0); |
| 3233 | #if defined (HAVE_WINDOW_SYSTEM) || (defined (MSDOS) && defined (MULTI_FRAME)) | 3183 | #if defined (HAVE_WINDOW_SYSTEM) || defined (MSDOS) |
| 3234 | if (previous_frame_menu_bar_lines != FRAME_MENU_BAR_LINES (f)) | 3184 | if (previous_frame_menu_bar_lines != FRAME_MENU_BAR_LINES (f)) |
| 3235 | x_set_menu_bar_lines (f, previous_frame_menu_bar_lines, 0); | 3185 | x_set_menu_bar_lines (f, previous_frame_menu_bar_lines, 0); |
| 3236 | #endif | 3186 | #endif |
| @@ -3240,7 +3190,6 @@ by `current-window-configuration' (which see).") | |||
| 3240 | window_min_height = XINT (data->min_height); | 3190 | window_min_height = XINT (data->min_height); |
| 3241 | window_min_width = XINT (data->min_width); | 3191 | window_min_width = XINT (data->min_width); |
| 3242 | 3192 | ||
| 3243 | #ifdef MULTI_FRAME | ||
| 3244 | /* Fselect_window will have made f the selected frame, so we | 3193 | /* Fselect_window will have made f the selected frame, so we |
| 3245 | reselect the proper frame here. Fhandle_switch_frame will change the | 3194 | reselect the proper frame here. Fhandle_switch_frame will change the |
| 3246 | selected window too, but that doesn't make the call to | 3195 | selected window too, but that doesn't make the call to |
| @@ -3248,7 +3197,6 @@ by `current-window-configuration' (which see).") | |||
| 3248 | selected window. */ | 3197 | selected window. */ |
| 3249 | if (FRAME_LIVE_P (XFRAME (data->selected_frame))) | 3198 | if (FRAME_LIVE_P (XFRAME (data->selected_frame))) |
| 3250 | do_switch_frame (data->selected_frame, Qnil, 0); | 3199 | do_switch_frame (data->selected_frame, Qnil, 0); |
| 3251 | #endif | ||
| 3252 | 3200 | ||
| 3253 | if (!NILP (new_current_buffer)) | 3201 | if (!NILP (new_current_buffer)) |
| 3254 | Fset_buffer (new_current_buffer); | 3202 | Fset_buffer (new_current_buffer); |
| @@ -3405,9 +3353,7 @@ redirection (see `redirect-frame-focus').") | |||
| 3405 | XSETFASTINT (data->frame_width, FRAME_WIDTH (f)); | 3353 | XSETFASTINT (data->frame_width, FRAME_WIDTH (f)); |
| 3406 | XSETFASTINT (data->frame_height, FRAME_HEIGHT (f)); | 3354 | XSETFASTINT (data->frame_height, FRAME_HEIGHT (f)); |
| 3407 | XSETFASTINT (data->frame_menu_bar_lines, FRAME_MENU_BAR_LINES (f)); | 3355 | XSETFASTINT (data->frame_menu_bar_lines, FRAME_MENU_BAR_LINES (f)); |
| 3408 | #ifdef MULTI_FRAME | ||
| 3409 | XSETFRAME (data->selected_frame, selected_frame); | 3356 | XSETFRAME (data->selected_frame, selected_frame); |
| 3410 | #endif | ||
| 3411 | data->current_window = FRAME_SELECTED_WINDOW (f); | 3357 | data->current_window = FRAME_SELECTED_WINDOW (f); |
| 3412 | XSETBUFFER (data->current_buffer, current_buffer); | 3358 | XSETBUFFER (data->current_buffer, current_buffer); |
| 3413 | data->minibuf_scroll_window = Vminibuf_scroll_window; | 3359 | data->minibuf_scroll_window = Vminibuf_scroll_window; |
| @@ -3448,51 +3394,11 @@ Does not restore the value of point in current buffer.") | |||
| 3448 | 3394 | ||
| 3449 | init_window_once () | 3395 | init_window_once () |
| 3450 | { | 3396 | { |
| 3451 | #ifdef MULTI_FRAME | ||
| 3452 | selected_frame = make_terminal_frame (); | 3397 | selected_frame = make_terminal_frame (); |
| 3453 | XSETFRAME (Vterminal_frame, selected_frame); | 3398 | XSETFRAME (Vterminal_frame, selected_frame); |
| 3454 | minibuf_window = selected_frame->minibuffer_window; | 3399 | minibuf_window = selected_frame->minibuffer_window; |
| 3455 | selected_window = selected_frame->selected_window; | 3400 | selected_window = selected_frame->selected_window; |
| 3456 | last_nonminibuf_frame = selected_frame; | 3401 | last_nonminibuf_frame = selected_frame; |
| 3457 | #else /* not MULTI_FRAME */ | ||
| 3458 | extern Lisp_Object get_minibuffer (); | ||
| 3459 | |||
| 3460 | selected_frame = last_nonminibuf_frame = &the_only_frame; | ||
| 3461 | |||
| 3462 | minibuf_window = make_window (); | ||
| 3463 | FRAME_ROOT_WINDOW (selected_frame) = make_window (); | ||
| 3464 | |||
| 3465 | XWINDOW (FRAME_ROOT_WINDOW (selected_frame))->next = minibuf_window; | ||
| 3466 | XWINDOW (minibuf_window)->prev = FRAME_ROOT_WINDOW (selected_frame); | ||
| 3467 | XWINDOW (minibuf_window)->mini_p = Qt; | ||
| 3468 | |||
| 3469 | /* These values 9 and 10 are arbitrary, | ||
| 3470 | just so that there is "something there." | ||
| 3471 | Correct values are put in in init_xdisp */ | ||
| 3472 | |||
| 3473 | XSETFASTINT (XWINDOW (FRAME_ROOT_WINDOW (selected_frame))->width, 10); | ||
| 3474 | XSETFASTINT (XWINDOW (minibuf_window)->width, 10); | ||
| 3475 | |||
| 3476 | XSETFASTINT (XWINDOW (FRAME_ROOT_WINDOW (selected_frame))->height, 9); | ||
| 3477 | XSETFASTINT (XWINDOW (minibuf_window)->top, 9); | ||
| 3478 | XSETFASTINT (XWINDOW (minibuf_window)->height, 1); | ||
| 3479 | |||
| 3480 | /* Prevent error in Fset_window_buffer. */ | ||
| 3481 | XWINDOW (FRAME_ROOT_WINDOW (selected_frame))->buffer = Qt; | ||
| 3482 | XWINDOW (minibuf_window)->buffer = Qt; | ||
| 3483 | |||
| 3484 | /* Now set them up for real. */ | ||
| 3485 | Fset_window_buffer (FRAME_ROOT_WINDOW (selected_frame), | ||
| 3486 | Fcurrent_buffer ()); | ||
| 3487 | Fset_window_buffer (minibuf_window, get_minibuffer (0)); | ||
| 3488 | |||
| 3489 | selected_window = FRAME_ROOT_WINDOW (selected_frame); | ||
| 3490 | /* Make sure this window seems more recently used than | ||
| 3491 | a newly-created, never-selected window. Increment | ||
| 3492 | window_select_count so the first selection ever will get | ||
| 3493 | something newer than this. */ | ||
| 3494 | XSETFASTINT (XWINDOW (selected_window)->use_time, ++window_select_count); | ||
| 3495 | #endif /* not MULTI_FRAME */ | ||
| 3496 | 3402 | ||
| 3497 | window_initialized = 1; | 3403 | window_initialized = 1; |
| 3498 | } | 3404 | } |
| @@ -3508,11 +3414,6 @@ syms_of_window () | |||
| 3508 | Qtemp_buffer_show_hook = intern ("temp-buffer-show-hook"); | 3414 | Qtemp_buffer_show_hook = intern ("temp-buffer-show-hook"); |
| 3509 | staticpro (&Qtemp_buffer_show_hook); | 3415 | staticpro (&Qtemp_buffer_show_hook); |
| 3510 | 3416 | ||
| 3511 | #ifndef MULTI_FRAME | ||
| 3512 | /* Make sure all windows get marked */ | ||
| 3513 | staticpro (&minibuf_window); | ||
| 3514 | #endif | ||
| 3515 | |||
| 3516 | DEFVAR_LISP ("temp-buffer-show-function", &Vtemp_buffer_show_function, | 3417 | DEFVAR_LISP ("temp-buffer-show-function", &Vtemp_buffer_show_function, |
| 3517 | "Non-nil means call as function to display a help buffer.\n\ | 3418 | "Non-nil means call as function to display a help buffer.\n\ |
| 3518 | The function is called with one argument, the buffer to be displayed.\n\ | 3419 | The function is called with one argument, the buffer to be displayed.\n\ |