diff options
author | Jason Rumney <jasonr@gnu.org> | 2007-12-01 15:57:41 +0000 |
---|---|---|
committer | Jason Rumney <jasonr@gnu.org> | 2007-12-01 15:57:41 +0000 |
commit | 574928bb25a9544d9abd62dece7dbe9ea1b90171 (patch) | |
tree | 06d0524ee77331c81165feb643c732f565a4f8f2 | |
parent | 441736e394a927db59782a4db9e7c4d1e1793cb1 (diff) | |
download | emacs-574928bb25a9544d9abd62dece7dbe9ea1b90171.tar.gz |
(w32_face_attributes): Comment previous change.
-rw-r--r-- | src/w32console.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/w32console.c b/src/w32console.c index 2774a7c842a..b1514f960b7 100644 --- a/src/w32console.c +++ b/src/w32console.c @@ -517,12 +517,15 @@ w32_face_attributes (f, face_id) if (NILP (Vtty_defined_color_alist)) return char_attr; - if (face->foreground >= 0 - && face->foreground < 16) + /* Colors should be in the range 0...15 unless they are one of + FACE_TTY_DEFAULT_COLOR, FACE_TTY_DEFAULT_FG_COLOR or + FACE_TTY_DEFAULT_BG_COLOR. Other out of range colors are + invalid, so it is better to use the default color if they ever + get through to here. */ + if (face->foreground >= 0 && face->foreground < 16) char_attr = (char_attr & 0xfff0) + face->foreground; - if (face->background >= 0 - && face->background < 16) + if (face->background >= 0 && face->background < 16) char_attr = (char_attr & 0xff0f) + (face->background << 4); return char_attr; |