diff options
| author | Eli Zaretskii | 2000-01-03 16:52:52 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2000-01-03 16:52:52 +0000 |
| commit | ef917393c4b4f17d53e6846f1351c3dcc9e6c1af (patch) | |
| tree | 1ba37156d757d7405751e2da896be64aa9c3ff23 /src | |
| parent | 1de6bfb1b851ea8981b2fd0adab24632fc6f3129 (diff) | |
| download | emacs-ef917393c4b4f17d53e6846f1351c3dcc9e6c1af.tar.gz emacs-ef917393c4b4f17d53e6846f1351c3dcc9e6c1af.zip | |
(Qunspecified_fg, Qunspecified_bg): Remove.
(syms_of_xfaces): Remove their staticpro's.
(tty_color_name): Return Lisp strings for unspecified fore- and
back-ground colors.
(Finternal_set_lisp_face_attribute): Remove the special treatment
for Qunspecified_{f,b}g.
(realize_default_face): Replace Qunspecified_{f,b}g with a Lisp
string.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfaces.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index 601a69ee34b..24df79e4a32 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -282,7 +282,9 @@ Lisp_Object Qsemi_condensed, Qsemi_expanded, Qexpanded, Qextra_expanded; | |||
| 282 | Lisp_Object Qultra_expanded; | 282 | Lisp_Object Qultra_expanded; |
| 283 | Lisp_Object Qreleased_button, Qpressed_button; | 283 | Lisp_Object Qreleased_button, Qpressed_button; |
| 284 | Lisp_Object QCstyle, QCcolor, QCline_width; | 284 | Lisp_Object QCstyle, QCcolor, QCline_width; |
| 285 | Lisp_Object Qunspecified, Qunspecified_fg, Qunspecified_bg; | 285 | Lisp_Object Qunspecified; |
| 286 | |||
| 287 | char unspecified_fg[] = "unspecified-fg", unspecified_bg[] = "unspecified-bg"; | ||
| 286 | 288 | ||
| 287 | /* The symbol `x-charset-registry'. This property of charsets defines | 289 | /* The symbol `x-charset-registry'. This property of charsets defines |
| 288 | the X registry and encoding that fonts should have that are used to | 290 | the X registry and encoding that fonts should have that are used to |
| @@ -1194,10 +1196,11 @@ tty_color_name (f, idx) | |||
| 1194 | by index using the default color mapping on a Windows console. */ | 1196 | by index using the default color mapping on a Windows console. */ |
| 1195 | #endif | 1197 | #endif |
| 1196 | 1198 | ||
| 1197 | return | 1199 | if (idx == FACE_TTY_DEFAULT_FG_COLOR) |
| 1198 | idx == FACE_TTY_DEFAULT_FG_COLOR ? Qunspecified_fg | 1200 | return build_string (unspecified_fg); |
| 1199 | : idx == FACE_TTY_DEFAULT_BG_COLOR ? Qunspecified_bg | 1201 | if (idx == FACE_TTY_DEFAULT_BG_COLOR) |
| 1200 | : Qunspecified; | 1202 | return build_string (unspecified_bg); |
| 1203 | return Qunspecified; | ||
| 1201 | } | 1204 | } |
| 1202 | 1205 | ||
| 1203 | /* Return non-zero if COLOR_NAME is a shade of gray (or white or | 1206 | /* Return non-zero if COLOR_NAME is a shade of gray (or white or |
| @@ -3445,8 +3448,7 @@ frame.") | |||
| 3445 | } | 3448 | } |
| 3446 | else if (EQ (attr, QCforeground)) | 3449 | else if (EQ (attr, QCforeground)) |
| 3447 | { | 3450 | { |
| 3448 | if (!UNSPECIFIEDP (value) | 3451 | if (!UNSPECIFIEDP (value)) |
| 3449 | && !EQ (value, Qunspecified_fg) && !EQ (value, Qunspecified_bg)) | ||
| 3450 | { | 3452 | { |
| 3451 | /* Don't check for valid color names here because it depends | 3453 | /* Don't check for valid color names here because it depends |
| 3452 | on the frame (display) whether the color will be valid | 3454 | on the frame (display) whether the color will be valid |
| @@ -3460,8 +3462,7 @@ frame.") | |||
| 3460 | } | 3462 | } |
| 3461 | else if (EQ (attr, QCbackground)) | 3463 | else if (EQ (attr, QCbackground)) |
| 3462 | { | 3464 | { |
| 3463 | if (!UNSPECIFIEDP (value) | 3465 | if (!UNSPECIFIEDP (value)) |
| 3464 | && !EQ (value, Qunspecified_bg) && !EQ (value, Qunspecified_fg)) | ||
| 3465 | { | 3466 | { |
| 3466 | /* Don't check for valid color names here because it depends | 3467 | /* Don't check for valid color names here because it depends |
| 3467 | on the frame (display) whether the color will be valid | 3468 | on the frame (display) whether the color will be valid |
| @@ -5707,7 +5708,7 @@ realize_default_face (f) | |||
| 5707 | else if (FRAME_X_P (f)) | 5708 | else if (FRAME_X_P (f)) |
| 5708 | return 0; | 5709 | return 0; |
| 5709 | else if (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) | 5710 | else if (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) |
| 5710 | LFACE_FOREGROUND (lface) = Qunspecified_fg; | 5711 | LFACE_FOREGROUND (lface) = build_string (unspecified_fg); |
| 5711 | else | 5712 | else |
| 5712 | abort (); | 5713 | abort (); |
| 5713 | } | 5714 | } |
| @@ -5722,7 +5723,7 @@ realize_default_face (f) | |||
| 5722 | else if (FRAME_X_P (f)) | 5723 | else if (FRAME_X_P (f)) |
| 5723 | return 0; | 5724 | return 0; |
| 5724 | else if (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) | 5725 | else if (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) |
| 5725 | LFACE_BACKGROUND (lface) = Qunspecified_bg; | 5726 | LFACE_BACKGROUND (lface) = build_string (unspecified_bg); |
| 5726 | else | 5727 | else |
| 5727 | abort (); | 5728 | abort (); |
| 5728 | } | 5729 | } |
| @@ -6662,10 +6663,6 @@ syms_of_xfaces () | |||
| 6662 | staticpro (&Qforeground_color); | 6663 | staticpro (&Qforeground_color); |
| 6663 | Qunspecified = intern ("unspecified"); | 6664 | Qunspecified = intern ("unspecified"); |
| 6664 | staticpro (&Qunspecified); | 6665 | staticpro (&Qunspecified); |
| 6665 | Qunspecified_fg = intern ("unspecified-fg"); | ||
| 6666 | staticpro (&Qunspecified_fg); | ||
| 6667 | Qunspecified_bg = intern ("unspecified-bg"); | ||
| 6668 | staticpro (&Qunspecified_bg); | ||
| 6669 | 6666 | ||
| 6670 | Qx_charset_registry = intern ("x-charset-registry"); | 6667 | Qx_charset_registry = intern ("x-charset-registry"); |
| 6671 | staticpro (&Qx_charset_registry); | 6668 | staticpro (&Qx_charset_registry); |