From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Background mode Date: Tue, 28 Jun 2005 02:55:48 +0300 Organization: JURTA Message-ID: <87fyv34auj.fsf@jurta.org> References: <87oea5urwm.fsf@jurta.org> <87psujj0h0.fsf@jurta.org> <86hdfv1y9b.fsf@blue.stonehenge.com> <87psuiqzcj.fsf@jurta.org> <87is09n00n.fsf@jurta.org> <87hdfr4t99.fsf_-_@jurta.org> <87u0jkyekf.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1119929295 13547 80.91.229.2 (28 Jun 2005 03:28:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 28 Jun 2005 03:28:15 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 28 05:28:15 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dn6lS-0008OS-OG for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2005 05:27:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dn6tE-0002LI-5B for ged-emacs-devel@m.gmane.org; Mon, 27 Jun 2005 23:36:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dn6m1-0006Hw-Me for emacs-devel@gnu.org; Mon, 27 Jun 2005 23:28:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dn6lo-00069i-Vt for emacs-devel@gnu.org; Mon, 27 Jun 2005 23:28:22 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dn6lm-00064b-Pl for emacs-devel@gnu.org; Mon, 27 Jun 2005 23:28:18 -0400 Original-Received: from [194.126.101.98] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dn6lZ-00064k-Vf for emacs-devel@gnu.org; Mon, 27 Jun 2005 23:28:06 -0400 Original-Received: from mail.neti.ee (80-235-41-107-dsl.mus.estpak.ee [80.235.41.107]) by Relayhost2.neti.ee (Postfix) with ESMTP id 1C02F3499 for ; Tue, 28 Jun 2005 06:23:34 +0300 (EEST) Original-To: emacs-devel@gnu.org In-Reply-To: <87u0jkyekf.fsf@jurta.org> (Juri Linkov's message of "Mon, 27 Jun 2005 03:03:48 +0300") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:39715 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39715 I discovered another bug. On non-window terminals when the background color of some face is specified, but its foreground is not (and vice versa), then the inverted face uses the wrong color. These situations are described by the following excerpts from the face customization buffer: 1. [X] Foreground: blue (sample) [X] Background: unspecified-fg (sample) Currently this sets the face background to blue, and the foreground to unspecified-bg, i.e. it inverts the unspecified colors (function toggle_highlight), but puts the specified color (blue) on the wrong face attribute. 2. [X] Foreground: unspecified-bg (sample) [X] Background: blue (sample) This sets the foreground to blue, and the background to unspecified-fg. The patch takes care of these cases and uses the correct colors. Index: src/term.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/term.c,v retrieving revision 1.162 diff -c -r1.162 term.c *** src/term.c 17 Jun 2005 14:08:58 -0000 1.162 --- src/term.c 27 Jun 2005 23:27:14 -0000 *************** *** 2005,2018 **** if (fg >= 0 && TS_set_foreground) { ! p = tparam (TS_set_foreground, NULL, 0, (int) fg); OUTPUT (p); xfree (p); } if (bg >= 0 && TS_set_background) { ! p = tparam (TS_set_background, NULL, 0, (int) bg); OUTPUT (p); xfree (p); } --- 2005,2024 ---- if (fg >= 0 && TS_set_foreground) { ! if (inverse_video || bg == FACE_TTY_DEFAULT_FG_COLOR) ! p = tparam (TS_set_background, NULL, 0, (int) fg); ! else ! p = tparam (TS_set_foreground, NULL, 0, (int) fg); OUTPUT (p); xfree (p); } if (bg >= 0 && TS_set_background) { ! if (inverse_video || fg == FACE_TTY_DEFAULT_BG_COLOR) ! p = tparam (TS_set_foreground, NULL, 0, (int) bg); ! else ! p = tparam (TS_set_background, NULL, 0, (int) bg); OUTPUT (p); xfree (p); } -- Juri Linkov http://www.jurta.org/emacs/