From e3678b64333787df03e203b1ed5a4c2ec76d0272 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Sun, 1 Sep 1996 21:04:32 +0000 Subject: [PATCH] Removed support for !MULTI_FRAME. --- src/Makefile.in | 8 +- src/alloc.c | 2 - src/buffer.c | 2 - src/data.c | 3 - src/dispextern.h | 2 - src/dispnew.c | 40 ----- src/frame.c | 430 +---------------------------------------------- src/frame.h | 116 +------------ src/keyboard.c | 34 ---- src/keyboard.h | 3 - src/lisp.h | 11 -- src/minibuf.c | 4 - src/print.c | 2 - src/puresize.h | 4 - src/sysdep.c | 2 - src/w32faces.c | 2 - src/window.c | 103 +----------- src/xdisp.c | 8 - 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) #define FLOAT_SUPPORT #endif -#ifdef MULTI_FRAME -#define FRAME_SUPPORT ${lispsource}frame.elc -#else -#define FRAME_SUPPORT -#endif - #ifdef HAVE_MOUSE #define MOUSE_SUPPORT ${lispsource}menu-bar.elc ${lispsource}mouse.elc \ ${lispsource}select.elc ${lispsource}scroll-bar.elc @@ -631,7 +625,7 @@ lisp= \ FACE_SUPPORT \ MOUSE_SUPPORT \ FLOAT_SUPPORT \ - FRAME_SUPPORT \ + ${lispsource}frame.elc\ X_WINDOWS_SUPPORT \ ${lispsource}help.elc \ ${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) objptr = (Lisp_Object *) &ptr1->contents[COMPILED_CONSTANTS]; goto loop; } -#ifdef MULTI_FRAME else if (GC_FRAMEP (obj)) { /* See comment above under Lisp_Vector for why this is volatile. */ @@ -1826,7 +1825,6 @@ mark_object (argptr) mark_object (&ptr->menu_bar_vector); mark_object (&ptr->buffer_predicate); } -#endif /* MULTI_FRAME */ else if (GC_BOOL_VECTOR_P (obj)) { 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.") continue; if (XSTRING (XBUFFER (buf)->name)->data[0] == ' ') continue; -#ifdef MULTI_FRAME /* If the selected frame has a buffer_predicate, disregard buffers that don't fit the predicate. */ tem = frame_buffer_predicate (); @@ -863,7 +862,6 @@ If BUFFER is omitted or nil, some interesting buffer is returned.") if (NILP (tem)) continue; } -#endif if (NILP (visible_ok)) 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'.") return Qchar_table; if (GC_BOOL_VECTOR_P (object)) return Qbool_vector; - -#ifdef MULTI_FRAME if (GC_FRAMEP (object)) return Qframe; -#endif return Qvector; #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; struct frame_glyphs { -#ifdef MULTI_FRAME struct frame *frame; /* Frame these glyphs belong to. */ -#endif /* MULTI_FRAME */ int height; int width; 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; the address of the_only_frame. */ FRAME_PTR last_nonminibuf_frame; -/* In a single-frame version, the information that would otherwise - exist inside frame objects lives in the following structure instead. - - NOTE: the_only_frame is not checked for garbage collection; don't - store collectible objects in any of its fields! - - You're not/The only frame in town/... */ - -#ifndef MULTI_FRAME -struct frame the_only_frame; -#endif - /* This is a vector, made larger whenever it isn't large enough, which is used inside `update_frame' to hold the old contents of the FRAME_PHYS_LINES of the frame being updated. */ @@ -169,8 +157,6 @@ struct cm Wcm; /* Structure for info on cursor positioning */ int delayed_size_change; /* 1 means SIGWINCH happened when not safe. */ -#ifdef MULTI_FRAME - DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0, "Clear frame FRAME and output again what is supposed to appear on it.") (frame) @@ -203,30 +189,6 @@ redraw_frame (f) Fredraw_frame (frame); } -#else - -DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame) - Lisp_Object frame; -{ - update_begin (0); - set_terminal_modes (); - clear_frame (); - update_end (0); - fflush (stdout); - clear_frame_records (0); - windows_or_buffers_changed++; - /* Mark all windows as INaccurate, - so that every window will have its redisplay done. */ - mark_window_display_accurate (FRAME_ROOT_WINDOW (0), 0); - return Qnil; -} - -#endif - DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "", "Clear and redisplay all visible frames.") () @@ -2589,9 +2551,7 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\ syms_of_display () { -#ifdef MULTI_FRAME defsubr (&Sredraw_frame); -#endif defsubr (&Sredraw_display); defsubr (&Sframe_or_buffer_changed_p); 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. */ (setq symbol-list (cdr symbol-list))))) */ -/* We need most of these symbols even if not MULTI_FRAME; - easiest to define them all, all of the time. */ /*&&& symbols declared here &&&*/ Lisp_Object Qframep; Lisp_Object Qframe_live_p; @@ -172,7 +170,7 @@ set_menu_bar_lines (f, value, oldval) /* Right now, menu bars don't work properly in minibuf-only frames; most of the commands try to apply themselves to the minibuffer - frame itslef, and get an error because you can't switch buffers + frame itself, and get an error because you can't switch buffers in or split the minibuffer window. */ if (FRAME_MINIBUF_ONLY_P (f)) return; @@ -191,8 +189,6 @@ set_menu_bar_lines (f, value, oldval) } } -#ifdef MULTI_FRAME - #include "buffer.h" /* These help us bind and responding to switch-frame events. */ @@ -2133,427 +2129,3 @@ keys_of_frame () initial_define_lispy_key (global_map, "iconify-frame", "ignore-event"); initial_define_lispy_key (global_map, "make-frame-visible", "ignore-event"); } - -#else /* not MULTI_FRAME */ - -/* If we're not using multi-frame stuff, we still need to provide some - support functions. */ - -/* Unless this function is defined, providing set-frame-height and - set-frame-width doesn't help compatibility any, since they both - want this as their first argument. */ -DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - () -{ - /* For your possible information, this code is unfolded into the - second WINDOW_FRAME in frame.h. */ - Lisp_Object tem; - XSETFASTINT (tem, 0); - return tem; -} - -DEFUN ("active-minibuffer-window", Factive_minibuffer_window, - Sactive_minibuffer_window, 0, 0, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - () -{ - return minibuf_level ? minibuf_window : Qnil; -} - -DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (window) - Lisp_Object window; -{ - /* For your possible information, this code is unfolded into the - second WINDOW_FRAME in frame.h. */ - Lisp_Object tem; - XSETFASTINT (tem, 0); - return tem; -} - -DEFUN ("frame-first-window", Fframe_first_window, Sframe_first_window, 0, 1, 0, - 0) - (frame) - Lisp_Object frame; -{ - Lisp_Object w; - - w = FRAME_ROOT_WINDOW (selected_frame); - - while (NILP (XWINDOW (w)->buffer)) - { - if (! NILP (XWINDOW (w)->hchild)) - w = XWINDOW (w)->hchild; - else if (! NILP (XWINDOW (w)->vchild)) - w = XWINDOW (w)->vchild; - else - abort (); - } - return w; -} - -DEFUN ("framep", Fframep, Sframep, 1, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (object) - Lisp_Object object; -{ -#ifdef MSDOS - if (FRAME_X_P (object)) - return intern ("pc"); -#endif - return Qnil; -} - -DEFUN ("set-frame-height", Fset_frame_height, Sset_frame_height, 2, 3, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame, rows, pretend) - Lisp_Object frame, rows, pretend; -{ - CHECK_NUMBER (rows, 0); - - change_frame_size (0, XINT (rows), 0, !NILP (pretend), 0); - return Qnil; -} - -DEFUN ("set-frame-width", Fset_frame_width, Sset_frame_width, 2, 3, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame, cols, pretend) - Lisp_Object frame, cols, pretend; -{ - CHECK_NUMBER (cols, 0); - - change_frame_size (0, 0, XINT (cols), !NILP (pretend), 0); - return Qnil; -} - -DEFUN ("set-frame-size", Fset_frame_size, Sset_frame_size, 3, 3, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame, cols, rows) - Lisp_Object frame, cols, rows; -{ - CHECK_NUMBER (cols, 2); - CHECK_NUMBER (rows, 1); - - change_frame_size (0, XINT (rows), XINT (cols), 0, 0); - - return Qnil; -} - -DEFUN ("frame-height", Fframe_height, Sframe_height, 0, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame) - Lisp_Object frame; -{ - return make_number (FRAME_HEIGHT (selected_frame)); -} - -DEFUN ("frame-width", Fframe_width, Sframe_width, 0, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame) - Lisp_Object frame; -{ - return make_number (FRAME_WIDTH (selected_frame)); -} - -DEFUN ("frame-char-height", Fframe_char_height, Sframe_char_height, - 0, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame) - Lisp_Object frame; -{ - return make_number (1); -} - - -DEFUN ("frame-char-width", Fframe_char_width, Sframe_char_width, - 0, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame) - Lisp_Object frame; -{ - return make_number (1); -} - -DEFUN ("frame-pixel-height", Fframe_pixel_height, - Sframe_pixel_height, 0, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame) - Lisp_Object frame; -{ - return make_number (FRAME_HEIGHT (f)); -} - -DEFUN ("frame-pixel-width", Fframe_pixel_width, - Sframe_pixel_width, 0, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame) - Lisp_Object frame; -{ - return make_number (FRAME_WIDTH (f)); -} - -/* These are for backward compatibility with Emacs 18. */ - -DEFUN ("set-screen-height", Fset_screen_height, Sset_screen_height, 1, 2, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (lines, pretend) - Lisp_Object lines, pretend; -{ - CHECK_NUMBER (lines, 0); - - change_frame_size (0, XINT (lines), 0, !NILP (pretend), 0); - return Qnil; -} - -DEFUN ("set-screen-width", Fset_screen_width, Sset_screen_width, 1, 2, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (cols, pretend) - Lisp_Object cols, pretend; -{ - CHECK_NUMBER (cols, 0); - - change_frame_size (0, 0, XINT (cols), !NILP (pretend), 0); - return Qnil; -} - -DEFUN ("mouse-position", Fmouse_position, Smouse_position, 0, 0, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - () -{ -#ifdef HAVE_MOUSE - if (mouse_position_hook) - { - FRAME_PTR f; - Lisp_Object lispy_dummy; - enum scroll_bar_part party_dummy; - Lisp_Object x, y; - unsigned long long_dummy; - - (*mouse_position_hook) (&f, 0, - &lispy_dummy, &party_dummy, - &x, &y, - &long_dummy); - return Fcons (Fselected_frame (), Fcons (x, y)); - } -#endif - return Fcons (Qnil, Fcons (Qnil, Qnil)); -} - -void -store_in_alist (alistptr, prop, val) - Lisp_Object *alistptr, val; - Lisp_Object prop; -{ - register Lisp_Object tem; - - tem = Fassq (prop, *alistptr); - if (EQ (tem, Qnil)) - *alistptr = Fcons (Fcons (prop, val), *alistptr); - else - Fsetcdr (tem, val); -} - -DEFUN ("frame-parameters", Fframe_parameters, Sframe_parameters, 0, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame) - Lisp_Object frame; -{ - Lisp_Object alist; - FRAME_PTR f; - int height, width; - - if (EQ (frame, Qnil)) - f = selected_frame; - else - { - CHECK_FRAME (frame, 0); - f = XFRAME (frame); - } - - if (!FRAME_LIVE_P (f)) - return Qnil; - - alist = Qnil; -#ifdef MSDOS - if (FRAME_X_P (f)) - { - static char *colornames[16] = - { - "black", "blue", "green", "cyan", "red", "magenta", "brown", - "lightgray", "darkgray", "lightblue", "lightgreen", "lightcyan", - "lightred", "lightmagenta", "yellow", "white" - }; - store_in_alist (&alist, intern ("foreground-color"), - build_string (colornames[FRAME_FOREGROUND_PIXEL (f)])); - store_in_alist (&alist, intern ("background-color"), - build_string (colornames[FRAME_BACKGROUND_PIXEL (f)])); - } -#endif - store_in_alist (&alist, intern ("font"), build_string ("default")); - store_in_alist (&alist, Qname, build_string ("emacs")); - height = (FRAME_NEW_HEIGHT (f) ? FRAME_NEW_HEIGHT (f) : FRAME_HEIGHT (f)); - store_in_alist (&alist, Qheight, make_number (height)); - width = (FRAME_NEW_WIDTH (f) ? FRAME_NEW_WIDTH (f) : FRAME_WIDTH (f)); - store_in_alist (&alist, Qwidth, make_number (width)); - store_in_alist (&alist, Qmodeline, (FRAME_WANTS_MODELINE_P (f) ? Qt : Qnil)); - store_in_alist (&alist, Qminibuffer, FRAME_MINIBUF_WINDOW (f)); - store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil)); - store_in_alist (&alist, Qmenu_bar_lines, (FRAME_MENU_BAR_LINES (f))); - - return alist; -} - -DEFUN ("modify-frame-parameters", Fmodify_frame_parameters, - Smodify_frame_parameters, 2, 2, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame, alist) - Lisp_Object frame, alist; -{ - Lisp_Object tail, elt, prop, val; - FRAME_PTR f; - - if (NILP (frame)) - f = selected_frame; - else - { - CHECK_LIVE_FRAME (frame, 0); - f = XFRAME (frame); - } - -#ifdef MSDOS - if (FRAME_X_P (frame)) - IT_set_frame_parameters (XFRAME (frame), alist); - else -#endif - for (tail = alist; !EQ (tail, Qnil); tail = Fcdr (tail)) - { - elt = Fcar (tail); - prop = Fcar (elt); - val = Fcdr (elt); - if (EQ (prop, Qmenu_bar_lines)) - set_menu_bar_lines (f, val, make_number (FRAME_MENU_BAR_LINES (f))); - } - - return Qnil; -} - -DEFUN ("frame-live-p", Fframe_live_p, Sframe_live_p, 1, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame) - Lisp_Object frame; -{ - return Qt; -} - -DEFUN ("frame-visible-p", Fframe_visible_p, Sframe_visible_p, 1, 1, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - (frame) - Lisp_Object frame; -{ - return Qt; -} - -DEFUN ("frame-list", Fframe_list, Sframe_list, 0, 0, 0, - /* Don't confuse make-docfile by having two doc strings for this function. - make-docfile does not pay attention to #if, for good reason! */ - 0) - () -{ - return Fcons (Fselected_frame (), Qnil); -} - -syms_of_frame () -{ - syms_of_frame_1 (); - - DEFVAR_LISP ("terminal-frame", &Vterminal_frame, - /* Don't confuse make-docfile by having two doc strings for this variable. - make-docfile does not pay attention to #if, for good reason! */ - 0); - XSETFASTINT (Vterminal_frame, 0); - - defsubr (&Sselected_frame); - defsubr (&Sactive_minibuffer_window); - defsubr (&Swindow_frame); - defsubr (&Sframe_first_window); - defsubr (&Sframep); - defsubr (&Sframe_char_height); - defsubr (&Sframe_char_width); - defsubr (&Sframe_pixel_height); - defsubr (&Sframe_pixel_width); - defsubr (&Sset_frame_height); - defsubr (&Sset_frame_width); - defsubr (&Sset_frame_size); - defsubr (&Sset_screen_height); - defsubr (&Sset_screen_width); - defsubr (&Sframe_height); - Ffset (intern ("screen-height"), intern ("frame-height")); - defsubr (&Sframe_width); - Ffset (intern ("screen-width"), intern ("frame-width")); - defsubr (&Smouse_position); - Ffset (intern ("mouse-pixel-position"), intern ("mouse-position")); - defsubr (&Sframe_parameters); - defsubr (&Smodify_frame_parameters); - defsubr (&Sframe_live_p); - defsubr (&Sframe_visible_p); - defsubr (&Sframe_list); - -#ifdef MSDOS - /* A comment in dispnew.c says the_only_frame is not protected. */ - the_only_frame.face_alist = Qnil; - staticpro (&the_only_frame.face_alist); - the_only_frame.menu_bar_items = Qnil; - staticpro (&the_only_frame.menu_bar_items); - the_only_frame.menu_bar_vector = Qnil; - staticpro (&the_only_frame.menu_bar_vector); - the_only_frame.menu_bar_items = menu_bar_items (Qnil); -#endif -} - -keys_of_frame () -{ -} - -#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; extern int message_buf_print; -/* The structure representing a frame. - - We declare this even if MULTI_FRAME is not defined, because when - we lack multi-frame support, we use one instance of this structure - to represent the one frame we support. This is cleaner than - having miscellaneous random variables scattered about. */ +/* The structure representing a frame. */ enum output_method { output_termcap, output_x_window, output_msdos_raw, output_win32 }; @@ -294,14 +289,12 @@ struct frame char mouse_moved; }; -#ifdef MULTI_KBOARD /* Note that MULTI_KBOARD implies MULTI_FRAME */ +#ifdef MULTI_KBOARD #define FRAME_KBOARD(f) ((f)->kboard) #else #define FRAME_KBOARD(f) (&the_only_kboard) #endif -#ifdef MULTI_FRAME - typedef struct frame *FRAME_PTR; #define XFRAME(p) ((struct frame *) XPNTR (p)) @@ -422,8 +415,9 @@ typedef struct frame *FRAME_PTR; should be a Lisp_Object too; it is used to iterate through the Vframe_list. - If MULTI_FRAME isn't defined, then this loop expands to something which - executes the statement once. */ + This macro is a holdover from a time when multiple frames weren't always + supported. An alternate definition of the macro would expand to + something which executes the statement once. */ #define FOR_EACH_FRAME(list_var, frame_var) \ for ((list_var) = Vframe_list; \ (CONSP (list_var) \ @@ -446,105 +440,7 @@ extern Lisp_Object Vdefault_frame_alist; extern Lisp_Object Vterminal_frame; -#else /* not MULTI_FRAME */ - -/* These definitions are used in a single-frame version of Emacs. */ - -/* A frame we use to store all the data concerning the screen when we - don't have multiple frames. Remember, if you store any data in it - which needs to be protected from GC, you should staticpro that - element explicitly. */ -extern struct frame the_only_frame; - -typedef struct frame *FRAME_PTR; -#ifdef __GNUC__ -/* A function call for always getting 0 is overkill, so... */ -#define WINDOW_FRAME(w) ({ Lisp_Object tem; XSETFASTINT (tem, 0); tem; }) -#else -#define WINDOW_FRAME(w) (Fselected_frame ()) -#endif -#define XSETFRAME(p, v) (p = WINDOW_FRAME (***bogus***)) -#define XFRAME(frame) (&the_only_frame) - -extern FRAME_PTR selected_frame; -extern FRAME_PTR last_nonminibuf_frame; - -#define FRAME_LIVE_P(f) 1 -#define FRAME_MSDOS_P(f) 0 -#ifdef MSDOS -/* The following definitions could also be used in the non-MSDOS case, - but the constants below lead to better code. */ -#define FRAME_TERMCAP_P(f) (the_only_frame.output_method == output_termcap) -#define FRAME_X_P(f) (the_only_frame.output_method != output_termcap) -#else -#define FRAME_TERMCAP_P(f) 1 -#define FRAME_X_P(f) 0 -#endif -#define FRAME_WINDOW_P(f) FRAME_X_P (f) -#define FRAME_MINIBUF_ONLY_P(f) 0 -#define FRAME_HAS_MINIBUF_P(f) 1 -#define FRAME_CURRENT_GLYPHS(f) (the_only_frame.current_glyphs) -#define FRAME_DESIRED_GLYPHS(f) (the_only_frame.desired_glyphs) -#define FRAME_TEMP_GLYPHS(f) (the_only_frame.temp_glyphs) -#define FRAME_HEIGHT(f) (the_only_frame.height) -#define FRAME_WIDTH(f) (the_only_frame.width) -#define FRAME_NEW_HEIGHT(f) (the_only_frame.new_height) -#define FRAME_NEW_WIDTH(f) (the_only_frame.new_width) -#define FRAME_MENU_BAR_LINES(f) (the_only_frame.menu_bar_lines) -#define FRAME_CURSOR_X(f) (the_only_frame.cursor_x) -#define FRAME_CURSOR_Y(f) (the_only_frame.cursor_y) -#define FRAME_SET_VISIBLE(f,p) (p) -#define FRAME_VISIBLE_P(f) 1 -#define SET_FRAME_GARBAGED(f) (frame_garbaged = 1) -#define FRAME_GARBAGED_P(f) (frame_garbaged) -#define FRAME_NO_SPLIT_P(f) 0 -#define FRAME_WANTS_MODELINE_P(f) 1 -#define FRAME_ICONIFIED_P(f) 0 -#define FRAME_WINDOW_SIZES_CHANGED(f) the_only_frame.window_sizes_changed -#define FRAME_MINIBUF_WINDOW(f) (minibuf_window) -#define FRAME_ROOT_WINDOW(f) (the_only_frame.root_window) -#define FRAME_SELECTED_WINDOW(f) (selected_window) -#define SET_GLYPHS_FRAME(glyphs,frame) do ; while (0) -#define FRAME_INSERT_COST(frame) (the_only_frame.insert_line_cost) -#define FRAME_DELETE_COST(frame) (the_only_frame.delete_line_cost) -#define FRAME_INSERTN_COST(frame) (the_only_frame.insert_n_lines_cost) -#define FRAME_DELETEN_COST(frame) (the_only_frame.delete_n_lines_cost) -#define FRAME_MESSAGE_BUF(f) (the_only_frame.message_buf) -#define FRAME_SCROLL_BOTTOM_VPOS(f) (the_only_frame.scroll_bottom_vpos) -#define FRAME_FOCUS_FRAME(f) (Qnil) -#define FRAME_CAN_HAVE_SCROLL_BARS(f) (the_only_frame.can_have_scroll_bars) -#define FRAME_HAS_VERTICAL_SCROLL_BARS(f) \ - (the_only_frame.has_vertical_scroll_bars) -#define FRAME_SCROLL_BAR_PIXEL_WIDTH(f) (the_only_frame.scroll_bar_pixel_width) -#define FRAME_SCROLL_BAR_COLS(f) (the_only_frame.scroll_bar_cols) -#define FRAME_SCROLL_BARS(f) (the_only_frame.scroll_bars) -#define FRAME_CONDEMNED_SCROLL_BARS(f) (the_only_frame.condemned_scroll_bars) -#define FRAME_MENU_BAR_ITEMS(f) (the_only_frame.menu_bar_items) -#define FRAME_COST_BAUD_RATE(f) (the_only_frame.cost_calculation_baud_rate) - -/* See comments in definition above. */ -#define FRAME_SAMPLE_VISIBILITY(f) (0) - -#define CHECK_FRAME(x, i) do; while (0) -#define CHECK_LIVE_FRAME(x, y) do; while (0) - -/* FOR_EACH_FRAME (LIST_VAR, FRAME_VAR) followed by a statement is a - `for' loop which iterates over the elements of Vframe_list. The - loop will set FRAME_VAR, a Lisp_Object, to each frame in - Vframe_list in succession and execute the statement. LIST_VAR - should be a Lisp_Object too; it is used to iterate through the - Vframe_list. - - If MULTI_FRAME _is_ defined, then this loop expands to a real - `for' loop which traverses Vframe_list using LIST_VAR and - FRAME_VAR. */ -#define FOR_EACH_FRAME(list_var, frame_var) \ - for (list_var = Qt; frame_var = WINDOW_FRAME (***bogus***), ! NILP (list_var); list_var = Qnil) - -#endif /* not MULTI_FRAME */ - - -/* Device- and MULTI_FRAME-independent scroll bar stuff. */ +/* Device-independent scroll bar stuff. */ /* Return the starting column (zero-based) of the vertical scroll bar 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; /* The buffer that was current when the last command was started. */ Lisp_Object last_point_position_buffer; -#ifdef MULTI_FRAME /* The frame in which the last input event occurred, or Qmacro if the last event came from a macro. We use this to determine when to generate switch-frame events. This may be cleared by functions like Fselect_frame, to make sure that a switch-frame event is generated by the next character. */ Lisp_Object internal_last_event_frame; -#endif /* A user-visible version of the above, intended to allow users to figure out where the last event came from, if the event doesn't @@ -1154,7 +1152,6 @@ command_loop_1 () #endif /* C_ALLOCA */ #if 0 -#ifdef MULTI_FRAME /* Select the frame that the last event came from. Usually, switch-frame events will take care of this, but if some lisp code swallows a switch-frame event, we'll fix things up here. @@ -1162,7 +1159,6 @@ command_loop_1 () if (FRAMEP (internal_last_event_frame) && XFRAME (internal_last_event_frame) != selected_frame) Fselect_frame (internal_last_event_frame, Qnil); -#endif #endif /* If it has changed current-menubar from previous value, really recompute the menubar from the value. */ @@ -1723,7 +1719,6 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) if (!NILP (Vexecuting_macro)) { -#ifdef MULTI_FRAME /* We set this to Qmacro; since that's not a frame, nobody will try to switch frames on us, and the selected window will remain unchanged. @@ -1735,7 +1730,6 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) events read from a macro should never cause a new frame to be selected. */ Vlast_event_frame = internal_last_event_frame = Qmacro; -#endif /* Exit the macro if we are at the end. Also, some things replace the macro with t @@ -1810,10 +1804,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) if (_setjmp (local_getcjmp)) { XSETINT (c, quit_char); -#ifdef MULTI_FRAME XSETFRAME (internal_last_event_frame, selected_frame); Vlast_event_frame = internal_last_event_frame; -#endif /* If we report the quit char as an event, don't do so more than once. */ if (!NILP (Vinhibit_quit)) @@ -1960,12 +1952,10 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) if (NILP (current_kboard->kbd_queue)) current_kboard->kbd_queue_has_data = 0; input_pending = readable_events (0); -#ifdef MULTI_FRAME if (EVENT_HAS_PARAMETERS (c) && EQ (EVENT_HEAD_KIND (EVENT_HEAD (c)), Qswitch_frame)) internal_last_event_frame = XCONS (XCONS (c)->cdr)->car; Vlast_event_frame = internal_last_event_frame; -#endif } } @@ -2475,7 +2465,6 @@ kbd_buffer_store_event (event) } #endif -#ifdef MULTI_FRAME /* If this results in a quit_char being returned to Emacs as input, set Vlast_event_frame properly. If this doesn't get returned to Emacs as an event, the next event read @@ -2489,7 +2478,6 @@ kbd_buffer_store_event (event) internal_last_event_frame = focus; Vlast_event_frame = focus; } -#endif last_event_timestamp = event->timestamp; interrupt_signal (); @@ -2724,7 +2712,6 @@ kbd_buffer_get_event (kbp, used_mouse_menu) time, and leave the event in the queue for next time. */ else { -#ifdef MULTI_FRAME Lisp_Object frame; Lisp_Object focus; @@ -2742,7 +2729,6 @@ kbd_buffer_get_event (kbp, used_mouse_menu) && XFRAME (frame) != selected_frame) obj = make_lispy_switch_frame (frame); internal_last_event_frame = frame; -#endif /* MULTI_FRAME */ /* If we didn't decide to make a switch-frame event, go ahead and build a real event from the queue entry. */ @@ -2789,7 +2775,6 @@ kbd_buffer_get_event (kbp, used_mouse_menu) obj = Qnil; -#ifdef MULTI_FRAME /* Decide if we should generate a switch-frame event. Don't generate switch-frame events for motion outside of all Emacs frames. */ @@ -2806,7 +2791,6 @@ kbd_buffer_get_event (kbp, used_mouse_menu) obj = make_lispy_switch_frame (frame); internal_last_event_frame = frame; } -#endif /* If we didn't decide to make a switch-frame event, go ahead and return a mouse-motion event. */ @@ -2821,9 +2805,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu) input_pending = readable_events (0); -#ifdef MULTI_FRAME Vlast_event_frame = internal_last_event_frame; -#endif return (obj); } @@ -3998,7 +3980,6 @@ make_lispy_movement (frame, bar_window, part, x, y, time) Lisp_Object x, y; unsigned long time; { -#ifdef MULTI_FRAME /* Is it a scroll bar movement? */ if (frame && ! NILP (bar_window)) { @@ -4017,18 +3998,13 @@ make_lispy_movement (frame, bar_window, part, x, y, time) /* Or is it an ordinary mouse movement? */ else -#endif /* MULTI_FRAME */ { int area; Lisp_Object window; Lisp_Object posn; int column, row; -#ifdef MULTI_FRAME if (frame) -#else - if (1) -#endif { /* It's in a frame; which window on that frame? */ 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) XSETINT (posn, buffer_posn_from_coords (XWINDOW (window), column, row)); } -#ifdef MULTI_FRAME else if (frame != 0) { XSETFRAME (window, frame); posn = Qnil; } -#endif else { window = Qnil; @@ -4901,11 +4875,7 @@ read_avail_input (expected) cbuf[i] &= ~0x80; buf[i].code = cbuf[i]; -#ifdef MULTI_FRAME XSETFRAME (buf[i].frame_or_window, selected_frame); -#else - buf[i].frame_or_window = Qnil; -#endif } } @@ -7526,12 +7496,10 @@ quit_throw_to_read_char () abort (); #endif #endif -#ifdef MULTI_FRAME if (FRAMEP (internal_last_event_frame) && XFRAME (internal_last_event_frame) != selected_frame) do_switch_frame (make_lispy_switch_frame (internal_last_event_frame), Qnil, 0); -#endif _longjmp (getcjmp, 1); } @@ -7708,12 +7676,10 @@ init_keyboard () #endif input_pending = 0; -#ifdef MULTI_FRAME /* This means that command_loop_1 won't try to select anything the first time through. */ internal_last_event_frame = Qnil; Vlast_event_frame = internal_last_event_frame; -#endif #ifdef MULTI_KBOARD 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; extern Lisp_Object this_command_keys; extern int this_command_key_count; -#ifdef MULTI_FRAME /* The frame in which the last input event occurred, or Qmacro if the last event came from a macro. We use this to determine when to generate switch-frame events. This may be cleared by functions like Fselect_frame, to make sure that a switch-frame event is generated by the next character. */ extern Lisp_Object internal_last_event_frame; -#endif - /* Macros for dealing with lispy events. */ 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; #define GC_CHAR_TABLE_P(x) GC_PSEUDOVECTORP (x, PVEC_CHAR_TABLE) #define BOOL_VECTOR_P(x) PSEUDOVECTORP (x, PVEC_BOOL_VECTOR) #define GC_BOOL_VECTOR_P(x) GC_PSEUDOVECTORP (x, PVEC_BOOL_VECTOR) - -#ifdef MULTI_FRAME #define FRAMEP(x) PSEUDOVECTORP (x, PVEC_FRAME) #define GC_FRAMEP(x) GC_PSEUDOVECTORP (x, PVEC_FRAME) -#else -#ifdef HAVE_MOUSE -/* We could use this in the !HAVE_MOUSE case also, but we prefer a compile-time - error message in case FRAMEP is used. */ -#define FRAMEP(x) (EQ (x, Fselected_frame ())) -#define GC_FRAMEP(x) (GC_EQ (x, Fselected_frame ())) -#endif -#endif - #define EQ(x, y) (XFASTINT (x) == XFASTINT (y)) #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) /* If the minibuffer window is on a different frame, save that frame's configuration too. */ -#ifdef MULTI_FRAME mini_frame = WINDOW_FRAME (XWINDOW (minibuf_window)); if (XFRAME (mini_frame) != selected_frame) record_unwind_protect (Fset_window_configuration, @@ -216,7 +215,6 @@ read_minibuf (map, initial, prompt, backup_n, expflag, histvar, histpos) if (minibuffer_auto_raise) Fraise_frame (mini_frame); -#endif /* We have to do this after saving the window configuration since that is what restores the current buffer. */ @@ -280,10 +278,8 @@ read_minibuf (map, initial, prompt, backup_n, expflag, histvar, histpos) } } -#ifdef MULTI_FRAME if (XFRAME (mini_frame) != selected_frame) Fredirect_frame_focus (Fselected_frame (), mini_frame); -#endif Vminibuf_scroll_window = selected_window; 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) { strout ("#", -1, printcharfun); } -#ifdef MULTI_FRAME else if (FRAMEP (obj)) { strout ((FRAME_LIVE_P (XFRAME (obj)) @@ -1161,7 +1160,6 @@ print (obj, printcharfun, escapeflag) strout (buf, -1, printcharfun); PRINTCHAR ('>'); } -#endif #endif /* not standalone */ else { 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. */ #endif #ifndef BASE_PURESIZE -#ifdef MULTI_FRAME #define BASE_PURESIZE (325000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) -#else -#define BASE_PURESIZE (240000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) -#endif #endif /* 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 () else { frame_garbaged = 1; -#ifdef MULTI_FRAME if (FRAMEP (Vterminal_frame)) FRAME_GARBAGED_P (XFRAME (Vterminal_frame)) = 1; -#endif } 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) new_computed_face (f, FRAME_PARAM_FACES (f)[1]); recompute_basic_faces (f); -#ifdef MULTI_FRAME /* Find another frame. */ { Lisp_Object tail, frame, result; @@ -402,7 +401,6 @@ init_frame_faces (f) ensure_face_ready (f, i); } } -#endif /* MULTI_FRAME */ } 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.") (frame) Lisp_Object frame; { -#ifdef MULTI_FRAME if (NILP (frame)) XSETFRAME (frame, selected_frame); else CHECK_LIVE_FRAME (frame, 0); -#endif return FRAME_MINIBUF_WINDOW (XFRAME (frame)); } @@ -487,12 +485,10 @@ column 0.") { int part; -#ifdef MULTI_FRAME if (NILP (frame)) XSETFRAME (frame, selected_frame); else CHECK_LIVE_FRAME (frame, 2); -#endif CHECK_NUMBER (x, 0); CHECK_NUMBER (y, 1); @@ -955,7 +951,6 @@ DEFUN ("next-window", Fnext_window, Snext_window, 0, 3, 0, lambda => count none of them, or a specific minibuffer window (the active one) to count. */ -#ifdef MULTI_FRAME /* all_frames == nil doesn't specify which frames to include. */ if (NILP (all_frames)) all_frames = (! EQ (minibuf, Qlambda) @@ -979,7 +974,6 @@ DEFUN ("next-window", Fnext_window, Snext_window, 0, 3, 0, visible meaning search just visible frames, 0 meaning search visible and iconified frames, or a window, meaning search the frame that window belongs to. */ -#endif /* Do this loop at least once, to get the next window, and perhaps 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, /* We've reached the end of this frame. Which other frames are acceptable? */ tem = WINDOW_FRAME (XWINDOW (window)); -#ifdef MULTI_FRAME if (! NILP (all_frames)) { Lisp_Object tem1; @@ -1010,7 +1003,6 @@ DEFUN ("next-window", Fnext_window, Snext_window, 0, 3, 0, if (EQ (tem, tem1)) XSETFRAME (tem, selected_frame); } -#endif tem = FRAME_ROOT_WINDOW (XFRAME (tem)); break; @@ -1101,7 +1093,6 @@ DEFUN ("previous-window", Fprevious_window, Sprevious_window, 0, 3, 0, lambda => count none of them, or a specific minibuffer window (the active one) to count. */ -#ifdef MULTI_FRAME /* all_frames == nil doesn't specify which frames to include. Decide which frames it includes. */ if (NILP (all_frames)) @@ -1126,7 +1117,6 @@ DEFUN ("previous-window", Fprevious_window, Sprevious_window, 0, 3, 0, visible meaning search just visible frames, 0 meaning search visible and iconified frames, or a window, meaning search the frame that window belongs to. */ -#endif /* Do this loop at least once, to get the previous window, and perhaps 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, /* We have found the top window on the frame. Which frames are acceptable? */ tem = WINDOW_FRAME (XWINDOW (window)); -#ifdef MULTI_FRAME if (! NILP (all_frames)) /* It's actually important that we use prev_frame here, rather than next_frame. All the windows acceptable @@ -1166,7 +1155,6 @@ DEFUN ("previous-window", Fprevious_window, Sprevious_window, 0, 3, 0, if (EQ (tem, tem1)) XSETFRAME (tem, selected_frame); } -#endif /* If this frame has a minibuffer, find that window first, because it is conceptually the last window in that frame. */ if (FRAME_HAS_MINIBUF_P (XFRAME (tem))) @@ -1269,7 +1257,6 @@ window_loop (type, obj, mini, frames) Lisp_Object frame_arg; frame_arg = Qt; -#ifdef MULTI_FRAME /* If we're only looping through windows on a particular frame, frame points to that frame. If we're looping through windows on all frames, frame is 0. */ @@ -1285,9 +1272,6 @@ window_loop (type, obj, mini, frames) frame_arg = frames; else if (EQ (frames, Qvisible)) frame_arg = frames; -#else - frame = 0; -#endif /* frame_arg is Qlambda to stick to one frame, Qvisible to consider all visible frames, @@ -1354,7 +1338,6 @@ window_loop (type, obj, mini, frames) case DELETE_BUFFER_WINDOWS: if (EQ (XWINDOW (w)->buffer, obj)) { -#ifdef MULTI_FRAME FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (w))); /* If this window is dedicated, and in a frame of its own, @@ -1383,7 +1366,6 @@ window_loop (type, obj, mini, frames) Fdelete_frame (WINDOW_FRAME (XWINDOW (w)), Qnil); } else -#endif /* If we're deleting the buffer displayed in the only window on the frame, find a new buffer to display there. */ if (NILP (XWINDOW (w)->parent)) @@ -1428,7 +1410,6 @@ window_loop (type, obj, mini, frames) if (NILP (another_buffer)) another_buffer = Fget_buffer_create (build_string ("*scratch*")); -#ifdef MULTI_FRAME /* If this window is dedicated, and in a frame of its own, kill the frame. */ if (EQ (w, FRAME_ROOT_WINDOW (f)) @@ -1455,7 +1436,6 @@ window_loop (type, obj, mini, frames) Fdelete_frame (WINDOW_FRAME (XWINDOW (w)), Qnil); } else -#endif { /* Otherwise show a different buffer in the window. */ XWINDOW (w)->dedicated = Qnil; @@ -1597,14 +1577,10 @@ If a frame, delete only windows showing BUFFER in that frame.") (buffer, frame) Lisp_Object buffer, frame; { -#ifdef MULTI_FRAME /* FRAME uses t and nil to mean the opposite of what window_loop expects. */ if (! FRAMEP (frame)) frame = NILP (frame) ? Qt : Qnil; -#else - frame = Qt; -#endif if (!NILP (buffer)) { @@ -1927,7 +1903,6 @@ before each command.") ow->buffer); selected_window = window; -#ifdef MULTI_FRAME if (XFRAME (WINDOW_FRAME (w)) != selected_frame) { XFRAME (WINDOW_FRAME (w))->selected_window = window; @@ -1939,7 +1914,6 @@ before each command.") } else selected_frame->selected_window = window; -#endif record_buffer (w->buffer); Fset_buffer (w->buffer); @@ -1977,7 +1951,6 @@ static Lisp_Object display_buffer_1 (window) Lisp_Object window; { -#ifdef MULTI_FRAME FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (window))); FRAME_SAMPLE_VISIBILITY (f); if (f != selected_frame) @@ -1987,7 +1960,6 @@ display_buffer_1 (window) else if (FRAME_VISIBLE_P (f)) Fraise_frame (WINDOW_FRAME (XWINDOW (window))); } -#endif return window; } @@ -2057,14 +2029,12 @@ buffer names are handled.") } } -#ifdef MULTI_FRAME /* If pop_up_frames, look for a window showing BUFFER on any visible or iconified frame. Otherwise search only the current frame. */ if (pop_up_frames || last_nonminibuf_frame == 0) XSETFASTINT (tem, 0); else -#endif XSETFRAME (tem, last_nonminibuf_frame); window = Fget_buffer_window (buffer, tem); if (!NILP (window) @@ -2100,7 +2070,6 @@ buffer names are handled.") } } -#ifdef MULTI_FRAME /* If there are no frames open that have more than a minibuffer, we need to create a new frame. */ if (pop_up_frames || last_nonminibuf_frame == 0) @@ -2109,24 +2078,19 @@ buffer names are handled.") Fset_window_buffer (window, buffer); return display_buffer_1 (window); } -#endif /* MULTI_FRAME */ if (pop_up_windows -#ifdef MULTI_FRAME || FRAME_MINIBUF_ONLY_P (selected_frame) /* If the current frame is a special display frame, don't try to reuse its windows. */ || !NILP (XWINDOW (FRAME_ROOT_WINDOW (selected_frame))->dedicated) -#endif ) { Lisp_Object frames; frames = Qnil; -#ifdef MULTI_FRAME if (FRAME_MINIBUF_ONLY_P (selected_frame)) XSETFRAME (frames, last_nonminibuf_frame); -#endif /* Don't try to create a window if would get an error */ if (split_height_threshold < window_min_height << 1) split_height_threshold = window_min_height << 1; @@ -2135,7 +2099,6 @@ buffer names are handled.") ignore minibuffers and dedicated windows. This means they can return nil. */ -#ifdef MULTI_FRAME /* If the frame we would try to split cannot be split, try other frames. */ if (FRAME_NO_SPLIT_P (NILP (frames) ? selected_frame @@ -2150,7 +2113,6 @@ buffer names are handled.") window = Fget_largest_window (Qt); } else -#endif window = Fget_largest_window (frames); /* If we got a tall enough full-width window that can be split, @@ -2174,7 +2136,6 @@ buffer names are handled.") || EQ (XWINDOW (window)->parent, Qnil)) && window_height (window) >= window_min_height << 1) window = Fsplit_window (window, Qnil, Qnil); -#ifdef MULTI_FRAME /* If Fget_lru_window returned nil, try other approaches. */ /* Try visible frames first. */ if (NILP (window)) @@ -2188,11 +2149,6 @@ buffer names are handled.") /* As a last resort, make a new frame. */ if (NILP (window)) window = Fframe_selected_window (call0 (Vpop_up_frame_function)); -#else - /* As a last resort, use a non minibuffer window. */ - if (NILP (window)) - window = Fframe_first_window (Fselected_frame ()); -#endif /* If window appears above or below another, even out their heights. */ other = upper = lower = Qnil; @@ -2244,10 +2200,8 @@ temp_output_buffer_show (buf) { window = Fdisplay_buffer (buf, Qnil); -#ifdef MULTI_FRAME if (XFRAME (XWINDOW (window)->frame) != selected_frame) Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window))); -#endif /* MULTI_FRAME */ Vminibuf_scroll_window = window; w = XWINDOW (window); XSETFASTINT (w->hscroll, 0); @@ -3081,7 +3035,7 @@ by `current-window-configuration' (which see).") if (XFASTINT (data->frame_height) != previous_frame_height || XFASTINT (data->frame_width) != previous_frame_width) change_frame_size (f, data->frame_height, data->frame_width, 0, 0); -#if defined (HAVE_WINDOW_SYSTEM) || (defined (MSDOS) && defined (MULTI_FRAME)) +#if defined (HAVE_WINDOW_SYSTEM) || defined (MSDOS) if (XFASTINT (data->frame_menu_bar_lines) != previous_frame_menu_bar_lines) x_set_menu_bar_lines (f, data->frame_menu_bar_lines, 0); @@ -3209,20 +3163,16 @@ by `current-window-configuration' (which see).") FRAME_ROOT_WINDOW (f) = data->root_window; Fselect_window (data->current_window); -#ifdef MULTI_FRAME if (NILP (data->focus_frame) || (FRAMEP (data->focus_frame) && FRAME_LIVE_P (XFRAME (data->focus_frame)))) Fredirect_frame_focus (frame, data->focus_frame); -#endif #if 0 /* I don't understand why this is needed, and it causes problems when the frame's old selected window has been deleted. */ -#ifdef MULTI_FRAME if (f != selected_frame && FRAME_WINDOW_P (f)) do_switch_frame (WINDOW_FRAME (XWINDOW (data->root_window)), Qnil, 0); -#endif #endif /* Set the screen height to the value it had before this function. */ @@ -3230,7 +3180,7 @@ by `current-window-configuration' (which see).") || previous_frame_width != FRAME_WIDTH (f)) change_frame_size (f, previous_frame_height, previous_frame_width, 0, 0); -#if defined (HAVE_WINDOW_SYSTEM) || (defined (MSDOS) && defined (MULTI_FRAME)) +#if defined (HAVE_WINDOW_SYSTEM) || defined (MSDOS) if (previous_frame_menu_bar_lines != FRAME_MENU_BAR_LINES (f)) x_set_menu_bar_lines (f, previous_frame_menu_bar_lines, 0); #endif @@ -3240,7 +3190,6 @@ by `current-window-configuration' (which see).") window_min_height = XINT (data->min_height); window_min_width = XINT (data->min_width); -#ifdef MULTI_FRAME /* Fselect_window will have made f the selected frame, so we reselect the proper frame here. Fhandle_switch_frame will change the selected window too, but that doesn't make the call to @@ -3248,7 +3197,6 @@ by `current-window-configuration' (which see).") selected window. */ if (FRAME_LIVE_P (XFRAME (data->selected_frame))) do_switch_frame (data->selected_frame, Qnil, 0); -#endif if (!NILP (new_current_buffer)) Fset_buffer (new_current_buffer); @@ -3405,9 +3353,7 @@ redirection (see `redirect-frame-focus').") XSETFASTINT (data->frame_width, FRAME_WIDTH (f)); XSETFASTINT (data->frame_height, FRAME_HEIGHT (f)); XSETFASTINT (data->frame_menu_bar_lines, FRAME_MENU_BAR_LINES (f)); -#ifdef MULTI_FRAME XSETFRAME (data->selected_frame, selected_frame); -#endif data->current_window = FRAME_SELECTED_WINDOW (f); XSETBUFFER (data->current_buffer, current_buffer); data->minibuf_scroll_window = Vminibuf_scroll_window; @@ -3448,51 +3394,11 @@ Does not restore the value of point in current buffer.") init_window_once () { -#ifdef MULTI_FRAME selected_frame = make_terminal_frame (); XSETFRAME (Vterminal_frame, selected_frame); minibuf_window = selected_frame->minibuffer_window; selected_window = selected_frame->selected_window; last_nonminibuf_frame = selected_frame; -#else /* not MULTI_FRAME */ - extern Lisp_Object get_minibuffer (); - - selected_frame = last_nonminibuf_frame = &the_only_frame; - - minibuf_window = make_window (); - FRAME_ROOT_WINDOW (selected_frame) = make_window (); - - XWINDOW (FRAME_ROOT_WINDOW (selected_frame))->next = minibuf_window; - XWINDOW (minibuf_window)->prev = FRAME_ROOT_WINDOW (selected_frame); - XWINDOW (minibuf_window)->mini_p = Qt; - - /* These values 9 and 10 are arbitrary, - just so that there is "something there." - Correct values are put in in init_xdisp */ - - XSETFASTINT (XWINDOW (FRAME_ROOT_WINDOW (selected_frame))->width, 10); - XSETFASTINT (XWINDOW (minibuf_window)->width, 10); - - XSETFASTINT (XWINDOW (FRAME_ROOT_WINDOW (selected_frame))->height, 9); - XSETFASTINT (XWINDOW (minibuf_window)->top, 9); - XSETFASTINT (XWINDOW (minibuf_window)->height, 1); - - /* Prevent error in Fset_window_buffer. */ - XWINDOW (FRAME_ROOT_WINDOW (selected_frame))->buffer = Qt; - XWINDOW (minibuf_window)->buffer = Qt; - - /* Now set them up for real. */ - Fset_window_buffer (FRAME_ROOT_WINDOW (selected_frame), - Fcurrent_buffer ()); - Fset_window_buffer (minibuf_window, get_minibuffer (0)); - - selected_window = FRAME_ROOT_WINDOW (selected_frame); - /* Make sure this window seems more recently used than - a newly-created, never-selected window. Increment - window_select_count so the first selection ever will get - something newer than this. */ - XSETFASTINT (XWINDOW (selected_window)->use_time, ++window_select_count); -#endif /* not MULTI_FRAME */ window_initialized = 1; } @@ -3508,11 +3414,6 @@ syms_of_window () Qtemp_buffer_show_hook = intern ("temp-buffer-show-hook"); staticpro (&Qtemp_buffer_show_hook); -#ifndef MULTI_FRAME - /* Make sure all windows get marked */ - staticpro (&minibuf_window); -#endif - DEFVAR_LISP ("temp-buffer-show-function", &Vtemp_buffer_show_function, "Non-nil means call as function to display a help buffer.\n\ 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) mini_window = FRAME_MINIBUF_WINDOW (selected_frame); f = XFRAME (WINDOW_FRAME (XWINDOW (mini_window))); -#ifdef MULTI_FRAME FRAME_SAMPLE_VISIBILITY (f); if (FRAME_VISIBLE_P (selected_frame) && ! FRAME_VISIBLE_P (f)) Fmake_frame_visible (WINDOW_FRAME (XWINDOW (mini_window))); -#endif if (m) { @@ -844,7 +842,6 @@ redisplay_internal (preserve_echo_area) return; #endif -#ifdef MULTI_FRAME if (! FRAME_WINDOW_P (selected_frame) && previous_terminal_frame != selected_frame) { @@ -855,7 +852,6 @@ redisplay_internal (preserve_echo_area) XSETFRAME (Vterminal_frame, selected_frame); } previous_terminal_frame = selected_frame; -#endif /* Set the visible flags for all frames. Do this before checking for resized or garbaged frames; they want @@ -1112,7 +1108,6 @@ update: unrequest_sigio (); stop_polling (); -#ifdef MULTI_FRAME if (all_windows) { Lisp_Object tail; @@ -1142,7 +1137,6 @@ update: } } else -#endif /* MULTI_FRAME */ { if (FRAME_VISIBLE_P (selected_frame)) pause = update_frame (selected_frame, 0, 0); @@ -3742,12 +3736,10 @@ decode_mode_spec (w, c, spec_width, maxwidth) case 'F': /* %F displays the frame name. */ -#ifdef MULTI_FRAME if (!NILP (f->title)) return (char *) XSTRING (f->title)->data; if (f->explicit_name || ! FRAME_WINDOW_P (f)) return (char *) XSTRING (f->name)->data; -#endif return "Emacs"; 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) new_computed_face (f, FRAME_PARAM_FACES (f)[1]); recompute_basic_faces (f); -#ifdef MULTI_FRAME /* Find another X frame. */ { Lisp_Object tail, frame, result; @@ -589,7 +588,6 @@ init_frame_faces (f) ensure_face_ready (f, i); } } -#endif /* MULTI_FRAME */ } -- 2.39.2