From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Diff mode faces Date: Sun, 19 Jun 2005 21:58:52 +0200 Message-ID: References: <87oea5urwm.fsf@jurta.org> <87psujj0h0.fsf@jurta.org> <86hdfv1y9b.fsf@blue.stonehenge.com> <87psuiqzcj.fsf@jurta.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1119207383 16599 80.91.229.2 (19 Jun 2005 18:56:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 19 Jun 2005 18:56:23 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 19 20:56:21 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dk4xg-0006vP-PV for ged-emacs-devel@m.gmane.org; Sun, 19 Jun 2005 20:56:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dk53k-0000R6-JB for ged-emacs-devel@m.gmane.org; Sun, 19 Jun 2005 15:02:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dk536-0000Na-Ew for emacs-devel@gnu.org; Sun, 19 Jun 2005 15:01:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dk52t-0000Gi-Qo for emacs-devel@gnu.org; Sun, 19 Jun 2005 15:01:35 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dk52t-0000Fu-Hq for emacs-devel@gnu.org; Sun, 19 Jun 2005 15:01:27 -0400 Original-Received: from [192.114.186.24] (helo=legolas.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dk530-0004L8-Fj for emacs-devel@gnu.org; Sun, 19 Jun 2005 15:01:34 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-83-130-214-121.inter.net.il [83.130.214.121]) by legolas.inter.net.il (MOS 3.5.8-GR) with ESMTP id EQP40090 (AUTH halo1); Sun, 19 Jun 2005 21:58:57 +0300 (IDT) Original-To: Juri Linkov In-reply-to: <87psuiqzcj.fsf@jurta.org> (message from Juri Linkov on Sun, 19 Jun 2005 16:09:47 +0300) 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:39128 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39128 > From: Juri Linkov > Cc: merlyn@stonehenge.com, emacs-devel@gnu.org > Date: Sun, 19 Jun 2005 16:09:47 +0300 > > I see there is one problem with background-mode on tty. Unlike X, > on tty Emacs doesn't adjust background-mode after changing the > background color with any of the known methods: `set-background-color' > command, or customizing the background color of the default face. > > It seems the correct place to fix this is `modify-frame-parameters'. > The call to Qframe_update_face_colors is duplicated from the function > `update_face_from_frame_parameter' in the patch below. With this change > `frame-set-background-mode' gets called, so it updates background-mode > after every change of the background color on tty. I have a few issues with this patch. First, it calls an obsolete function frame-update-face-colors (it's an alias for backward compatibility; let's use the function it is aliased to). Second, I think doing this unconditionally might not be a good idea: wouldn't it clash with what x_set_frame_parameters and IT_set_frame_parameters do for their respective displays? Third, please be sure to test this change with various ways one can use to set colors on a tty, including these few: . emacs -fg FOO . emacs -fg FOO -bg BAR . emacs -bg BAR . repeat the above 3 with -rv, and convince yourself that the above 4 tests produce expected results . modify the default color with set-background-color and verify that it is in effect for new frames created with "C-x 5 b" and the like . same as the last one above, but with set-face-background for the default face, both with and without the optional frame arg; verify that with an arg only the named frame is affected and without an arg all frames are affected, including the newly created ones Finally, could you please elaborate on your analysis of this issue; in particular, where is this handled on X?