aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBasil L. Contovounesios2026-03-18 12:16:37 +0100
committerBasil L. Contovounesios2026-03-26 15:19:56 +0100
commitcc4c8e6e9f41bc07cb3047e4ecc52ccfeaac0c75 (patch)
tree7cfa159df02a4b93db5b6a3da027df1ca8eee89e
parentb5f6bc0072e59ab9ba39ed2bdd83a324b7c6ad4a (diff)
downloademacs-cc4c8e6e9f41bc07cb3047e4ecc52ccfeaac0c75.tar.gz
emacs-cc4c8e6e9f41bc07cb3047e4ecc52ccfeaac0c75.zip
Simplify some struct frame.output_method checks
* src/lisp.h (inhibit_window_system): Fix typo in commentary. * src/dispnew.c (Fopen_termscript): (init_display_interactive) [!HAVE_ANDROID, !MSDOS]: * src/dosfns.c [MSDOS] (dos_cleanup): * src/frame.c (frame_inhibit_resize, frame_windows_min_size) (do_switch_frame, delete_frame): (make_terminal_frame) [MSDOS]: (Fmake_terminal_frame) [MSDOS, WINDOWSNT]: * src/keyboard.c (read_decoded_event_from_main_queue) [!WINDOWSNT]: (Fcurrent_input_mode): * src/menu.c (single_menu_item): * src/msdos.c [MSDOS] (internal_terminal_init): * src/sysdep.c (init_sys_modes): * src/term.c: [HAVE_GPM] (Fgpm_mouse_start, Fgpm_mouse_stop): [MSDOS] (tty_free_frame_resources): * src/w32xfns.c (get_frame_dc): * src/xdisp.c (clear_garbaged_frames, hscroll_window_tree) (redisplay_internal): * src/xfaces.c (Fdisplay_supports_face_attributes_p) (realize_default_face, realize_face, realize_tty_face): Use is_tty_frame, FRAME_INITIAL_P, FRAME_MSDOS_P, FRAME_TERMCAP_P, FRAME_W32_P, and FRAME_TTY as appropriate instead of open-coding them (bug#80629).
-rw-r--r--src/dispnew.c7
-rw-r--r--src/dosfns.c3
-rw-r--r--src/frame.c15
-rw-r--r--src/keyboard.c4
-rw-r--r--src/lisp.h2
-rw-r--r--src/menu.c3
-rw-r--r--src/msdos.c2
-rw-r--r--src/sysdep.c3
-rw-r--r--src/term.c10
-rw-r--r--src/w32xfns.c2
-rw-r--r--src/xdisp.c14
-rw-r--r--src/xfaces.c10
12 files changed, 31 insertions, 44 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 908345645bc..736647408cb 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -6776,8 +6776,7 @@ FILE = nil means just close any termscript file currently open. */)
6776{ 6776{
6777 struct tty_display_info *tty; 6777 struct tty_display_info *tty;
6778 6778
6779 if (! FRAME_TERMCAP_P (SELECTED_FRAME ()) 6779 if (!is_tty_frame (SELECTED_FRAME ()))
6780 && ! FRAME_MSDOS_P (SELECTED_FRAME ()))
6781 error ("Current frame is not on a tty device"); 6780 error ("Current frame is not on a tty device");
6782 6781
6783 tty = CURTTY (); 6782 tty = CURTTY ();
@@ -7344,7 +7343,7 @@ init_display_interactive (void)
7344 t = init_tty (0, terminal_type, 1); /* Errors are fatal. */ 7343 t = init_tty (0, terminal_type, 1); /* Errors are fatal. */
7345 7344
7346 /* Convert the initial frame to use the new display. */ 7345 /* Convert the initial frame to use the new display. */
7347 if (f->output_method != output_initial) 7346 if (!FRAME_INITIAL_P (f))
7348 emacs_abort (); 7347 emacs_abort ();
7349 f->output_method = t->type; 7348 f->output_method = t->type;
7350 f->terminal = t; 7349 f->terminal = t;
@@ -7354,7 +7353,7 @@ init_display_interactive (void)
7354 f->output_data.tty = &the_only_tty_output; 7353 f->output_data.tty = &the_only_tty_output;
7355 f->output_data.tty->display_info = &the_only_display_info; 7354 f->output_data.tty->display_info = &the_only_display_info;
7356#else 7355#else
7357 if (f->output_method == output_termcap) 7356 if (FRAME_TERMCAP_P (f))
7358 create_tty_output (f); 7357 create_tty_output (f);
7359#endif 7358#endif
7360 t->display_info.tty->top_frame = selected_frame; 7359 t->display_info.tty->top_frame = selected_frame;
diff --git a/src/dosfns.c b/src/dosfns.c
index 414cc550510..07d553b0d78 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -681,8 +681,7 @@ dos_cleanup (void)
681 { 681 {
682 struct frame *sf = XFRAME (selected_frame); 682 struct frame *sf = XFRAME (selected_frame);
683 683
684 if (FRAME_LIVE_P (sf) 684 if (FRAME_LIVE_P (sf) && is_tty_frame (sf))
685 && (FRAME_MSDOS_P (sf) || FRAME_TERMCAP_P (sf)))
686 { 685 {
687 tty = CURTTY (); 686 tty = CURTTY ();
688 if (tty->termscript) 687 if (tty->termscript)
diff --git a/src/frame.c b/src/frame.c
index 89ea58b3fe2..2e98937fab3 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -213,7 +213,7 @@ frame_inhibit_resize (struct frame *f, bool horizontal, Lisp_Object parameter)
213 && !NILP (fullscreen) && !EQ (fullscreen, Qfullheight)) 213 && !NILP (fullscreen) && !EQ (fullscreen, Qfullheight))
214 || (!horizontal 214 || (!horizontal
215 && !NILP (fullscreen) && !EQ (fullscreen, Qfullwidth)) 215 && !NILP (fullscreen) && !EQ (fullscreen, Qfullwidth))
216 || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)))); 216 || is_tty_frame (f))));
217} 217}
218 218
219 219
@@ -561,7 +561,7 @@ frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal,
561 561
562 /* Don't allow too small height of text-mode frames, or else cm.c 562 /* Don't allow too small height of text-mode frames, or else cm.c
563 might abort in cmcheckmagic. */ 563 might abort in cmcheckmagic. */
564 if ((FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) && NILP (horizontal)) 564 if (is_tty_frame (f) && NILP (horizontal))
565 { 565 {
566 int min_height = (FRAME_MENU_BAR_LINES (f) + FRAME_TAB_BAR_LINES (f) 566 int min_height = (FRAME_MENU_BAR_LINES (f) + FRAME_TAB_BAR_LINES (f)
567 + FRAME_WANTS_MODELINE_P (f) 567 + FRAME_WANTS_MODELINE_P (f)
@@ -1572,7 +1572,7 @@ make_terminal_frame (struct terminal *terminal, Lisp_Object parent,
1572 f->output_data.tty->display_info = &the_only_display_info; 1572 f->output_data.tty->display_info = &the_only_display_info;
1573 if (!inhibit_window_system 1573 if (!inhibit_window_system
1574 && (!FRAMEP (selected_frame) || !FRAME_LIVE_P (XFRAME (selected_frame)) 1574 && (!FRAMEP (selected_frame) || !FRAME_LIVE_P (XFRAME (selected_frame))
1575 || XFRAME (selected_frame)->output_method == output_msdos_raw)) 1575 || FRAME_MSDOS_P (XFRAME (selected_frame))))
1576 f->output_method = output_msdos_raw; 1576 f->output_method = output_msdos_raw;
1577 else 1577 else
1578 f->output_method = output_termcap; 1578 f->output_method = output_termcap;
@@ -1762,13 +1762,12 @@ affects all frames on the same terminal device. */)
1762 struct frame *sf = SELECTED_FRAME (); 1762 struct frame *sf = SELECTED_FRAME ();
1763 1763
1764#ifdef MSDOS 1764#ifdef MSDOS
1765 if (sf->output_method != output_msdos_raw 1765 if (!is_tty_frame (sf))
1766 && sf->output_method != output_termcap)
1767 emacs_abort (); 1766 emacs_abort ();
1768#else /* not MSDOS */ 1767#else /* not MSDOS */
1769 1768
1770#ifdef WINDOWSNT /* This should work now! */ 1769#ifdef WINDOWSNT /* This should work now! */
1771 if (sf->output_method != output_termcap) 1770 if (!FRAME_TERMCAP_P (sf))
1772 error ("Not using an ASCII terminal now; cannot make a new ASCII frame"); 1771 error ("Not using an ASCII terminal now; cannot make a new ASCII frame");
1773#endif 1772#endif
1774#endif /* not MSDOS */ 1773#endif /* not MSDOS */
@@ -1985,7 +1984,7 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor
1985 if (!for_deletion && FRAME_HAS_MINIBUF_P (sf)) 1984 if (!for_deletion && FRAME_HAS_MINIBUF_P (sf))
1986 resize_mini_window (XWINDOW (FRAME_MINIBUF_WINDOW (sf)), 1); 1985 resize_mini_window (XWINDOW (FRAME_MINIBUF_WINDOW (sf)), 1);
1987 1986
1988 if (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) 1987 if (is_tty_frame (f))
1989 { 1988 {
1990 struct tty_display_info *tty = FRAME_TTY (f); 1989 struct tty_display_info *tty = FRAME_TTY (f);
1991 Lisp_Object top_frame = tty->top_frame; 1990 Lisp_Object top_frame = tty->top_frame;
@@ -2799,7 +2798,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
2799 && FRAME_LIVE_P (f1) 2798 && FRAME_LIVE_P (f1)
2800 && !FRAME_TOOLTIP_P (f1)) 2799 && !FRAME_TOOLTIP_P (f1))
2801 { 2800 {
2802 if (FRAME_TERMCAP_P (f1) || FRAME_MSDOS_P (f1)) 2801 if (is_tty_frame (f1))
2803 { 2802 {
2804 Lisp_Object top_frame = FRAME_TTY (f1)->top_frame; 2803 Lisp_Object top_frame = FRAME_TTY (f1)->top_frame;
2805 2804
diff --git a/src/keyboard.c b/src/keyboard.c
index c16cc5277e9..c64b2a6dd57 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2436,7 +2436,7 @@ read_decoded_event_from_main_queue (struct timespec *end_time,
2436#else 2436#else
2437 struct frame *frame = XFRAME (selected_frame); 2437 struct frame *frame = XFRAME (selected_frame);
2438 struct terminal *terminal = frame->terminal; 2438 struct terminal *terminal = frame->terminal;
2439 if (!((FRAME_TERMCAP_P (frame) || FRAME_MSDOS_P (frame)) 2439 if (!(is_tty_frame (frame)
2440 /* Don't apply decoding if we're just reading a raw event 2440 /* Don't apply decoding if we're just reading a raw event
2441 (e.g. reading bytes sent by the xterm to specify the position 2441 (e.g. reading bytes sent by the xterm to specify the position
2442 of a mouse click). */ 2442 of a mouse click). */
@@ -12982,7 +12982,7 @@ The elements of this list correspond to the arguments of
12982 12982
12983 Lisp_Object interrupt = interrupt_input ? Qt : Qnil; 12983 Lisp_Object interrupt = interrupt_input ? Qt : Qnil;
12984 Lisp_Object flow, meta; 12984 Lisp_Object flow, meta;
12985 if (FRAME_TERMCAP_P (sf) || FRAME_MSDOS_P (sf)) 12985 if (is_tty_frame (sf))
12986 { 12986 {
12987 flow = FRAME_TTY (sf)->flow_control ? Qt : Qnil; 12987 flow = FRAME_TTY (sf)->flow_control ? Qt : Qnil;
12988 meta = (FRAME_TTY (sf)->meta_key == 2 12988 meta = (FRAME_TTY (sf)->meta_key == 2
diff --git a/src/lisp.h b/src/lisp.h
index cbd61126a74..223eb4df564 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -5166,7 +5166,7 @@ extern void *w32_daemon_event;
5166/* True if handling a fatal error already. */ 5166/* True if handling a fatal error already. */
5167extern bool fatal_error_in_progress; 5167extern bool fatal_error_in_progress;
5168 5168
5169/* True means don't do use window-system-specific display code. */ 5169/* True means don't use window-system-specific display code. */
5170extern bool inhibit_window_system; 5170extern bool inhibit_window_system;
5171/* True means that a filter or a sentinel is running. */ 5171/* True means that a filter or a sentinel is running. */
5172extern bool running_asynch_code; 5172extern bool running_asynch_code;
diff --git a/src/menu.c b/src/menu.c
index 69fd3867002..ff4721d35f7 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -404,8 +404,7 @@ single_menu_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy, void *sk
404 } 404 }
405 } 405 }
406 406
407 if ((FRAME_TERMCAP_P (XFRAME (Vmenu_updating_frame)) 407 if (is_tty_frame (XFRAME (Vmenu_updating_frame))
408 || FRAME_MSDOS_P (XFRAME (Vmenu_updating_frame)))
409 && !NILP (map)) 408 && !NILP (map))
410 /* Indicate visually that this is a submenu. */ 409 /* Indicate visually that this is a submenu. */
411 { 410 {
diff --git a/src/msdos.c b/src/msdos.c
index 7e89d549706..4d111b30969 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -1787,7 +1787,7 @@ internal_terminal_init (void)
1787#endif 1787#endif
1788 1788
1789 /* If this is the initial terminal, we are done here. */ 1789 /* If this is the initial terminal, we are done here. */
1790 if (sf->output_method == output_initial) 1790 if (FRAME_INITIAL_P (sf))
1791 return; 1791 return;
1792 1792
1793 internal_terminal 1793 internal_terminal
diff --git a/src/sysdep.c b/src/sysdep.c
index 8895655566e..10269e4d0ce 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1341,8 +1341,7 @@ init_sys_modes (struct tty_display_info *tty_out)
1341 frame_garbaged = 1; 1341 frame_garbaged = 1;
1342 FOR_EACH_FRAME (tail, frame) 1342 FOR_EACH_FRAME (tail, frame)
1343 { 1343 {
1344 if ((FRAME_TERMCAP_P (XFRAME (frame)) 1344 if (is_tty_frame (XFRAME (frame))
1345 || FRAME_MSDOS_P (XFRAME (frame)))
1346 && FRAME_TTY (XFRAME (frame)) == tty_out) 1345 && FRAME_TTY (XFRAME (frame)) == tty_out)
1347 FRAME_GARBAGED_P (XFRAME (frame)) = 1; 1346 FRAME_GARBAGED_P (XFRAME (frame)) = 1;
1348 } 1347 }
diff --git a/src/term.c b/src/term.c
index 1d1fc05ac41..b5cf418450f 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2968,9 +2968,7 @@ Gpm-mouse can only be activated for one tty at a time. */)
2968 (void) 2968 (void)
2969{ 2969{
2970 struct frame *f = SELECTED_FRAME (); 2970 struct frame *f = SELECTED_FRAME ();
2971 struct tty_display_info *tty 2971 struct tty_display_info *tty = FRAME_TERMCAP_P (f) ? FRAME_TTY (f) : NULL;
2972 = ((f)->output_method == output_termcap
2973 ? (f)->terminal->display_info.tty : NULL);
2974 Gpm_Connect connection; 2972 Gpm_Connect connection;
2975 2973
2976 if (!tty) 2974 if (!tty)
@@ -3016,9 +3014,7 @@ DEFUN ("gpm-mouse-stop", Fgpm_mouse_stop, Sgpm_mouse_stop,
3016 (void) 3014 (void)
3017{ 3015{
3018 struct frame *f = SELECTED_FRAME (); 3016 struct frame *f = SELECTED_FRAME ();
3019 struct tty_display_info *tty 3017 struct tty_display_info *tty = FRAME_TERMCAP_P (f) ? FRAME_TTY (f) : NULL;
3020 = ((f)->output_method == output_termcap
3021 ? (f)->terminal->display_info.tty : NULL);
3022 3018
3023 if (!tty || gpm_tty != tty) 3019 if (!tty || gpm_tty != tty)
3024 return Qnil; /* Not activated on this terminal, nothing to do. */ 3020 return Qnil; /* Not activated on this terminal, nothing to do. */
@@ -4198,7 +4194,7 @@ tty_free_frame_resources (struct frame *f)
4198static void 4194static void
4199tty_free_frame_resources (struct frame *f) 4195tty_free_frame_resources (struct frame *f)
4200{ 4196{
4201 eassert (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)); 4197 eassert (is_tty_frame (f));
4202 free_frame_faces (f); 4198 free_frame_faces (f);
4203 /* Deleting a child frame means we have to thoroughly redisplay its 4199 /* Deleting a child frame means we have to thoroughly redisplay its
4204 root frame to make sure the child disappears from the display. */ 4200 root frame to make sure the child disappears from the display. */
diff --git a/src/w32xfns.c b/src/w32xfns.c
index f920e407343..df3d42c9d28 100644
--- a/src/w32xfns.c
+++ b/src/w32xfns.c
@@ -177,7 +177,7 @@ get_frame_dc (struct frame *f)
177 HGDIOBJ obj; 177 HGDIOBJ obj;
178 struct w32_output *output; 178 struct w32_output *output;
179 179
180 if (f->output_method != output_w32) 180 if (!FRAME_W32_P (f))
181 emacs_abort (); 181 emacs_abort ();
182 182
183 enter_crit (); 183 enter_crit ();
diff --git a/src/xdisp.c b/src/xdisp.c
index 8af54ad49f1..179c1bae72b 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13651,7 +13651,7 @@ clear_garbaged_frames (void)
13651 selected frame, and might leave the selected 13651 selected frame, and might leave the selected
13652 frame with corrupted display, if it happens not 13652 frame with corrupted display, if it happens not
13653 to be marked garbaged. */ 13653 to be marked garbaged. */
13654 && !(f != sf && (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)))) 13654 && !(f != sf && is_tty_frame (f)))
13655 redraw_frame (f); 13655 redraw_frame (f);
13656 else 13656 else
13657 clear_current_matrices (f); 13657 clear_current_matrices (f);
@@ -16639,11 +16639,8 @@ hscroll_window_tree (Lisp_Object window)
16639 } 16639 }
16640 } 16640 }
16641 if (cursor_row->truncated_on_left_p) 16641 if (cursor_row->truncated_on_left_p)
16642 { 16642 /* On TTY frames, don't count the left truncation glyph. */
16643 /* On TTY frames, don't count the left truncation glyph. */ 16643 x_offset -= is_tty_frame (XFRAME (WINDOW_FRAME (w)));
16644 struct frame *f = XFRAME (WINDOW_FRAME (w));
16645 x_offset -= (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f));
16646 }
16647 16644
16648 text_area_width = window_box_width (w, TEXT_AREA); 16645 text_area_width = window_box_width (w, TEXT_AREA);
16649 16646
@@ -17377,7 +17374,7 @@ redisplay_internal (void)
17377 windows_or_buffers_changed = 47; 17374 windows_or_buffers_changed = 47;
17378 17375
17379 struct frame *previous_frame; 17376 struct frame *previous_frame;
17380 if ((FRAME_TERMCAP_P (sf) || FRAME_MSDOS_P (sf)) 17377 if (is_tty_frame (sf)
17381 && (previous_frame = FRAME_TTY (sf)->previous_frame, 17378 && (previous_frame = FRAME_TTY (sf)->previous_frame,
17382 previous_frame != sf)) 17379 previous_frame != sf))
17383 { 17380 {
@@ -17822,8 +17819,7 @@ redisplay_internal (void)
17822 } 17819 }
17823 17820
17824 retry_frame: 17821 retry_frame:
17825 if (FRAME_WINDOW_P (f) 17822 if (FRAME_WINDOW_P (f) || is_tty_frame (f) || f == sf)
17826 || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f) || f == sf)
17827 { 17823 {
17828 /* Only GC scrollbars when we redisplay the whole frame. */ 17824 /* Only GC scrollbars when we redisplay the whole frame. */
17829 bool gcscrollbars = f->redisplay || !REDISPLAY_SOME_P (); 17825 bool gcscrollbars = f->redisplay || !REDISPLAY_SOME_P ();
diff --git a/src/xfaces.c b/src/xfaces.c
index a27e1c6b480..ab0934abde2 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -5776,7 +5776,7 @@ face for italic. */)
5776 } 5776 }
5777 5777
5778 /* Dispatch to the appropriate handler. */ 5778 /* Dispatch to the appropriate handler. */
5779 if (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) 5779 if (is_tty_frame (f))
5780 supports = tty_supports_face_attributes_p (f, attrs, def_face); 5780 supports = tty_supports_face_attributes_p (f, attrs, def_face);
5781#ifdef HAVE_WINDOW_SYSTEM 5781#ifdef HAVE_WINDOW_SYSTEM
5782 else 5782 else
@@ -6070,7 +6070,7 @@ realize_default_face (struct frame *f)
6070 ASET (lface, LFACE_FOREGROUND_INDEX, XCDR (color)); 6070 ASET (lface, LFACE_FOREGROUND_INDEX, XCDR (color));
6071 else if (FRAME_WINDOW_P (f)) 6071 else if (FRAME_WINDOW_P (f))
6072 return false; 6072 return false;
6073 else if (FRAME_INITIAL_P (f) || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) 6073 else if (FRAME_INITIAL_P (f) || is_tty_frame (f))
6074 ASET (lface, LFACE_FOREGROUND_INDEX, build_string (unspecified_fg)); 6074 ASET (lface, LFACE_FOREGROUND_INDEX, build_string (unspecified_fg));
6075 else 6075 else
6076 emacs_abort (); 6076 emacs_abort ();
@@ -6085,7 +6085,7 @@ realize_default_face (struct frame *f)
6085 ASET (lface, LFACE_BACKGROUND_INDEX, XCDR (color)); 6085 ASET (lface, LFACE_BACKGROUND_INDEX, XCDR (color));
6086 else if (FRAME_WINDOW_P (f)) 6086 else if (FRAME_WINDOW_P (f))
6087 return false; 6087 return false;
6088 else if (FRAME_INITIAL_P (f) || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) 6088 else if (FRAME_INITIAL_P (f) || is_tty_frame (f))
6089 ASET (lface, LFACE_BACKGROUND_INDEX, build_string (unspecified_bg)); 6089 ASET (lface, LFACE_BACKGROUND_INDEX, build_string (unspecified_bg));
6090 else 6090 else
6091 emacs_abort (); 6091 emacs_abort ();
@@ -6196,7 +6196,7 @@ realize_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE],
6196 6196
6197 if (FRAME_WINDOW_P (cache->f)) 6197 if (FRAME_WINDOW_P (cache->f))
6198 face = realize_gui_face (cache, attrs); 6198 face = realize_gui_face (cache, attrs);
6199 else if (FRAME_TERMCAP_P (cache->f) || FRAME_MSDOS_P (cache->f)) 6199 else if (is_tty_frame (cache->f))
6200 face = realize_tty_face (cache, attrs); 6200 face = realize_tty_face (cache, attrs);
6201 else if (FRAME_INITIAL_P (cache->f)) 6201 else if (FRAME_INITIAL_P (cache->f))
6202 { 6202 {
@@ -6705,7 +6705,7 @@ realize_tty_face (struct face_cache *cache,
6705 struct frame *f = cache->f; 6705 struct frame *f = cache->f;
6706 6706
6707 /* Frame must be a termcap frame. */ 6707 /* Frame must be a termcap frame. */
6708 eassert (FRAME_TERMCAP_P (cache->f) || FRAME_MSDOS_P (cache->f)); 6708 eassert (is_tty_frame (cache->f));
6709 6709
6710 /* Allocate a new realized face. */ 6710 /* Allocate a new realized face. */
6711 face = make_realized_face (attrs); 6711 face = make_realized_face (attrs);