aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-04-09 20:30:25 +0000
committerGerd Moellmann2000-04-09 20:30:25 +0000
commita4a76b61f9891681feccd0fc1cc765e6be4186be (patch)
treea356758f0b298db9f93887b55e1672ee875f9034 /src
parent706239c766ae4f0a229f83335904dae0f2f81365 (diff)
downloademacs-a4a76b61f9891681feccd0fc1cc765e6be4186be.tar.gz
emacs-a4a76b61f9891681feccd0fc1cc765e6be4186be.zip
(tty_suppress_bold_inverse_default_colors_p): New
variable. (realize_tty_face): Suppress boldness if colors are the inverse of the default colors, and tty_suppress_bold_inverse_default_colors_p is set. (Ftty_suppress_bold_inverse_default_colors): New function. (syms_of_xfaces): Defsubr it.
Diffstat (limited to 'src')
-rw-r--r--src/xfaces.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index 00697cdee29..d775cc174c5 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -410,6 +410,13 @@ static int clear_font_table_count;
410 410
411int face_change_count; 411int face_change_count;
412 412
413/* Non-zero means don't display bold text if a face's foreground
414 and background colors are the inverse of the default colors of the
415 display. This is a kluge to suppress `bold black' foreground text
416 which is hard to read on an LCD monitor. */
417
418int tty_suppress_bold_inverse_default_colors_p;
419
413/* The total number of colors currently allocated. */ 420/* The total number of colors currently allocated. */
414 421
415#if GLYPH_DEBUG 422#if GLYPH_DEBUG
@@ -6154,10 +6161,33 @@ realize_tty_face (cache, attrs, c)
6154 face->background = tem; 6161 face->background = tem;
6155 } 6162 }
6156 6163
6164 if (tty_suppress_bold_inverse_default_colors_p
6165 && face->tty_bold_p
6166 && face->background == FACE_TTY_DEFAULT_FG_COLOR
6167 && face->foreground == FACE_TTY_DEFAULT_BG_COLOR)
6168 face->tty_bold_p = 0;
6169
6157 return face; 6170 return face;
6158} 6171}
6159 6172
6160 6173
6174DEFUN ("tty-suppress-bold-inverse-default-colors",
6175 Ftty_suppress_bold_inverse_default_colors,
6176 Stty_suppress_bold_inverse_default_colors, 1, 1, 0,
6177 "Suppress/allow boldness of faces with inverse default colors.\n\
6178SUPPRESS non-nil means suppress it.\n\
6179This affects bold faces whose foreground is the default background color\n\
6180of the display and whose background is the default foreground color.\n\
6181For such faces, no bold text will be displayed.")
6182 (suppress)
6183 Lisp_Object suppress;
6184{
6185 tty_suppress_bold_inverse_default_colors_p = !NILP (suppress);
6186 ++face_change_count;
6187 return suppress;
6188}
6189
6190
6161 6191
6162/*********************************************************************** 6192/***********************************************************************
6163 Computing Faces 6193 Computing Faces
@@ -6670,6 +6700,7 @@ syms_of_xfaces ()
6670 defsubr (&Sshow_face_resources); 6700 defsubr (&Sshow_face_resources);
6671#endif /* GLYPH_DEBUG */ 6701#endif /* GLYPH_DEBUG */
6672 defsubr (&Sclear_face_cache); 6702 defsubr (&Sclear_face_cache);
6703 defsubr (&Stty_suppress_bold_inverse_default_colors);
6673 6704
6674 DEFVAR_LISP ("font-list-limit", &Vfont_list_limit, 6705 DEFVAR_LISP ("font-list-limit", &Vfont_list_limit,
6675 "*Limit for font matching.\n\ 6706 "*Limit for font matching.\n\