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 | |
| parent | 8c09486ac8aff2efb726ea76a58bcbac030b7bfa (diff) | |
| download | emacs-e3678b64333787df03e203b1ed5a4c2ec76d0272.tar.gz emacs-e3678b64333787df03e203b1ed5a4c2ec76d0272.zip | |
Removed support for !MULTI_FRAME.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile.in | 8 | ||||
| -rw-r--r-- | src/alloc.c | 2 | ||||
| -rw-r--r-- | src/buffer.c | 2 | ||||
| -rw-r--r-- | src/data.c | 3 | ||||
| -rw-r--r-- | src/dispextern.h | 2 | ||||
| -rw-r--r-- | src/dispnew.c | 40 | ||||
| -rw-r--r-- | src/frame.c | 430 | ||||
| -rw-r--r-- | src/frame.h | 116 | ||||
| -rw-r--r-- | src/keyboard.c | 34 | ||||
| -rw-r--r-- | src/keyboard.h | 3 | ||||
| -rw-r--r-- | src/lisp.h | 11 | ||||
| -rw-r--r-- | src/minibuf.c | 4 | ||||
| -rw-r--r-- | src/print.c | 2 | ||||
| -rw-r--r-- | src/puresize.h | 4 | ||||
| -rw-r--r-- | src/sysdep.c | 2 | ||||
| -rw-r--r-- | src/w32faces.c | 2 | ||||
| -rw-r--r-- | src/window.c | 103 | ||||
| -rw-r--r-- | src/xdisp.c | 8 | ||||
| -rw-r--r-- | src/xfaces.c | 2 |
19 files changed, 10 insertions, 768 deletions
diff --git a/src/Makefile.in b/src/Makefile.in index 79476d10b61..257fda9df1c 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -572,12 +572,6 @@ otherobj= $(termcapobj) lastfile.o $(mallocobj) $(allocaobj) $(widgetobj) | |||
| 572 | #define FLOAT_SUPPORT | 572 | #define FLOAT_SUPPORT |
| 573 | #endif | 573 | #endif |
| 574 | 574 | ||
| 575 | #ifdef MULTI_FRAME | ||
| 576 | #define FRAME_SUPPORT ${lispsource}frame.elc | ||
| 577 | #else | ||
| 578 | #define FRAME_SUPPORT | ||
| 579 | #endif | ||
| 580 | |||
| 581 | #ifdef HAVE_MOUSE | 575 | #ifdef HAVE_MOUSE |
| 582 | #define MOUSE_SUPPORT ${lispsource}menu-bar.elc ${lispsource}mouse.elc \ | 576 | #define MOUSE_SUPPORT ${lispsource}menu-bar.elc ${lispsource}mouse.elc \ |
| 583 | ${lispsource}select.elc ${lispsource}scroll-bar.elc | 577 | ${lispsource}select.elc ${lispsource}scroll-bar.elc |
| @@ -631,7 +625,7 @@ lisp= \ | |||
| 631 | FACE_SUPPORT \ | 625 | FACE_SUPPORT \ |
| 632 | MOUSE_SUPPORT \ | 626 | MOUSE_SUPPORT \ |
| 633 | FLOAT_SUPPORT \ | 627 | FLOAT_SUPPORT \ |
| 634 | FRAME_SUPPORT \ | 628 | ${lispsource}frame.elc\ |
| 635 | X_WINDOWS_SUPPORT \ | 629 | X_WINDOWS_SUPPORT \ |
| 636 | ${lispsource}help.elc \ | 630 | ${lispsource}help.elc \ |
| 637 | ${lispsource}indent.elc \ | 631 | ${lispsource}indent.elc \ |
diff --git a/src/alloc.c b/src/alloc.c index 2e48c918dd0..a1376ba118a 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1802,7 +1802,6 @@ mark_object (argptr) | |||
| 1802 | objptr = (Lisp_Object *) &ptr1->contents[COMPILED_CONSTANTS]; | 1802 | objptr = (Lisp_Object *) &ptr1->contents[COMPILED_CONSTANTS]; |
| 1803 | goto loop; | 1803 | goto loop; |
| 1804 | } | 1804 | } |
| 1805 | #ifdef MULTI_FRAME | ||
| 1806 | else if (GC_FRAMEP (obj)) | 1805 | else if (GC_FRAMEP (obj)) |
| 1807 | { | 1806 | { |
| 1808 | /* See comment above under Lisp_Vector for why this is volatile. */ | 1807 | /* See comment above under Lisp_Vector for why this is volatile. */ |
| @@ -1826,7 +1825,6 @@ mark_object (argptr) | |||
| 1826 | mark_object (&ptr->menu_bar_vector); | 1825 | mark_object (&ptr->menu_bar_vector); |
| 1827 | mark_object (&ptr->buffer_predicate); | 1826 | mark_object (&ptr->buffer_predicate); |
| 1828 | } | 1827 | } |
| 1829 | #endif /* MULTI_FRAME */ | ||
| 1830 | else if (GC_BOOL_VECTOR_P (obj)) | 1828 | else if (GC_BOOL_VECTOR_P (obj)) |
| 1831 | { | 1829 | { |
| 1832 | register struct Lisp_Vector *ptr = XVECTOR (obj); | 1830 | register struct Lisp_Vector *ptr = XVECTOR (obj); |
diff --git a/src/buffer.c b/src/buffer.c index ef225eb8803..bfbd175cb16 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -853,7 +853,6 @@ If BUFFER is omitted or nil, some interesting buffer is returned.") | |||
| 853 | continue; | 853 | continue; |
| 854 | if (XSTRING (XBUFFER (buf)->name)->data[0] == ' ') | 854 | if (XSTRING (XBUFFER (buf)->name)->data[0] == ' ') |
| 855 | continue; | 855 | continue; |
| 856 | #ifdef MULTI_FRAME | ||
| 857 | /* If the selected frame has a buffer_predicate, | 856 | /* If the selected frame has a buffer_predicate, |
| 858 | disregard buffers that don't fit the predicate. */ | 857 | disregard buffers that don't fit the predicate. */ |
| 859 | tem = frame_buffer_predicate (); | 858 | tem = frame_buffer_predicate (); |
| @@ -863,7 +862,6 @@ If BUFFER is omitted or nil, some interesting buffer is returned.") | |||
| 863 | if (NILP (tem)) | 862 | if (NILP (tem)) |
| 864 | continue; | 863 | continue; |
| 865 | } | 864 | } |
| 866 | #endif | ||
| 867 | 865 | ||
| 868 | if (NILP (visible_ok)) | 866 | if (NILP (visible_ok)) |
| 869 | tem = Fget_buffer_window (buf, Qt); | 867 | tem = Fget_buffer_window (buf, Qt); |
diff --git a/src/data.c b/src/data.c index 88ed31a14bb..9d53d83425c 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -225,11 +225,8 @@ for example, (type-of 1) returns `integer'.") | |||
| 225 | return Qchar_table; | 225 | return Qchar_table; |
| 226 | if (GC_BOOL_VECTOR_P (object)) | 226 | if (GC_BOOL_VECTOR_P (object)) |
| 227 | return Qbool_vector; | 227 | return Qbool_vector; |
| 228 | |||
| 229 | #ifdef MULTI_FRAME | ||
| 230 | if (GC_FRAMEP (object)) | 228 | if (GC_FRAMEP (object)) |
| 231 | return Qframe; | 229 | return Qframe; |
| 232 | #endif | ||
| 233 | return Qvector; | 230 | return Qvector; |
| 234 | 231 | ||
| 235 | #ifdef LISP_FLOAT_TYPE | 232 | #ifdef LISP_FLOAT_TYPE |
diff --git a/src/dispextern.h b/src/dispextern.h index 500221d0b07..98bbb5e0650 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -99,9 +99,7 @@ typedef int FACE; | |||
| 99 | 99 | ||
| 100 | struct frame_glyphs | 100 | struct frame_glyphs |
| 101 | { | 101 | { |
| 102 | #ifdef MULTI_FRAME | ||
| 103 | struct frame *frame; /* Frame these glyphs belong to. */ | 102 | struct frame *frame; /* Frame these glyphs belong to. */ |
| 104 | #endif /* MULTI_FRAME */ | ||
| 105 | int height; | 103 | int height; |
| 106 | int width; | 104 | int width; |
| 107 | 105 | ||
diff --git a/src/dispnew.c b/src/dispnew.c index 4c14f0a972b..e996c78ffd0 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -144,18 +144,6 @@ FRAME_PTR selected_frame; | |||
| 144 | the address of the_only_frame. */ | 144 | the address of the_only_frame. */ |
| 145 | FRAME_PTR last_nonminibuf_frame; | 145 | FRAME_PTR last_nonminibuf_frame; |
| 146 | 146 | ||
| 147 | /* In a single-frame version, the information that would otherwise | ||
| 148 | exist inside frame objects lives in the following structure instead. | ||
| 149 | |||
| 150 | NOTE: the_only_frame is not checked for garbage collection; don't | ||
| 151 | store collectible objects in any of its fields! | ||
| 152 | |||
| 153 | You're not/The only frame in town/... */ | ||
| 154 | |||
| 155 | #ifndef MULTI_FRAME | ||
| 156 | struct frame the_only_frame; | ||
| 157 | #endif | ||
| 158 | |||
| 159 | /* This is a vector, made larger whenever it isn't large enough, | 147 | /* This is a vector, made larger whenever it isn't large enough, |
| 160 | which is used inside `update_frame' to hold the old contents | 148 | which is used inside `update_frame' to hold the old contents |
| 161 | of the FRAME_PHYS_LINES of the frame being updated. */ | 149 | of the FRAME_PHYS_LINES of the frame being updated. */ |
| @@ -169,8 +157,6 @@ struct cm Wcm; /* Structure for info on cursor positioning */ | |||
| 169 | 157 | ||
| 170 | int delayed_size_change; /* 1 means SIGWINCH happened when not safe. */ | 158 | int delayed_size_change; /* 1 means SIGWINCH happened when not safe. */ |
| 171 | 159 | ||
| 172 | #ifdef MULTI_FRAME | ||
| 173 | |||
| 174 | DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0, | 160 | DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0, |
| 175 | "Clear frame FRAME and output again what is supposed to appear on it.") | 161 | "Clear frame FRAME and output again what is supposed to appear on it.") |
| 176 | (frame) | 162 | (frame) |
| @@ -203,30 +189,6 @@ redraw_frame (f) | |||
| 203 | Fredraw_frame (frame); | 189 | Fredraw_frame (frame); |
| 204 | } | 190 | } |
| 205 | 191 | ||
| 206 | #else | ||
| 207 | |||
| 208 | DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0, | ||
| 209 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 210 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 211 | 0) | ||
| 212 | (frame) | ||
| 213 | Lisp_Object frame; | ||
| 214 | { | ||
| 215 | update_begin (0); | ||
| 216 | set_terminal_modes (); | ||
| 217 | clear_frame (); | ||
| 218 | update_end (0); | ||
| 219 | fflush (stdout); | ||
| 220 | clear_frame_records (0); | ||
| 221 | windows_or_buffers_changed++; | ||
| 222 | /* Mark all windows as INaccurate, | ||
| 223 | so that every window will have its redisplay done. */ | ||
| 224 | mark_window_display_accurate (FRAME_ROOT_WINDOW (0), 0); | ||
| 225 | return Qnil; | ||
| 226 | } | ||
| 227 | |||
| 228 | #endif | ||
| 229 | |||
| 230 | DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "", | 192 | DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "", |
| 231 | "Clear and redisplay all visible frames.") | 193 | "Clear and redisplay all visible frames.") |
| 232 | () | 194 | () |
| @@ -2589,9 +2551,7 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\ | |||
| 2589 | 2551 | ||
| 2590 | syms_of_display () | 2552 | syms_of_display () |
| 2591 | { | 2553 | { |
| 2592 | #ifdef MULTI_FRAME | ||
| 2593 | defsubr (&Sredraw_frame); | 2554 | defsubr (&Sredraw_frame); |
| 2594 | #endif | ||
| 2595 | defsubr (&Sredraw_display); | 2555 | defsubr (&Sredraw_display); |
| 2596 | defsubr (&Sframe_or_buffer_changed_p); | 2556 | defsubr (&Sframe_or_buffer_changed_p); |
| 2597 | defsubr (&Sopen_termscript); | 2557 | defsubr (&Sopen_termscript); |
diff --git a/src/frame.c b/src/frame.c index 06d2fbf48d2..8dea582b7c8 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -62,8 +62,6 @@ Boston, MA 02111-1307, USA. */ | |||
| 62 | (setq symbol-list (cdr symbol-list))))) | 62 | (setq symbol-list (cdr symbol-list))))) |
| 63 | */ | 63 | */ |
| 64 | 64 | ||
| 65 | /* We need most of these symbols even if not MULTI_FRAME; | ||
| 66 | easiest to define them all, all of the time. */ | ||
| 67 | /*&&& symbols declared here &&&*/ | 65 | /*&&& symbols declared here &&&*/ |
| 68 | Lisp_Object Qframep; | 66 | Lisp_Object Qframep; |
| 69 | Lisp_Object Qframe_live_p; | 67 | Lisp_Object Qframe_live_p; |
| @@ -172,7 +170,7 @@ set_menu_bar_lines (f, value, oldval) | |||
| 172 | 170 | ||
| 173 | /* Right now, menu bars don't work properly in minibuf-only frames; | 171 | /* Right now, menu bars don't work properly in minibuf-only frames; |
| 174 | most of the commands try to apply themselves to the minibuffer | 172 | most of the commands try to apply themselves to the minibuffer |
| 175 | frame itslef, and get an error because you can't switch buffers | 173 | frame itself, and get an error because you can't switch buffers |
| 176 | in or split the minibuffer window. */ | 174 | in or split the minibuffer window. */ |
| 177 | if (FRAME_MINIBUF_ONLY_P (f)) | 175 | if (FRAME_MINIBUF_ONLY_P (f)) |
| 178 | return; | 176 | return; |
| @@ -191,8 +189,6 @@ set_menu_bar_lines (f, value, oldval) | |||
| 191 | } | 189 | } |
| 192 | } | 190 | } |
| 193 | 191 | ||
| 194 | #ifdef MULTI_FRAME | ||
| 195 | |||
| 196 | #include "buffer.h" | 192 | #include "buffer.h" |
| 197 | 193 | ||
| 198 | /* These help us bind and responding to switch-frame events. */ | 194 | /* These help us bind and responding to switch-frame events. */ |
| @@ -2133,427 +2129,3 @@ keys_of_frame () | |||
| 2133 | initial_define_lispy_key (global_map, "iconify-frame", "ignore-event"); | 2129 | initial_define_lispy_key (global_map, "iconify-frame", "ignore-event"); |
| 2134 | initial_define_lispy_key (global_map, "make-frame-visible", "ignore-event"); | 2130 | initial_define_lispy_key (global_map, "make-frame-visible", "ignore-event"); |
| 2135 | } | 2131 | } |
| 2136 | |||
| 2137 | #else /* not MULTI_FRAME */ | ||
| 2138 | |||
| 2139 | /* If we're not using multi-frame stuff, we still need to provide some | ||
| 2140 | support functions. */ | ||
| 2141 | |||
| 2142 | /* Unless this function is defined, providing set-frame-height and | ||
| 2143 | set-frame-width doesn't help compatibility any, since they both | ||
| 2144 | want this as their first argument. */ | ||
| 2145 | DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0, | ||
| 2146 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2147 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2148 | 0) | ||
| 2149 | () | ||
| 2150 | { | ||
| 2151 | /* For your possible information, this code is unfolded into the | ||
| 2152 | second WINDOW_FRAME in frame.h. */ | ||
| 2153 | Lisp_Object tem; | ||
| 2154 | XSETFASTINT (tem, 0); | ||
| 2155 | return tem; | ||
| 2156 | } | ||
| 2157 | |||
| 2158 | DEFUN ("active-minibuffer-window", Factive_minibuffer_window, | ||
| 2159 | Sactive_minibuffer_window, 0, 0, 0, | ||
| 2160 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2161 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2162 | 0) | ||
| 2163 | () | ||
| 2164 | { | ||
| 2165 | return minibuf_level ? minibuf_window : Qnil; | ||
| 2166 | } | ||
| 2167 | |||
| 2168 | DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0, | ||
| 2169 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2170 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2171 | 0) | ||
| 2172 | (window) | ||
| 2173 | Lisp_Object window; | ||
| 2174 | { | ||
| 2175 | /* For your possible information, this code is unfolded into the | ||
| 2176 | second WINDOW_FRAME in frame.h. */ | ||
| 2177 | Lisp_Object tem; | ||
| 2178 | XSETFASTINT (tem, 0); | ||
| 2179 | return tem; | ||
| 2180 | } | ||
| 2181 | |||
| 2182 | DEFUN ("frame-first-window", Fframe_first_window, Sframe_first_window, 0, 1, 0, | ||
| 2183 | 0) | ||
| 2184 | (frame) | ||
| 2185 | Lisp_Object frame; | ||
| 2186 | { | ||
| 2187 | Lisp_Object w; | ||
| 2188 | |||
| 2189 | w = FRAME_ROOT_WINDOW (selected_frame); | ||
| 2190 | |||
| 2191 | while (NILP (XWINDOW (w)->buffer)) | ||
| 2192 | { | ||
| 2193 | if (! NILP (XWINDOW (w)->hchild)) | ||
| 2194 | w = XWINDOW (w)->hchild; | ||
| 2195 | else if (! NILP (XWINDOW (w)->vchild)) | ||
| 2196 | w = XWINDOW (w)->vchild; | ||
| 2197 | else | ||
| 2198 | abort (); | ||
| 2199 | } | ||
| 2200 | return w; | ||
| 2201 | } | ||
| 2202 | |||
| 2203 | DEFUN ("framep", Fframep, Sframep, 1, 1, 0, | ||
| 2204 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2205 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2206 | 0) | ||
| 2207 | (object) | ||
| 2208 | Lisp_Object object; | ||
| 2209 | { | ||
| 2210 | #ifdef MSDOS | ||
| 2211 | if (FRAME_X_P (object)) | ||
| 2212 | return intern ("pc"); | ||
| 2213 | #endif | ||
| 2214 | return Qnil; | ||
| 2215 | } | ||
| 2216 | |||
| 2217 | DEFUN ("set-frame-height", Fset_frame_height, Sset_frame_height, 2, 3, 0, | ||
| 2218 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2219 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2220 | 0) | ||
| 2221 | (frame, rows, pretend) | ||
| 2222 | Lisp_Object frame, rows, pretend; | ||
| 2223 | { | ||
| 2224 | CHECK_NUMBER (rows, 0); | ||
| 2225 | |||
| 2226 | change_frame_size (0, XINT (rows), 0, !NILP (pretend), 0); | ||
| 2227 | return Qnil; | ||
| 2228 | } | ||
| 2229 | |||
| 2230 | DEFUN ("set-frame-width", Fset_frame_width, Sset_frame_width, 2, 3, 0, | ||
| 2231 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2232 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2233 | 0) | ||
| 2234 | (frame, cols, pretend) | ||
| 2235 | Lisp_Object frame, cols, pretend; | ||
| 2236 | { | ||
| 2237 | CHECK_NUMBER (cols, 0); | ||
| 2238 | |||
| 2239 | change_frame_size (0, 0, XINT (cols), !NILP (pretend), 0); | ||
| 2240 | return Qnil; | ||
| 2241 | } | ||
| 2242 | |||
| 2243 | DEFUN ("set-frame-size", Fset_frame_size, Sset_frame_size, 3, 3, 0, | ||
| 2244 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2245 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2246 | 0) | ||
| 2247 | (frame, cols, rows) | ||
| 2248 | Lisp_Object frame, cols, rows; | ||
| 2249 | { | ||
| 2250 | CHECK_NUMBER (cols, 2); | ||
| 2251 | CHECK_NUMBER (rows, 1); | ||
| 2252 | |||
| 2253 | change_frame_size (0, XINT (rows), XINT (cols), 0, 0); | ||
| 2254 | |||
| 2255 | return Qnil; | ||
| 2256 | } | ||
| 2257 | |||
| 2258 | DEFUN ("frame-height", Fframe_height, Sframe_height, 0, 1, 0, | ||
| 2259 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2260 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2261 | 0) | ||
| 2262 | (frame) | ||
| 2263 | Lisp_Object frame; | ||
| 2264 | { | ||
| 2265 | return make_number (FRAME_HEIGHT (selected_frame)); | ||
| 2266 | } | ||
| 2267 | |||
| 2268 | DEFUN ("frame-width", Fframe_width, Sframe_width, 0, 1, 0, | ||
| 2269 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2270 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2271 | 0) | ||
| 2272 | (frame) | ||
| 2273 | Lisp_Object frame; | ||
| 2274 | { | ||
| 2275 | return make_number (FRAME_WIDTH (selected_frame)); | ||
| 2276 | } | ||
| 2277 | |||
| 2278 | DEFUN ("frame-char-height", Fframe_char_height, Sframe_char_height, | ||
| 2279 | 0, 1, 0, | ||
| 2280 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2281 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2282 | 0) | ||
| 2283 | (frame) | ||
| 2284 | Lisp_Object frame; | ||
| 2285 | { | ||
| 2286 | return make_number (1); | ||
| 2287 | } | ||
| 2288 | |||
| 2289 | |||
| 2290 | DEFUN ("frame-char-width", Fframe_char_width, Sframe_char_width, | ||
| 2291 | 0, 1, 0, | ||
| 2292 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2293 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2294 | 0) | ||
| 2295 | (frame) | ||
| 2296 | Lisp_Object frame; | ||
| 2297 | { | ||
| 2298 | return make_number (1); | ||
| 2299 | } | ||
| 2300 | |||
| 2301 | DEFUN ("frame-pixel-height", Fframe_pixel_height, | ||
| 2302 | Sframe_pixel_height, 0, 1, 0, | ||
| 2303 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2304 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2305 | 0) | ||
| 2306 | (frame) | ||
| 2307 | Lisp_Object frame; | ||
| 2308 | { | ||
| 2309 | return make_number (FRAME_HEIGHT (f)); | ||
| 2310 | } | ||
| 2311 | |||
| 2312 | DEFUN ("frame-pixel-width", Fframe_pixel_width, | ||
| 2313 | Sframe_pixel_width, 0, 1, 0, | ||
| 2314 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2315 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2316 | 0) | ||
| 2317 | (frame) | ||
| 2318 | Lisp_Object frame; | ||
| 2319 | { | ||
| 2320 | return make_number (FRAME_WIDTH (f)); | ||
| 2321 | } | ||
| 2322 | |||
| 2323 | /* These are for backward compatibility with Emacs 18. */ | ||
| 2324 | |||
| 2325 | DEFUN ("set-screen-height", Fset_screen_height, Sset_screen_height, 1, 2, 0, | ||
| 2326 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2327 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2328 | 0) | ||
| 2329 | (lines, pretend) | ||
| 2330 | Lisp_Object lines, pretend; | ||
| 2331 | { | ||
| 2332 | CHECK_NUMBER (lines, 0); | ||
| 2333 | |||
| 2334 | change_frame_size (0, XINT (lines), 0, !NILP (pretend), 0); | ||
| 2335 | return Qnil; | ||
| 2336 | } | ||
| 2337 | |||
| 2338 | DEFUN ("set-screen-width", Fset_screen_width, Sset_screen_width, 1, 2, 0, | ||
| 2339 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2340 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2341 | 0) | ||
| 2342 | (cols, pretend) | ||
| 2343 | Lisp_Object cols, pretend; | ||
| 2344 | { | ||
| 2345 | CHECK_NUMBER (cols, 0); | ||
| 2346 | |||
| 2347 | change_frame_size (0, 0, XINT (cols), !NILP (pretend), 0); | ||
| 2348 | return Qnil; | ||
| 2349 | } | ||
| 2350 | |||
| 2351 | DEFUN ("mouse-position", Fmouse_position, Smouse_position, 0, 0, 0, | ||
| 2352 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2353 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2354 | 0) | ||
| 2355 | () | ||
| 2356 | { | ||
| 2357 | #ifdef HAVE_MOUSE | ||
| 2358 | if (mouse_position_hook) | ||
| 2359 | { | ||
| 2360 | FRAME_PTR f; | ||
| 2361 | Lisp_Object lispy_dummy; | ||
| 2362 | enum scroll_bar_part party_dummy; | ||
| 2363 | Lisp_Object x, y; | ||
| 2364 | unsigned long long_dummy; | ||
| 2365 | |||
| 2366 | (*mouse_position_hook) (&f, 0, | ||
| 2367 | &lispy_dummy, &party_dummy, | ||
| 2368 | &x, &y, | ||
| 2369 | &long_dummy); | ||
| 2370 | return Fcons (Fselected_frame (), Fcons (x, y)); | ||
| 2371 | } | ||
| 2372 | #endif | ||
| 2373 | return Fcons (Qnil, Fcons (Qnil, Qnil)); | ||
| 2374 | } | ||
| 2375 | |||
| 2376 | void | ||
| 2377 | store_in_alist (alistptr, prop, val) | ||
| 2378 | Lisp_Object *alistptr, val; | ||
| 2379 | Lisp_Object prop; | ||
| 2380 | { | ||
| 2381 | register Lisp_Object tem; | ||
| 2382 | |||
| 2383 | tem = Fassq (prop, *alistptr); | ||
| 2384 | if (EQ (tem, Qnil)) | ||
| 2385 | *alistptr = Fcons (Fcons (prop, val), *alistptr); | ||
| 2386 | else | ||
| 2387 | Fsetcdr (tem, val); | ||
| 2388 | } | ||
| 2389 | |||
| 2390 | DEFUN ("frame-parameters", Fframe_parameters, Sframe_parameters, 0, 1, 0, | ||
| 2391 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2392 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2393 | 0) | ||
| 2394 | (frame) | ||
| 2395 | Lisp_Object frame; | ||
| 2396 | { | ||
| 2397 | Lisp_Object alist; | ||
| 2398 | FRAME_PTR f; | ||
| 2399 | int height, width; | ||
| 2400 | |||
| 2401 | if (EQ (frame, Qnil)) | ||
| 2402 | f = selected_frame; | ||
| 2403 | else | ||
| 2404 | { | ||
| 2405 | CHECK_FRAME (frame, 0); | ||
| 2406 | f = XFRAME (frame); | ||
| 2407 | } | ||
| 2408 | |||
| 2409 | if (!FRAME_LIVE_P (f)) | ||
| 2410 | return Qnil; | ||
| 2411 | |||
| 2412 | alist = Qnil; | ||
| 2413 | #ifdef MSDOS | ||
| 2414 | if (FRAME_X_P (f)) | ||
| 2415 | { | ||
| 2416 | static char *colornames[16] = | ||
| 2417 | { | ||
| 2418 | "black", "blue", "green", "cyan", "red", "magenta", "brown", | ||
| 2419 | "lightgray", "darkgray", "lightblue", "lightgreen", "lightcyan", | ||
| 2420 | "lightred", "lightmagenta", "yellow", "white" | ||
| 2421 | }; | ||
| 2422 | store_in_alist (&alist, intern ("foreground-color"), | ||
| 2423 | build_string (colornames[FRAME_FOREGROUND_PIXEL (f)])); | ||
| 2424 | store_in_alist (&alist, intern ("background-color"), | ||
| 2425 | build_string (colornames[FRAME_BACKGROUND_PIXEL (f)])); | ||
| 2426 | } | ||
| 2427 | #endif | ||
| 2428 | store_in_alist (&alist, intern ("font"), build_string ("default")); | ||
| 2429 | store_in_alist (&alist, Qname, build_string ("emacs")); | ||
| 2430 | height = (FRAME_NEW_HEIGHT (f) ? FRAME_NEW_HEIGHT (f) : FRAME_HEIGHT (f)); | ||
| 2431 | store_in_alist (&alist, Qheight, make_number (height)); | ||
| 2432 | width = (FRAME_NEW_WIDTH (f) ? FRAME_NEW_WIDTH (f) : FRAME_WIDTH (f)); | ||
| 2433 | store_in_alist (&alist, Qwidth, make_number (width)); | ||
| 2434 | store_in_alist (&alist, Qmodeline, (FRAME_WANTS_MODELINE_P (f) ? Qt : Qnil)); | ||
| 2435 | store_in_alist (&alist, Qminibuffer, FRAME_MINIBUF_WINDOW (f)); | ||
| 2436 | store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil)); | ||
| 2437 | store_in_alist (&alist, Qmenu_bar_lines, (FRAME_MENU_BAR_LINES (f))); | ||
| 2438 | |||
| 2439 | return alist; | ||
| 2440 | } | ||
| 2441 | |||
| 2442 | DEFUN ("modify-frame-parameters", Fmodify_frame_parameters, | ||
| 2443 | Smodify_frame_parameters, 2, 2, 0, | ||
| 2444 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2445 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2446 | 0) | ||
| 2447 | (frame, alist) | ||
| 2448 | Lisp_Object frame, alist; | ||
| 2449 | { | ||
| 2450 | Lisp_Object tail, elt, prop, val; | ||
| 2451 | FRAME_PTR f; | ||
| 2452 | |||
| 2453 | if (NILP (frame)) | ||
| 2454 | f = selected_frame; | ||
| 2455 | else | ||
| 2456 | { | ||
| 2457 | CHECK_LIVE_FRAME (frame, 0); | ||
| 2458 | f = XFRAME (frame); | ||
| 2459 | } | ||
| 2460 | |||
| 2461 | #ifdef MSDOS | ||
| 2462 | if (FRAME_X_P (frame)) | ||
| 2463 | IT_set_frame_parameters (XFRAME (frame), alist); | ||
| 2464 | else | ||
| 2465 | #endif | ||
| 2466 | for (tail = alist; !EQ (tail, Qnil); tail = Fcdr (tail)) | ||
| 2467 | { | ||
| 2468 | elt = Fcar (tail); | ||
| 2469 | prop = Fcar (elt); | ||
| 2470 | val = Fcdr (elt); | ||
| 2471 | if (EQ (prop, Qmenu_bar_lines)) | ||
| 2472 | set_menu_bar_lines (f, val, make_number (FRAME_MENU_BAR_LINES (f))); | ||
| 2473 | } | ||
| 2474 | |||
| 2475 | return Qnil; | ||
| 2476 | } | ||
| 2477 | |||
| 2478 | DEFUN ("frame-live-p", Fframe_live_p, Sframe_live_p, 1, 1, 0, | ||
| 2479 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2480 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2481 | 0) | ||
| 2482 | (frame) | ||
| 2483 | Lisp_Object frame; | ||
| 2484 | { | ||
| 2485 | return Qt; | ||
| 2486 | } | ||
| 2487 | |||
| 2488 | DEFUN ("frame-visible-p", Fframe_visible_p, Sframe_visible_p, 1, 1, 0, | ||
| 2489 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2490 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2491 | 0) | ||
| 2492 | (frame) | ||
| 2493 | Lisp_Object frame; | ||
| 2494 | { | ||
| 2495 | return Qt; | ||
| 2496 | } | ||
| 2497 | |||
| 2498 | DEFUN ("frame-list", Fframe_list, Sframe_list, 0, 0, 0, | ||
| 2499 | /* Don't confuse make-docfile by having two doc strings for this function. | ||
| 2500 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2501 | 0) | ||
| 2502 | () | ||
| 2503 | { | ||
| 2504 | return Fcons (Fselected_frame (), Qnil); | ||
| 2505 | } | ||
| 2506 | |||
| 2507 | syms_of_frame () | ||
| 2508 | { | ||
| 2509 | syms_of_frame_1 (); | ||
| 2510 | |||
| 2511 | DEFVAR_LISP ("terminal-frame", &Vterminal_frame, | ||
| 2512 | /* Don't confuse make-docfile by having two doc strings for this variable. | ||
| 2513 | make-docfile does not pay attention to #if, for good reason! */ | ||
| 2514 | 0); | ||
| 2515 | XSETFASTINT (Vterminal_frame, 0); | ||
| 2516 | |||
| 2517 | defsubr (&Sselected_frame); | ||
| 2518 | defsubr (&Sactive_minibuffer_window); | ||
| 2519 | defsubr (&Swindow_frame); | ||
| 2520 | defsubr (&Sframe_first_window); | ||
| 2521 | defsubr (&Sframep); | ||
| 2522 | defsubr (&Sframe_char_height); | ||
| 2523 | defsubr (&Sframe_char_width); | ||
| 2524 | defsubr (&Sframe_pixel_height); | ||
| 2525 | defsubr (&Sframe_pixel_width); | ||
| 2526 | defsubr (&Sset_frame_height); | ||
| 2527 | defsubr (&Sset_frame_width); | ||
| 2528 | defsubr (&Sset_frame_size); | ||
| 2529 | defsubr (&Sset_screen_height); | ||
| 2530 | defsubr (&Sset_screen_width); | ||
| 2531 | defsubr (&Sframe_height); | ||
| 2532 | Ffset (intern ("screen-height"), intern ("frame-height")); | ||
| 2533 | defsubr (&Sframe_width); | ||
| 2534 | Ffset (intern ("screen-width"), intern ("frame-width")); | ||
| 2535 | defsubr (&Smouse_position); | ||
| 2536 | Ffset (intern ("mouse-pixel-position"), intern ("mouse-position")); | ||
| 2537 | defsubr (&Sframe_parameters); | ||
| 2538 | defsubr (&Smodify_frame_parameters); | ||
| 2539 | defsubr (&Sframe_live_p); | ||
| 2540 | defsubr (&Sframe_visible_p); | ||
| 2541 | defsubr (&Sframe_list); | ||
| 2542 | |||
| 2543 | #ifdef MSDOS | ||
| 2544 | /* A comment in dispnew.c says the_only_frame is not protected. */ | ||
| 2545 | the_only_frame.face_alist = Qnil; | ||
| 2546 | staticpro (&the_only_frame.face_alist); | ||
| 2547 | the_only_frame.menu_bar_items = Qnil; | ||
| 2548 | staticpro (&the_only_frame.menu_bar_items); | ||
| 2549 | the_only_frame.menu_bar_vector = Qnil; | ||
| 2550 | staticpro (&the_only_frame.menu_bar_vector); | ||
| 2551 | the_only_frame.menu_bar_items = menu_bar_items (Qnil); | ||
| 2552 | #endif | ||
| 2553 | } | ||
| 2554 | |||
| 2555 | keys_of_frame () | ||
| 2556 | { | ||
| 2557 | } | ||
| 2558 | |||
| 2559 | #endif /* not MULTI_FRAME */ | ||
diff --git a/src/frame.h b/src/frame.h index 2fed084a6c3..551696489b2 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -30,12 +30,7 @@ extern int frame_garbaged; | |||
| 30 | extern int message_buf_print; | 30 | extern int message_buf_print; |
| 31 | 31 | ||
| 32 | 32 | ||
| 33 | /* The structure representing a frame. | 33 | /* The structure representing a frame. */ |
| 34 | |||
| 35 | We declare this even if MULTI_FRAME is not defined, because when | ||
| 36 | we lack multi-frame support, we use one instance of this structure | ||
| 37 | to represent the one frame we support. This is cleaner than | ||
| 38 | having miscellaneous random variables scattered about. */ | ||
| 39 | 34 | ||
| 40 | enum output_method | 35 | enum output_method |
| 41 | { output_termcap, output_x_window, output_msdos_raw, output_win32 }; | 36 | { output_termcap, output_x_window, output_msdos_raw, output_win32 }; |
| @@ -294,14 +289,12 @@ struct frame | |||
| 294 | char mouse_moved; | 289 | char mouse_moved; |
| 295 | }; | 290 | }; |
| 296 | 291 | ||
| 297 | #ifdef MULTI_KBOARD /* Note that MULTI_KBOARD implies MULTI_FRAME */ | 292 | #ifdef MULTI_KBOARD |
| 298 | #define FRAME_KBOARD(f) ((f)->kboard) | 293 | #define FRAME_KBOARD(f) ((f)->kboard) |
| 299 | #else | 294 | #else |
| 300 | #define FRAME_KBOARD(f) (&the_only_kboard) | 295 | #define FRAME_KBOARD(f) (&the_only_kboard) |
| 301 | #endif | 296 | #endif |
| 302 | 297 | ||
| 303 | #ifdef MULTI_FRAME | ||
| 304 | |||
| 305 | typedef struct frame *FRAME_PTR; | 298 | typedef struct frame *FRAME_PTR; |
| 306 | 299 | ||
| 307 | #define XFRAME(p) ((struct frame *) XPNTR (p)) | 300 | #define XFRAME(p) ((struct frame *) XPNTR (p)) |
| @@ -422,8 +415,9 @@ typedef struct frame *FRAME_PTR; | |||
| 422 | should be a Lisp_Object too; it is used to iterate through the | 415 | should be a Lisp_Object too; it is used to iterate through the |
| 423 | Vframe_list. | 416 | Vframe_list. |
| 424 | 417 | ||
| 425 | If MULTI_FRAME isn't defined, then this loop expands to something which | 418 | This macro is a holdover from a time when multiple frames weren't always |
| 426 | executes the statement once. */ | 419 | supported. An alternate definition of the macro would expand to |
| 420 | something which executes the statement once. */ | ||
| 427 | #define FOR_EACH_FRAME(list_var, frame_var) \ | 421 | #define FOR_EACH_FRAME(list_var, frame_var) \ |
| 428 | for ((list_var) = Vframe_list; \ | 422 | for ((list_var) = Vframe_list; \ |
| 429 | (CONSP (list_var) \ | 423 | (CONSP (list_var) \ |
| @@ -446,105 +440,7 @@ extern Lisp_Object Vdefault_frame_alist; | |||
| 446 | 440 | ||
| 447 | extern Lisp_Object Vterminal_frame; | 441 | extern Lisp_Object Vterminal_frame; |
| 448 | 442 | ||
| 449 | #else /* not MULTI_FRAME */ | 443 | /* Device-independent scroll bar stuff. */ |
| 450 | |||
| 451 | /* These definitions are used in a single-frame version of Emacs. */ | ||
| 452 | |||
| 453 | /* A frame we use to store all the data concerning the screen when we | ||
| 454 | don't have multiple frames. Remember, if you store any data in it | ||
| 455 | which needs to be protected from GC, you should staticpro that | ||
| 456 | element explicitly. */ | ||
| 457 | extern struct frame the_only_frame; | ||
| 458 | |||
| 459 | typedef struct frame *FRAME_PTR; | ||
| 460 | #ifdef __GNUC__ | ||
| 461 | /* A function call for always getting 0 is overkill, so... */ | ||
| 462 | #define WINDOW_FRAME(w) ({ Lisp_Object tem; XSETFASTINT (tem, 0); tem; }) | ||
| 463 | #else | ||
| 464 | #define WINDOW_FRAME(w) (Fselected_frame ()) | ||
| 465 | #endif | ||
| 466 | #define XSETFRAME(p, v) (p = WINDOW_FRAME (***bogus***)) | ||
| 467 | #define XFRAME(frame) (&the_only_frame) | ||
| 468 | |||
| 469 | extern FRAME_PTR selected_frame; | ||
| 470 | extern FRAME_PTR last_nonminibuf_frame; | ||
| 471 | |||
| 472 | #define FRAME_LIVE_P(f) 1 | ||
| 473 | #define FRAME_MSDOS_P(f) 0 | ||
| 474 | #ifdef MSDOS | ||
| 475 | /* The following definitions could also be used in the non-MSDOS case, | ||
| 476 | but the constants below lead to better code. */ | ||
| 477 | #define FRAME_TERMCAP_P(f) (the_only_frame.output_method == output_termcap) | ||
| 478 | #define FRAME_X_P(f) (the_only_frame.output_method != output_termcap) | ||
| 479 | #else | ||
| 480 | #define FRAME_TERMCAP_P(f) 1 | ||
| 481 | #define FRAME_X_P(f) 0 | ||
| 482 | #endif | ||
| 483 | #define FRAME_WINDOW_P(f) FRAME_X_P (f) | ||
| 484 | #define FRAME_MINIBUF_ONLY_P(f) 0 | ||
| 485 | #define FRAME_HAS_MINIBUF_P(f) 1 | ||
| 486 | #define FRAME_CURRENT_GLYPHS(f) (the_only_frame.current_glyphs) | ||
| 487 | #define FRAME_DESIRED_GLYPHS(f) (the_only_frame.desired_glyphs) | ||
| 488 | #define FRAME_TEMP_GLYPHS(f) (the_only_frame.temp_glyphs) | ||
| 489 | #define FRAME_HEIGHT(f) (the_only_frame.height) | ||
| 490 | #define FRAME_WIDTH(f) (the_only_frame.width) | ||
| 491 | #define FRAME_NEW_HEIGHT(f) (the_only_frame.new_height) | ||
| 492 | #define FRAME_NEW_WIDTH(f) (the_only_frame.new_width) | ||
| 493 | #define FRAME_MENU_BAR_LINES(f) (the_only_frame.menu_bar_lines) | ||
| 494 | #define FRAME_CURSOR_X(f) (the_only_frame.cursor_x) | ||
| 495 | #define FRAME_CURSOR_Y(f) (the_only_frame.cursor_y) | ||
| 496 | #define FRAME_SET_VISIBLE(f,p) (p) | ||
| 497 | #define FRAME_VISIBLE_P(f) 1 | ||
| 498 | #define SET_FRAME_GARBAGED(f) (frame_garbaged = 1) | ||
| 499 | #define FRAME_GARBAGED_P(f) (frame_garbaged) | ||
| 500 | #define FRAME_NO_SPLIT_P(f) 0 | ||
| 501 | #define FRAME_WANTS_MODELINE_P(f) 1 | ||
| 502 | #define FRAME_ICONIFIED_P(f) 0 | ||
| 503 | #define FRAME_WINDOW_SIZES_CHANGED(f) the_only_frame.window_sizes_changed | ||
| 504 | #define FRAME_MINIBUF_WINDOW(f) (minibuf_window) | ||
| 505 | #define FRAME_ROOT_WINDOW(f) (the_only_frame.root_window) | ||
| 506 | #define FRAME_SELECTED_WINDOW(f) (selected_window) | ||
| 507 | #define SET_GLYPHS_FRAME(glyphs,frame) do ; while (0) | ||
| 508 | #define FRAME_INSERT_COST(frame) (the_only_frame.insert_line_cost) | ||
| 509 | #define FRAME_DELETE_COST(frame) (the_only_frame.delete_line_cost) | ||
| 510 | #define FRAME_INSERTN_COST(frame) (the_only_frame.insert_n_lines_cost) | ||
| 511 | #define FRAME_DELETEN_COST(frame) (the_only_frame.delete_n_lines_cost) | ||
| 512 | #define FRAME_MESSAGE_BUF(f) (the_only_frame.message_buf) | ||
| 513 | #define FRAME_SCROLL_BOTTOM_VPOS(f) (the_only_frame.scroll_bottom_vpos) | ||
| 514 | #define FRAME_FOCUS_FRAME(f) (Qnil) | ||
| 515 | #define FRAME_CAN_HAVE_SCROLL_BARS(f) (the_only_frame.can_have_scroll_bars) | ||
| 516 | #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) \ | ||
| 517 | (the_only_frame.has_vertical_scroll_bars) | ||
| 518 | #define FRAME_SCROLL_BAR_PIXEL_WIDTH(f) (the_only_frame.scroll_bar_pixel_width) | ||
| 519 | #define FRAME_SCROLL_BAR_COLS(f) (the_only_frame.scroll_bar_cols) | ||
| 520 | #define FRAME_SCROLL_BARS(f) (the_only_frame.scroll_bars) | ||
| 521 | #define FRAME_CONDEMNED_SCROLL_BARS(f) (the_only_frame.condemned_scroll_bars) | ||
| 522 | #define FRAME_MENU_BAR_ITEMS(f) (the_only_frame.menu_bar_items) | ||
| 523 | #define FRAME_COST_BAUD_RATE(f) (the_only_frame.cost_calculation_baud_rate) | ||
| 524 | |||
| 525 | /* See comments in definition above. */ | ||
| 526 | #define FRAME_SAMPLE_VISIBILITY(f) (0) | ||
| 527 | |||
| 528 | #define CHECK_FRAME(x, i) do; while (0) | ||
| 529 | #define CHECK_LIVE_FRAME(x, y) do; while (0) | ||
| 530 | |||
| 531 | /* FOR_EACH_FRAME (LIST_VAR, FRAME_VAR) followed by a statement is a | ||
| 532 | `for' loop which iterates over the elements of Vframe_list. The | ||
| 533 | loop will set FRAME_VAR, a Lisp_Object, to each frame in | ||
| 534 | Vframe_list in succession and execute the statement. LIST_VAR | ||
| 535 | should be a Lisp_Object too; it is used to iterate through the | ||
| 536 | Vframe_list. | ||
| 537 | |||
| 538 | If MULTI_FRAME _is_ defined, then this loop expands to a real | ||
| 539 | `for' loop which traverses Vframe_list using LIST_VAR and | ||
| 540 | FRAME_VAR. */ | ||
| 541 | #define FOR_EACH_FRAME(list_var, frame_var) \ | ||
| 542 | for (list_var = Qt; frame_var = WINDOW_FRAME (***bogus***), ! NILP (list_var); list_var = Qnil) | ||
| 543 | |||
| 544 | #endif /* not MULTI_FRAME */ | ||
| 545 | |||
| 546 | |||
| 547 | /* Device- and MULTI_FRAME-independent scroll bar stuff. */ | ||
| 548 | 444 | ||
| 549 | /* Return the starting column (zero-based) of the vertical scroll bar | 445 | /* Return the starting column (zero-based) of the vertical scroll bar |
| 550 | for window W. The column before this one is the last column we can | 446 | for window W. The column before this one is the last column we can |
diff --git a/src/keyboard.c b/src/keyboard.c index 9affa6df2a1..c8fe99008cd 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -293,14 +293,12 @@ int last_point_position; | |||
| 293 | /* The buffer that was current when the last command was started. */ | 293 | /* The buffer that was current when the last command was started. */ |
| 294 | Lisp_Object last_point_position_buffer; | 294 | Lisp_Object last_point_position_buffer; |
| 295 | 295 | ||
| 296 | #ifdef MULTI_FRAME | ||
| 297 | /* The frame in which the last input event occurred, or Qmacro if the | 296 | /* The frame in which the last input event occurred, or Qmacro if the |
| 298 | last event came from a macro. We use this to determine when to | 297 | last event came from a macro. We use this to determine when to |
| 299 | generate switch-frame events. This may be cleared by functions | 298 | generate switch-frame events. This may be cleared by functions |
| 300 | like Fselect_frame, to make sure that a switch-frame event is | 299 | like Fselect_frame, to make sure that a switch-frame event is |
| 301 | generated by the next character. */ | 300 | generated by the next character. */ |
| 302 | Lisp_Object internal_last_event_frame; | 301 | Lisp_Object internal_last_event_frame; |
| 303 | #endif | ||
| 304 | 302 | ||
| 305 | /* A user-visible version of the above, intended to allow users to | 303 | /* A user-visible version of the above, intended to allow users to |
| 306 | figure out where the last event came from, if the event doesn't | 304 | figure out where the last event came from, if the event doesn't |
| @@ -1154,7 +1152,6 @@ command_loop_1 () | |||
| 1154 | #endif /* C_ALLOCA */ | 1152 | #endif /* C_ALLOCA */ |
| 1155 | 1153 | ||
| 1156 | #if 0 | 1154 | #if 0 |
| 1157 | #ifdef MULTI_FRAME | ||
| 1158 | /* Select the frame that the last event came from. Usually, | 1155 | /* Select the frame that the last event came from. Usually, |
| 1159 | switch-frame events will take care of this, but if some lisp | 1156 | switch-frame events will take care of this, but if some lisp |
| 1160 | code swallows a switch-frame event, we'll fix things up here. | 1157 | code swallows a switch-frame event, we'll fix things up here. |
| @@ -1163,7 +1160,6 @@ command_loop_1 () | |||
| 1163 | && XFRAME (internal_last_event_frame) != selected_frame) | 1160 | && XFRAME (internal_last_event_frame) != selected_frame) |
| 1164 | Fselect_frame (internal_last_event_frame, Qnil); | 1161 | Fselect_frame (internal_last_event_frame, Qnil); |
| 1165 | #endif | 1162 | #endif |
| 1166 | #endif | ||
| 1167 | /* If it has changed current-menubar from previous value, | 1163 | /* If it has changed current-menubar from previous value, |
| 1168 | really recompute the menubar from the value. */ | 1164 | really recompute the menubar from the value. */ |
| 1169 | if (! NILP (Vlucid_menu_bar_dirty_flag) | 1165 | if (! NILP (Vlucid_menu_bar_dirty_flag) |
| @@ -1723,7 +1719,6 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 1723 | 1719 | ||
| 1724 | if (!NILP (Vexecuting_macro)) | 1720 | if (!NILP (Vexecuting_macro)) |
| 1725 | { | 1721 | { |
| 1726 | #ifdef MULTI_FRAME | ||
| 1727 | /* We set this to Qmacro; since that's not a frame, nobody will | 1722 | /* We set this to Qmacro; since that's not a frame, nobody will |
| 1728 | try to switch frames on us, and the selected window will | 1723 | try to switch frames on us, and the selected window will |
| 1729 | remain unchanged. | 1724 | remain unchanged. |
| @@ -1735,7 +1730,6 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 1735 | events read from a macro should never cause a new frame to be | 1730 | events read from a macro should never cause a new frame to be |
| 1736 | selected. */ | 1731 | selected. */ |
| 1737 | Vlast_event_frame = internal_last_event_frame = Qmacro; | 1732 | Vlast_event_frame = internal_last_event_frame = Qmacro; |
| 1738 | #endif | ||
| 1739 | 1733 | ||
| 1740 | /* Exit the macro if we are at the end. | 1734 | /* Exit the macro if we are at the end. |
| 1741 | Also, some things replace the macro with t | 1735 | Also, some things replace the macro with t |
| @@ -1810,10 +1804,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 1810 | if (_setjmp (local_getcjmp)) | 1804 | if (_setjmp (local_getcjmp)) |
| 1811 | { | 1805 | { |
| 1812 | XSETINT (c, quit_char); | 1806 | XSETINT (c, quit_char); |
| 1813 | #ifdef MULTI_FRAME | ||
| 1814 | XSETFRAME (internal_last_event_frame, selected_frame); | 1807 | XSETFRAME (internal_last_event_frame, selected_frame); |
| 1815 | Vlast_event_frame = internal_last_event_frame; | 1808 | Vlast_event_frame = internal_last_event_frame; |
| 1816 | #endif | ||
| 1817 | /* If we report the quit char as an event, | 1809 | /* If we report the quit char as an event, |
| 1818 | don't do so more than once. */ | 1810 | don't do so more than once. */ |
| 1819 | if (!NILP (Vinhibit_quit)) | 1811 | if (!NILP (Vinhibit_quit)) |
| @@ -1960,12 +1952,10 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 1960 | if (NILP (current_kboard->kbd_queue)) | 1952 | if (NILP (current_kboard->kbd_queue)) |
| 1961 | current_kboard->kbd_queue_has_data = 0; | 1953 | current_kboard->kbd_queue_has_data = 0; |
| 1962 | input_pending = readable_events (0); | 1954 | input_pending = readable_events (0); |
| 1963 | #ifdef MULTI_FRAME | ||
| 1964 | if (EVENT_HAS_PARAMETERS (c) | 1955 | if (EVENT_HAS_PARAMETERS (c) |
| 1965 | && EQ (EVENT_HEAD_KIND (EVENT_HEAD (c)), Qswitch_frame)) | 1956 | && EQ (EVENT_HEAD_KIND (EVENT_HEAD (c)), Qswitch_frame)) |
| 1966 | internal_last_event_frame = XCONS (XCONS (c)->cdr)->car; | 1957 | internal_last_event_frame = XCONS (XCONS (c)->cdr)->car; |
| 1967 | Vlast_event_frame = internal_last_event_frame; | 1958 | Vlast_event_frame = internal_last_event_frame; |
| 1968 | #endif | ||
| 1969 | } | 1959 | } |
| 1970 | } | 1960 | } |
| 1971 | 1961 | ||
| @@ -2475,7 +2465,6 @@ kbd_buffer_store_event (event) | |||
| 2475 | } | 2465 | } |
| 2476 | #endif | 2466 | #endif |
| 2477 | 2467 | ||
| 2478 | #ifdef MULTI_FRAME | ||
| 2479 | /* If this results in a quit_char being returned to Emacs as | 2468 | /* If this results in a quit_char being returned to Emacs as |
| 2480 | input, set Vlast_event_frame properly. If this doesn't | 2469 | input, set Vlast_event_frame properly. If this doesn't |
| 2481 | get returned to Emacs as an event, the next event read | 2470 | get returned to Emacs as an event, the next event read |
| @@ -2489,7 +2478,6 @@ kbd_buffer_store_event (event) | |||
| 2489 | internal_last_event_frame = focus; | 2478 | internal_last_event_frame = focus; |
| 2490 | Vlast_event_frame = focus; | 2479 | Vlast_event_frame = focus; |
| 2491 | } | 2480 | } |
| 2492 | #endif | ||
| 2493 | 2481 | ||
| 2494 | last_event_timestamp = event->timestamp; | 2482 | last_event_timestamp = event->timestamp; |
| 2495 | interrupt_signal (); | 2483 | interrupt_signal (); |
| @@ -2724,7 +2712,6 @@ kbd_buffer_get_event (kbp, used_mouse_menu) | |||
| 2724 | time, and leave the event in the queue for next time. */ | 2712 | time, and leave the event in the queue for next time. */ |
| 2725 | else | 2713 | else |
| 2726 | { | 2714 | { |
| 2727 | #ifdef MULTI_FRAME | ||
| 2728 | Lisp_Object frame; | 2715 | Lisp_Object frame; |
| 2729 | Lisp_Object focus; | 2716 | Lisp_Object focus; |
| 2730 | 2717 | ||
| @@ -2742,7 +2729,6 @@ kbd_buffer_get_event (kbp, used_mouse_menu) | |||
| 2742 | && XFRAME (frame) != selected_frame) | 2729 | && XFRAME (frame) != selected_frame) |
| 2743 | obj = make_lispy_switch_frame (frame); | 2730 | obj = make_lispy_switch_frame (frame); |
| 2744 | internal_last_event_frame = frame; | 2731 | internal_last_event_frame = frame; |
| 2745 | #endif /* MULTI_FRAME */ | ||
| 2746 | 2732 | ||
| 2747 | /* If we didn't decide to make a switch-frame event, go ahead | 2733 | /* If we didn't decide to make a switch-frame event, go ahead |
| 2748 | and build a real event from the queue entry. */ | 2734 | and build a real event from the queue entry. */ |
| @@ -2789,7 +2775,6 @@ kbd_buffer_get_event (kbp, used_mouse_menu) | |||
| 2789 | 2775 | ||
| 2790 | obj = Qnil; | 2776 | obj = Qnil; |
| 2791 | 2777 | ||
| 2792 | #ifdef MULTI_FRAME | ||
| 2793 | /* Decide if we should generate a switch-frame event. Don't | 2778 | /* Decide if we should generate a switch-frame event. Don't |
| 2794 | generate switch-frame events for motion outside of all Emacs | 2779 | generate switch-frame events for motion outside of all Emacs |
| 2795 | frames. */ | 2780 | frames. */ |
| @@ -2806,7 +2791,6 @@ kbd_buffer_get_event (kbp, used_mouse_menu) | |||
| 2806 | obj = make_lispy_switch_frame (frame); | 2791 | obj = make_lispy_switch_frame (frame); |
| 2807 | internal_last_event_frame = frame; | 2792 | internal_last_event_frame = frame; |
| 2808 | } | 2793 | } |
| 2809 | #endif | ||
| 2810 | 2794 | ||
| 2811 | /* If we didn't decide to make a switch-frame event, go ahead and | 2795 | /* If we didn't decide to make a switch-frame event, go ahead and |
| 2812 | return a mouse-motion event. */ | 2796 | return a mouse-motion event. */ |
| @@ -2821,9 +2805,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu) | |||
| 2821 | 2805 | ||
| 2822 | input_pending = readable_events (0); | 2806 | input_pending = readable_events (0); |
| 2823 | 2807 | ||
| 2824 | #ifdef MULTI_FRAME | ||
| 2825 | Vlast_event_frame = internal_last_event_frame; | 2808 | Vlast_event_frame = internal_last_event_frame; |
| 2826 | #endif | ||
| 2827 | 2809 | ||
| 2828 | return (obj); | 2810 | return (obj); |
| 2829 | } | 2811 | } |
| @@ -3998,7 +3980,6 @@ make_lispy_movement (frame, bar_window, part, x, y, time) | |||
| 3998 | Lisp_Object x, y; | 3980 | Lisp_Object x, y; |
| 3999 | unsigned long time; | 3981 | unsigned long time; |
| 4000 | { | 3982 | { |
| 4001 | #ifdef MULTI_FRAME | ||
| 4002 | /* Is it a scroll bar movement? */ | 3983 | /* Is it a scroll bar movement? */ |
| 4003 | if (frame && ! NILP (bar_window)) | 3984 | if (frame && ! NILP (bar_window)) |
| 4004 | { | 3985 | { |
| @@ -4017,18 +3998,13 @@ make_lispy_movement (frame, bar_window, part, x, y, time) | |||
| 4017 | 3998 | ||
| 4018 | /* Or is it an ordinary mouse movement? */ | 3999 | /* Or is it an ordinary mouse movement? */ |
| 4019 | else | 4000 | else |
| 4020 | #endif /* MULTI_FRAME */ | ||
| 4021 | { | 4001 | { |
| 4022 | int area; | 4002 | int area; |
| 4023 | Lisp_Object window; | 4003 | Lisp_Object window; |
| 4024 | Lisp_Object posn; | 4004 | Lisp_Object posn; |
| 4025 | int column, row; | 4005 | int column, row; |
| 4026 | 4006 | ||
| 4027 | #ifdef MULTI_FRAME | ||
| 4028 | if (frame) | 4007 | if (frame) |
| 4029 | #else | ||
| 4030 | if (1) | ||
| 4031 | #endif | ||
| 4032 | { | 4008 | { |
| 4033 | /* It's in a frame; which window on that frame? */ | 4009 | /* It's in a frame; which window on that frame? */ |
| 4034 | pixel_to_glyph_coords (frame, XINT (x), XINT (y), &column, &row, | 4010 | pixel_to_glyph_coords (frame, XINT (x), XINT (y), &column, &row, |
| @@ -4055,13 +4031,11 @@ make_lispy_movement (frame, bar_window, part, x, y, time) | |||
| 4055 | XSETINT (posn, | 4031 | XSETINT (posn, |
| 4056 | buffer_posn_from_coords (XWINDOW (window), column, row)); | 4032 | buffer_posn_from_coords (XWINDOW (window), column, row)); |
| 4057 | } | 4033 | } |
| 4058 | #ifdef MULTI_FRAME | ||
| 4059 | else if (frame != 0) | 4034 | else if (frame != 0) |
| 4060 | { | 4035 | { |
| 4061 | XSETFRAME (window, frame); | 4036 | XSETFRAME (window, frame); |
| 4062 | posn = Qnil; | 4037 | posn = Qnil; |
| 4063 | } | 4038 | } |
| 4064 | #endif | ||
| 4065 | else | 4039 | else |
| 4066 | { | 4040 | { |
| 4067 | window = Qnil; | 4041 | window = Qnil; |
| @@ -4901,11 +4875,7 @@ read_avail_input (expected) | |||
| 4901 | cbuf[i] &= ~0x80; | 4875 | cbuf[i] &= ~0x80; |
| 4902 | 4876 | ||
| 4903 | buf[i].code = cbuf[i]; | 4877 | buf[i].code = cbuf[i]; |
| 4904 | #ifdef MULTI_FRAME | ||
| 4905 | XSETFRAME (buf[i].frame_or_window, selected_frame); | 4878 | XSETFRAME (buf[i].frame_or_window, selected_frame); |
| 4906 | #else | ||
| 4907 | buf[i].frame_or_window = Qnil; | ||
| 4908 | #endif | ||
| 4909 | } | 4879 | } |
| 4910 | } | 4880 | } |
| 4911 | 4881 | ||
| @@ -7526,12 +7496,10 @@ quit_throw_to_read_char () | |||
| 7526 | abort (); | 7496 | abort (); |
| 7527 | #endif | 7497 | #endif |
| 7528 | #endif | 7498 | #endif |
| 7529 | #ifdef MULTI_FRAME | ||
| 7530 | if (FRAMEP (internal_last_event_frame) | 7499 | if (FRAMEP (internal_last_event_frame) |
| 7531 | && XFRAME (internal_last_event_frame) != selected_frame) | 7500 | && XFRAME (internal_last_event_frame) != selected_frame) |
| 7532 | do_switch_frame (make_lispy_switch_frame (internal_last_event_frame), | 7501 | do_switch_frame (make_lispy_switch_frame (internal_last_event_frame), |
| 7533 | Qnil, 0); | 7502 | Qnil, 0); |
| 7534 | #endif | ||
| 7535 | 7503 | ||
| 7536 | _longjmp (getcjmp, 1); | 7504 | _longjmp (getcjmp, 1); |
| 7537 | } | 7505 | } |
| @@ -7708,12 +7676,10 @@ init_keyboard () | |||
| 7708 | #endif | 7676 | #endif |
| 7709 | input_pending = 0; | 7677 | input_pending = 0; |
| 7710 | 7678 | ||
| 7711 | #ifdef MULTI_FRAME | ||
| 7712 | /* This means that command_loop_1 won't try to select anything the first | 7679 | /* This means that command_loop_1 won't try to select anything the first |
| 7713 | time through. */ | 7680 | time through. */ |
| 7714 | internal_last_event_frame = Qnil; | 7681 | internal_last_event_frame = Qnil; |
| 7715 | Vlast_event_frame = internal_last_event_frame; | 7682 | Vlast_event_frame = internal_last_event_frame; |
| 7716 | #endif | ||
| 7717 | 7683 | ||
| 7718 | #ifdef MULTI_KBOARD | 7684 | #ifdef MULTI_KBOARD |
| 7719 | current_kboard = initial_kboard; | 7685 | current_kboard = initial_kboard; |
diff --git a/src/keyboard.h b/src/keyboard.h index 66ff8ca36bc..1c36e11d1b8 100644 --- a/src/keyboard.h +++ b/src/keyboard.h | |||
| @@ -196,15 +196,12 @@ extern Lisp_Object Vfunction_key_map; | |||
| 196 | extern Lisp_Object this_command_keys; | 196 | extern Lisp_Object this_command_keys; |
| 197 | extern int this_command_key_count; | 197 | extern int this_command_key_count; |
| 198 | 198 | ||
| 199 | #ifdef MULTI_FRAME | ||
| 200 | /* The frame in which the last input event occurred, or Qmacro if the | 199 | /* The frame in which the last input event occurred, or Qmacro if the |
| 201 | last event came from a macro. We use this to determine when to | 200 | last event came from a macro. We use this to determine when to |
| 202 | generate switch-frame events. This may be cleared by functions | 201 | generate switch-frame events. This may be cleared by functions |
| 203 | like Fselect_frame, to make sure that a switch-frame event is | 202 | like Fselect_frame, to make sure that a switch-frame event is |
| 204 | generated by the next character. */ | 203 | generated by the next character. */ |
| 205 | extern Lisp_Object internal_last_event_frame; | 204 | extern Lisp_Object internal_last_event_frame; |
| 206 | #endif | ||
| 207 | |||
| 208 | 205 | ||
| 209 | /* Macros for dealing with lispy events. */ | 206 | /* Macros for dealing with lispy events. */ |
| 210 | 207 | ||
diff --git a/src/lisp.h b/src/lisp.h index c13a1e7a53a..d524f3fb140 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -984,19 +984,8 @@ typedef unsigned char UCHAR; | |||
| 984 | #define GC_CHAR_TABLE_P(x) GC_PSEUDOVECTORP (x, PVEC_CHAR_TABLE) | 984 | #define GC_CHAR_TABLE_P(x) GC_PSEUDOVECTORP (x, PVEC_CHAR_TABLE) |
| 985 | #define BOOL_VECTOR_P(x) PSEUDOVECTORP (x, PVEC_BOOL_VECTOR) | 985 | #define BOOL_VECTOR_P(x) PSEUDOVECTORP (x, PVEC_BOOL_VECTOR) |
| 986 | #define GC_BOOL_VECTOR_P(x) GC_PSEUDOVECTORP (x, PVEC_BOOL_VECTOR) | 986 | #define GC_BOOL_VECTOR_P(x) GC_PSEUDOVECTORP (x, PVEC_BOOL_VECTOR) |
| 987 | |||
| 988 | #ifdef MULTI_FRAME | ||
| 989 | #define FRAMEP(x) PSEUDOVECTORP (x, PVEC_FRAME) | 987 | #define FRAMEP(x) PSEUDOVECTORP (x, PVEC_FRAME) |
| 990 | #define GC_FRAMEP(x) GC_PSEUDOVECTORP (x, PVEC_FRAME) | 988 | #define GC_FRAMEP(x) GC_PSEUDOVECTORP (x, PVEC_FRAME) |
| 991 | #else | ||
| 992 | #ifdef HAVE_MOUSE | ||
| 993 | /* We could use this in the !HAVE_MOUSE case also, but we prefer a compile-time | ||
| 994 | error message in case FRAMEP is used. */ | ||
| 995 | #define FRAMEP(x) (EQ (x, Fselected_frame ())) | ||
| 996 | #define GC_FRAMEP(x) (GC_EQ (x, Fselected_frame ())) | ||
| 997 | #endif | ||
| 998 | #endif | ||
| 999 | |||
| 1000 | 989 | ||
| 1001 | #define EQ(x, y) (XFASTINT (x) == XFASTINT (y)) | 990 | #define EQ(x, y) (XFASTINT (x) == XFASTINT (y)) |
| 1002 | #define GC_EQ(x, y) (XGCTYPE (x) == XGCTYPE (y) && XPNTR (x) == XPNTR (y)) | 991 | #define GC_EQ(x, y) (XGCTYPE (x) == XGCTYPE (y) && XPNTR (x) == XPNTR (y)) |
diff --git a/src/minibuf.c b/src/minibuf.c index 2f7a3baa0ae..db6d5f05cff 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -204,7 +204,6 @@ read_minibuf (map, initial, prompt, backup_n, expflag, histvar, histpos) | |||
| 204 | 204 | ||
| 205 | /* If the minibuffer window is on a different frame, save that | 205 | /* If the minibuffer window is on a different frame, save that |
| 206 | frame's configuration too. */ | 206 | frame's configuration too. */ |
| 207 | #ifdef MULTI_FRAME | ||
| 208 | mini_frame = WINDOW_FRAME (XWINDOW (minibuf_window)); | 207 | mini_frame = WINDOW_FRAME (XWINDOW (minibuf_window)); |
| 209 | if (XFRAME (mini_frame) != selected_frame) | 208 | if (XFRAME (mini_frame) != selected_frame) |
| 210 | record_unwind_protect (Fset_window_configuration, | 209 | record_unwind_protect (Fset_window_configuration, |
| @@ -216,7 +215,6 @@ read_minibuf (map, initial, prompt, backup_n, expflag, histvar, histpos) | |||
| 216 | 215 | ||
| 217 | if (minibuffer_auto_raise) | 216 | if (minibuffer_auto_raise) |
| 218 | Fraise_frame (mini_frame); | 217 | Fraise_frame (mini_frame); |
| 219 | #endif | ||
| 220 | 218 | ||
| 221 | /* We have to do this after saving the window configuration | 219 | /* We have to do this after saving the window configuration |
| 222 | since that is what restores the current buffer. */ | 220 | since that is what restores the current buffer. */ |
| @@ -280,10 +278,8 @@ read_minibuf (map, initial, prompt, backup_n, expflag, histvar, histpos) | |||
| 280 | } | 278 | } |
| 281 | } | 279 | } |
| 282 | 280 | ||
| 283 | #ifdef MULTI_FRAME | ||
| 284 | if (XFRAME (mini_frame) != selected_frame) | 281 | if (XFRAME (mini_frame) != selected_frame) |
| 285 | Fredirect_frame_focus (Fselected_frame (), mini_frame); | 282 | Fredirect_frame_focus (Fselected_frame (), mini_frame); |
| 286 | #endif | ||
| 287 | 283 | ||
| 288 | Vminibuf_scroll_window = selected_window; | 284 | Vminibuf_scroll_window = selected_window; |
| 289 | Fset_window_buffer (minibuf_window, Fcurrent_buffer ()); | 285 | Fset_window_buffer (minibuf_window, Fcurrent_buffer ()); |
diff --git a/src/print.c b/src/print.c index b34adbf9814..d6b850b9c48 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -1150,7 +1150,6 @@ print (obj, printcharfun, escapeflag) | |||
| 1150 | { | 1150 | { |
| 1151 | strout ("#<window-configuration>", -1, printcharfun); | 1151 | strout ("#<window-configuration>", -1, printcharfun); |
| 1152 | } | 1152 | } |
| 1153 | #ifdef MULTI_FRAME | ||
| 1154 | else if (FRAMEP (obj)) | 1153 | else if (FRAMEP (obj)) |
| 1155 | { | 1154 | { |
| 1156 | strout ((FRAME_LIVE_P (XFRAME (obj)) | 1155 | strout ((FRAME_LIVE_P (XFRAME (obj)) |
| @@ -1161,7 +1160,6 @@ print (obj, printcharfun, escapeflag) | |||
| 1161 | strout (buf, -1, printcharfun); | 1160 | strout (buf, -1, printcharfun); |
| 1162 | PRINTCHAR ('>'); | 1161 | PRINTCHAR ('>'); |
| 1163 | } | 1162 | } |
| 1164 | #endif | ||
| 1165 | #endif /* not standalone */ | 1163 | #endif /* not standalone */ |
| 1166 | else | 1164 | else |
| 1167 | { | 1165 | { |
diff --git a/src/puresize.h b/src/puresize.h index 0b4d6023aeb..f413ecbf4f7 100644 --- a/src/puresize.h +++ b/src/puresize.h | |||
| @@ -42,11 +42,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 42 | #endif | 42 | #endif |
| 43 | 43 | ||
| 44 | #ifndef BASE_PURESIZE | 44 | #ifndef BASE_PURESIZE |
| 45 | #ifdef MULTI_FRAME | ||
| 46 | #define BASE_PURESIZE (325000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) | 45 | #define BASE_PURESIZE (325000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) |
| 47 | #else | ||
| 48 | #define BASE_PURESIZE (240000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) | ||
| 49 | #endif | ||
| 50 | #endif | 46 | #endif |
| 51 | 47 | ||
| 52 | /* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */ | 48 | /* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */ |
diff --git a/src/sysdep.c b/src/sysdep.c index d00dcbb6266..21271e7e28f 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -1517,10 +1517,8 @@ init_sys_modes () | |||
| 1517 | else | 1517 | else |
| 1518 | { | 1518 | { |
| 1519 | frame_garbaged = 1; | 1519 | frame_garbaged = 1; |
| 1520 | #ifdef MULTI_FRAME | ||
| 1521 | if (FRAMEP (Vterminal_frame)) | 1520 | if (FRAMEP (Vterminal_frame)) |
| 1522 | FRAME_GARBAGED_P (XFRAME (Vterminal_frame)) = 1; | 1521 | FRAME_GARBAGED_P (XFRAME (Vterminal_frame)) = 1; |
| 1523 | #endif | ||
| 1524 | } | 1522 | } |
| 1525 | 1523 | ||
| 1526 | term_initted = 1; | 1524 | term_initted = 1; |
diff --git a/src/w32faces.c b/src/w32faces.c index c7b4c3263e0..1b30e85bdff 100644 --- a/src/w32faces.c +++ b/src/w32faces.c | |||
| @@ -373,7 +373,6 @@ init_frame_faces (f) | |||
| 373 | new_computed_face (f, FRAME_PARAM_FACES (f)[1]); | 373 | new_computed_face (f, FRAME_PARAM_FACES (f)[1]); |
| 374 | recompute_basic_faces (f); | 374 | recompute_basic_faces (f); |
| 375 | 375 | ||
| 376 | #ifdef MULTI_FRAME | ||
| 377 | /* Find another frame. */ | 376 | /* Find another frame. */ |
| 378 | { | 377 | { |
| 379 | Lisp_Object tail, frame, result; | 378 | Lisp_Object tail, frame, result; |
| @@ -402,7 +401,6 @@ init_frame_faces (f) | |||
| 402 | ensure_face_ready (f, i); | 401 | ensure_face_ready (f, i); |
| 403 | } | 402 | } |
| 404 | } | 403 | } |
| 405 | #endif /* MULTI_FRAME */ | ||
| 406 | } | 404 | } |
| 407 | 405 | ||
| 408 | 406 | ||
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\ |
diff --git a/src/xdisp.c b/src/xdisp.c index d01775f5e22..4af129f7ca4 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -418,12 +418,10 @@ message2_nolog (m, len) | |||
| 418 | mini_window = FRAME_MINIBUF_WINDOW (selected_frame); | 418 | mini_window = FRAME_MINIBUF_WINDOW (selected_frame); |
| 419 | f = XFRAME (WINDOW_FRAME (XWINDOW (mini_window))); | 419 | f = XFRAME (WINDOW_FRAME (XWINDOW (mini_window))); |
| 420 | 420 | ||
| 421 | #ifdef MULTI_FRAME | ||
| 422 | FRAME_SAMPLE_VISIBILITY (f); | 421 | FRAME_SAMPLE_VISIBILITY (f); |
| 423 | if (FRAME_VISIBLE_P (selected_frame) | 422 | if (FRAME_VISIBLE_P (selected_frame) |
| 424 | && ! FRAME_VISIBLE_P (f)) | 423 | && ! FRAME_VISIBLE_P (f)) |
| 425 | Fmake_frame_visible (WINDOW_FRAME (XWINDOW (mini_window))); | 424 | Fmake_frame_visible (WINDOW_FRAME (XWINDOW (mini_window))); |
| 426 | #endif | ||
| 427 | 425 | ||
| 428 | if (m) | 426 | if (m) |
| 429 | { | 427 | { |
| @@ -844,7 +842,6 @@ redisplay_internal (preserve_echo_area) | |||
| 844 | return; | 842 | return; |
| 845 | #endif | 843 | #endif |
| 846 | 844 | ||
| 847 | #ifdef MULTI_FRAME | ||
| 848 | if (! FRAME_WINDOW_P (selected_frame) | 845 | if (! FRAME_WINDOW_P (selected_frame) |
| 849 | && previous_terminal_frame != selected_frame) | 846 | && previous_terminal_frame != selected_frame) |
| 850 | { | 847 | { |
| @@ -855,7 +852,6 @@ redisplay_internal (preserve_echo_area) | |||
| 855 | XSETFRAME (Vterminal_frame, selected_frame); | 852 | XSETFRAME (Vterminal_frame, selected_frame); |
| 856 | } | 853 | } |
| 857 | previous_terminal_frame = selected_frame; | 854 | previous_terminal_frame = selected_frame; |
| 858 | #endif | ||
| 859 | 855 | ||
| 860 | /* Set the visible flags for all frames. | 856 | /* Set the visible flags for all frames. |
| 861 | Do this before checking for resized or garbaged frames; they want | 857 | Do this before checking for resized or garbaged frames; they want |
| @@ -1112,7 +1108,6 @@ update: | |||
| 1112 | unrequest_sigio (); | 1108 | unrequest_sigio (); |
| 1113 | stop_polling (); | 1109 | stop_polling (); |
| 1114 | 1110 | ||
| 1115 | #ifdef MULTI_FRAME | ||
| 1116 | if (all_windows) | 1111 | if (all_windows) |
| 1117 | { | 1112 | { |
| 1118 | Lisp_Object tail; | 1113 | Lisp_Object tail; |
| @@ -1142,7 +1137,6 @@ update: | |||
| 1142 | } | 1137 | } |
| 1143 | } | 1138 | } |
| 1144 | else | 1139 | else |
| 1145 | #endif /* MULTI_FRAME */ | ||
| 1146 | { | 1140 | { |
| 1147 | if (FRAME_VISIBLE_P (selected_frame)) | 1141 | if (FRAME_VISIBLE_P (selected_frame)) |
| 1148 | pause = update_frame (selected_frame, 0, 0); | 1142 | pause = update_frame (selected_frame, 0, 0); |
| @@ -3742,12 +3736,10 @@ decode_mode_spec (w, c, spec_width, maxwidth) | |||
| 3742 | 3736 | ||
| 3743 | case 'F': | 3737 | case 'F': |
| 3744 | /* %F displays the frame name. */ | 3738 | /* %F displays the frame name. */ |
| 3745 | #ifdef MULTI_FRAME | ||
| 3746 | if (!NILP (f->title)) | 3739 | if (!NILP (f->title)) |
| 3747 | return (char *) XSTRING (f->title)->data; | 3740 | return (char *) XSTRING (f->title)->data; |
| 3748 | if (f->explicit_name || ! FRAME_WINDOW_P (f)) | 3741 | if (f->explicit_name || ! FRAME_WINDOW_P (f)) |
| 3749 | return (char *) XSTRING (f->name)->data; | 3742 | return (char *) XSTRING (f->name)->data; |
| 3750 | #endif | ||
| 3751 | return "Emacs"; | 3743 | return "Emacs"; |
| 3752 | 3744 | ||
| 3753 | case 'f': | 3745 | case 'f': |
diff --git a/src/xfaces.c b/src/xfaces.c index 2d86cd6dd41..6e34bf4b24f 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -560,7 +560,6 @@ init_frame_faces (f) | |||
| 560 | new_computed_face (f, FRAME_PARAM_FACES (f)[1]); | 560 | new_computed_face (f, FRAME_PARAM_FACES (f)[1]); |
| 561 | recompute_basic_faces (f); | 561 | recompute_basic_faces (f); |
| 562 | 562 | ||
| 563 | #ifdef MULTI_FRAME | ||
| 564 | /* Find another X frame. */ | 563 | /* Find another X frame. */ |
| 565 | { | 564 | { |
| 566 | Lisp_Object tail, frame, result; | 565 | Lisp_Object tail, frame, result; |
| @@ -589,7 +588,6 @@ init_frame_faces (f) | |||
| 589 | ensure_face_ready (f, i); | 588 | ensure_face_ready (f, i); |
| 590 | } | 589 | } |
| 591 | } | 590 | } |
| 592 | #endif /* MULTI_FRAME */ | ||
| 593 | } | 591 | } |
| 594 | 592 | ||
| 595 | 593 | ||