emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/w32console.c,v


From: Jason Rumney
Subject: [Emacs-diffs] Changes to emacs/src/w32console.c,v
Date: Thu, 29 Nov 2007 21:57:12 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Jason Rumney <jasonr>   07/11/29 21:57:12

Index: w32console.c
===================================================================
RCS file: /sources/emacs/emacs/src/w32console.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- w32console.c        21 Nov 2007 03:44:13 -0000      1.53
+++ w32console.c        29 Nov 2007 21:57:12 -0000      1.54
@@ -35,8 +35,6 @@
 #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 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 @@
       && 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 @@
 }
 
 
-/* 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]