# HG changeset patch # User Eli Zaretskii # Date 1011964909 0 # Node ID e514d4931d6f28910545ca4e9f226555cd2af277 # Parent 9071f84734d8120b6a372307a5459cb7c2d69133 (Ftty_display_color_cells): New function. (syms_of_term): Defsubr it. diff -r 9071f84734d8 -r e514d4931d6f src/term.c --- a/src/term.c Fri Jan 25 13:20:18 2002 +0000 +++ b/src/term.c Fri Jan 25 13:21:49 2002 +0000 @@ -1983,6 +1983,16 @@ return TN_max_colors > 0 ? Qt : Qnil; } +/* Return the number of supported colors. */ +DEFUN ("tty-display-color-cells", Ftty_display_color_cells, + Stty_display_color_cells, 0, 1, 0, + "Return the number of colors supported by TTY on FRAME.") + (frame) + Lisp_Object frame; +{ + return make_number (TN_max_colors); +} + #ifndef WINDOWSNT /* Save or restore the default color-related capabilities of this @@ -2560,5 +2570,6 @@ Vring_bell_function = Qnil; defsubr (&Stty_display_color_p); + defsubr (&Stty_display_color_cells); }