aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2000-01-03 16:56:40 +0000
committerEli Zaretskii2000-01-03 16:56:40 +0000
commit24480d5b0868b4140b33a1fe2257f52f331f05bf (patch)
treee3bb141a60be053c310ad6091637e42437aa1aa4
parentef917393c4b4f17d53e6846f1351c3dcc9e6c1af (diff)
downloademacs-24480d5b0868b4140b33a1fe2257f52f331f05bf.tar.gz
emacs-24480d5b0868b4140b33a1fe2257f52f331f05bf.zip
(unspecified_colors): Remove.
(msdos_stdcolor_idx): Use global variables unspecified_fg and unspecified_bg. (msdos_stdcolor_name): Return strings for unspecified fore- and back-ground colors.
-rw-r--r--src/ChangeLog17
-rw-r--r--src/dosfns.c28
2 files changed, 30 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 59a6590cbe4..37def97ce36 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,20 @@
12000-01-03 Eli Zaretskii <eliz@is.elta.co.il>
2
3 * dosfns.c (unspecified_colors): Remove.
4 (msdos_stdcolor_idx): Use global variables unspecified_fg and
5 unspecified_bg.
6 (msdos_stdcolor_name): Return strings for unspecified fore- and
7 back-ground colors.
8
9 * xfaces.c (Qunspecified_fg, Qunspecified_bg): Remove.
10 (syms_of_xfaces): Remove theit staticpro's.
11 (tty_color_name): Return Lisp strings for unspecified fore- and
12 back-ground colors.
13 (Finternal_set_lisp_face_attribute): Remove the special treatment
14 for Qunspecified_{f,b}g.
15 (realize_default_face): Replace Qunspecified_{f,b}g with a Lisp
16 string.
17
12000-01-03 Gerd Moellmann <gerd@gnu.org> 182000-01-03 Gerd Moellmann <gerd@gnu.org>
2 19
3 * xdisp.c (reseat_at_next_visible_line_start): Position before 20 * xdisp.c (reseat_at_next_visible_line_start): Position before
diff --git a/src/dosfns.c b/src/dosfns.c
index feb9080b7c7..3c1fd8f764b 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -409,9 +409,7 @@ static char *vga_colors[16] = {
409 "lightred", "lightmagenta", "yellow", "white" 409 "lightred", "lightmagenta", "yellow", "white"
410}; 410};
411 411
412static char *unspecified_colors[] = { 412extern char unspecified_fg[], unspecified_bg[];
413 "unspecified-fg", "unspecified-bg", "unspecified"
414};
415 413
416/* Given a color name, return its index, or -1 if not found. Note 414/* Given a color name, return its index, or -1 if not found. Note
417 that this only performs case-insensitive comparison against the 415 that this only performs case-insensitive comparison against the
@@ -429,8 +427,8 @@ msdos_stdcolor_idx (const char *name)
429 return i; 427 return i;
430 428
431 return 429 return
432 strcmp (name, unspecified_colors[0]) == 0 ? FACE_TTY_DEFAULT_FG_COLOR 430 strcmp (name, unspecified_fg) == 0 ? FACE_TTY_DEFAULT_FG_COLOR
433 : strcmp (name, unspecified_colors[1]) == 0 ? FACE_TTY_DEFAULT_BG_COLOR 431 : strcmp (name, unspecified_bg) == 0 ? FACE_TTY_DEFAULT_BG_COLOR
434 : FACE_TTY_DEFAULT_COLOR; 432 : FACE_TTY_DEFAULT_COLOR;
435} 433}
436 434
@@ -438,16 +436,16 @@ msdos_stdcolor_idx (const char *name)
438Lisp_Object 436Lisp_Object
439msdos_stdcolor_name (int idx) 437msdos_stdcolor_name (int idx)
440{ 438{
441 extern Lisp_Object Qunspecified, Qunspecified_fg, Qunspecified_bg; 439 extern Lisp_Object Qunspecified;
442 440
443 if (idx < 0 || idx >= sizeof (vga_colors) / sizeof (vga_colors[0])) 441 if (idx == FACE_TTY_DEFAULT_FG_COLOR)
444 { 442 return build_string (unspecified_fg);
445 return 443 else if (idx == FACE_TTY_DEFAULT_BG_COLOR)
446 idx == FACE_TTY_DEFAULT_FG_COLOR ? Qunspecified_fg 444 return build_string (unspecified_bg);
447 : idx == FACE_TTY_DEFAULT_BG_COLOR ? Qunspecified_bg 445 else if (idx >= 0 && idx < sizeof (vga_colors) / sizeof (vga_colors[0]))
448 : Qunspecified; /* meaning the default */ 446 return build_string (vga_colors[idx]);
449 } 447 else
450 return build_string (vga_colors[idx]); 448 return Qunspecified; /* meaning the default */
451} 449}
452 450
453/* Support for features that are available when we run in a DOS box 451/* Support for features that are available when we run in a DOS box