diff options
| author | Jason Rumney | 2007-11-29 21:57:25 +0000 |
|---|---|---|
| committer | Jason Rumney | 2007-11-29 21:57:25 +0000 |
| commit | b510360c6bf66da86512b837c9533cbd24b776fe (patch) | |
| tree | 10abb551612f0707f01dd37335db127777537603 /src | |
| parent | 4b7ab1c4bca3c9b22d73828e38b0b810ec5885d0 (diff) | |
| download | emacs-b510360c6bf66da86512b837c9533cbd24b776fe.tar.gz emacs-b510360c6bf66da86512b837c9533cbd24b776fe.zip | |
Leave HAVE_WINDOW_SYSTEM defined.
(w32_face_attributes): Use Vtty_defined_color_alist to determine
if the terminal colors are initialized.
(unspecified_fg, unspecified_bg): Remove unused declarations.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/w32console.c | 18 |
2 files changed, 13 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e4d37ade79e..c44fdba9200 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2007-11-29 Jason Rumney <jasonr@gnu.org> | ||
| 2 | |||
| 3 | * w32console.c: Leave HAVE_WINDOW_SYSTEM defined. | ||
| 4 | (w32_face_attributes): Use Vtty_defined_color_alist to determine | ||
| 5 | if the terminal colors are initialized. | ||
| 6 | (unspecified_fg, unspecified_bg): Remove unused declarations. | ||
| 7 | |||
| 1 | 2007-11-29 Andreas Schwab <schwab@suse.de> | 8 | 2007-11-29 Andreas Schwab <schwab@suse.de> |
| 2 | 9 | ||
| 3 | * keyboard.c (apply_modifiers): Fix typo. | 10 | * keyboard.c (apply_modifiers): Fix typo. |
diff --git a/src/w32console.c b/src/w32console.c index 3567426a074..77cc5001f8f 100644 --- a/src/w32console.c +++ b/src/w32console.c | |||
| @@ -35,8 +35,6 @@ Boston, MA 02110-1301, USA. | |||
| 35 | #include "charset.h" | 35 | #include "charset.h" |
| 36 | #include "coding.h" | 36 | #include "coding.h" |
| 37 | #include "disptab.h" | 37 | #include "disptab.h" |
| 38 | /* Disable features in frame.h that require a Window System. */ | ||
| 39 | #undef HAVE_WINDOW_SYSTEM | ||
| 40 | #include "frame.h" | 38 | #include "frame.h" |
| 41 | #include "termhooks.h" | 39 | #include "termhooks.h" |
| 42 | #include "termchar.h" | 40 | #include "termchar.h" |
| @@ -76,6 +74,8 @@ static DWORD prev_console_mode; | |||
| 76 | static CONSOLE_CURSOR_INFO prev_console_cursor; | 74 | static CONSOLE_CURSOR_INFO prev_console_cursor; |
| 77 | #endif | 75 | #endif |
| 78 | 76 | ||
| 77 | extern Lisp_Object Vtty_defined_color_alist; | ||
| 78 | |||
| 79 | /* Determine whether to make frame dimensions match the screen buffer, | 79 | /* Determine whether to make frame dimensions match the screen buffer, |
| 80 | or the current window size. The former is desirable when running | 80 | or the current window size. The former is desirable when running |
| 81 | over telnet, while the latter is more useful when working directly at | 81 | over telnet, while the latter is more useful when working directly at |
| @@ -491,12 +491,10 @@ w32_face_attributes (f, face_id) | |||
| 491 | && face->background != FACE_TTY_DEFAULT_COLOR) | 491 | && face->background != FACE_TTY_DEFAULT_COLOR) |
| 492 | char_attr = (char_attr & 0xff0f) + ((face->background % 16) << 4); | 492 | char_attr = (char_attr & 0xff0f) + ((face->background % 16) << 4); |
| 493 | 493 | ||
| 494 | 494 | /* Before the terminal is properly initialized, all colors map to 0. | |
| 495 | /* NTEMACS_TODO: Faces defined during startup get both foreground | 495 | If we get a face like this, use the normal terminal attributes. */ |
| 496 | and background of 0. Need a better way around this - for now detect | 496 | if (NILP (Vtty_defined_color_alist)) |
| 497 | the problem and invert one of the faces to make the text readable. */ | 497 | char_attr = char_attr_normal; |
| 498 | if (((char_attr & 0x00f0) >> 4) == (char_attr & 0x000f)) | ||
| 499 | char_attr ^= 0x0007; | ||
| 500 | 498 | ||
| 501 | if (face->tty_reverse_p) | 499 | if (face->tty_reverse_p) |
| 502 | char_attr = (char_attr & 0xff00) + ((char_attr & 0x000f) << 4) | 500 | char_attr = (char_attr & 0xff00) + ((char_attr & 0x000f) << 4) |
| @@ -506,10 +504,6 @@ w32_face_attributes (f, face_id) | |||
| 506 | } | 504 | } |
| 507 | 505 | ||
| 508 | 506 | ||
| 509 | /* Emulation of some X window features from xfns.c and xfaces.c. */ | ||
| 510 | |||
| 511 | extern char unspecified_fg[], unspecified_bg[]; | ||
| 512 | |||
| 513 | 507 | ||
| 514 | /* Given a color index, return its standard name. */ | 508 | /* Given a color index, return its standard name. */ |
| 515 | Lisp_Object | 509 | Lisp_Object |