]> git.eshelyaron.com Git - emacs.git/commitdiff
Leave HAVE_WINDOW_SYSTEM defined.
authorJason Rumney <jasonr@gnu.org>
Thu, 29 Nov 2007 21:57:25 +0000 (21:57 +0000)
committerJason Rumney <jasonr@gnu.org>
Thu, 29 Nov 2007 21:57:25 +0000 (21:57 +0000)
(w32_face_attributes): Use Vtty_defined_color_alist to determine
if the terminal colors are initialized.
(unspecified_fg, unspecified_bg): Remove unused declarations.

src/ChangeLog
src/w32console.c

index e4d37ade79edeb53091613ab6fa368eb6446a5da..c44fdba9200b9d3ee0457afc5f3b5c8a479ea4c8 100644 (file)
@@ -1,3 +1,10 @@
+2007-11-29  Jason Rumney  <jasonr@gnu.org>
+
+       * w32console.c: 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.
+
 2007-11-29  Andreas Schwab  <schwab@suse.de>
 
        * keyboard.c (apply_modifiers): Fix typo.
index 3567426a0749bb79b264c2ac10bdce1cdabba8c7..77cc5001f8fee2cd2a0598ca61a8fb8f3216a616 100644 (file)
@@ -35,8 +35,6 @@ Boston, MA 02110-1301, USA.
 #include "charset.h"
 #include "coding.h"
 #include "disptab.h"
-/* Disable features in frame.h that require a Window System.  */
-#undef HAVE_WINDOW_SYSTEM
 #include "frame.h"
 #include "termhooks.h"
 #include "termchar.h"
@@ -76,6 +74,8 @@ static DWORD   prev_console_mode;
 static CONSOLE_CURSOR_INFO prev_console_cursor;
 #endif
 
+extern Lisp_Object Vtty_defined_color_alist;
+
 /* Determine whether to make frame dimensions match the screen buffer,
    or the current window size.  The former is desirable when running
    over telnet, while the latter is more useful when working directly at
@@ -491,12 +491,10 @@ w32_face_attributes (f, face_id)
       && face->background != FACE_TTY_DEFAULT_COLOR)
     char_attr = (char_attr & 0xff0f) + ((face->background % 16) << 4);
 
-
-  /* NTEMACS_TODO: Faces defined during startup get both foreground
-     and background of 0. Need a better way around this - for now detect
-     the problem and invert one of the faces to make the text readable. */
-  if (((char_attr & 0x00f0) >> 4) == (char_attr & 0x000f))
-    char_attr ^= 0x0007;
+  /* Before the terminal is properly initialized, all colors map to 0.
+     If we get a face like this, use the normal terminal attributes.  */
+  if (NILP (Vtty_defined_color_alist))
+    char_attr = char_attr_normal;
 
   if (face->tty_reverse_p)
     char_attr = (char_attr & 0xff00) + ((char_attr & 0x000f) << 4)
@@ -506,10 +504,6 @@ w32_face_attributes (f, face_id)
 }
 
 
-/* Emulation of some X window features from xfns.c and xfaces.c.  */
-
-extern char unspecified_fg[], unspecified_bg[];
-
 
 /* Given a color index, return its standard name.  */
 Lisp_Object