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: Diff mode faces Date: Mon, 20 Jun 2005 07:48:08 +0300 Organization: JURTA Message-ID: <87is09n00n.fsf@jurta.org> References: <87oea5urwm.fsf@jurta.org> <87psujj0h0.fsf@jurta.org> <86hdfv1y9b.fsf@blue.stonehenge.com> <87psuiqzcj.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 1119245283 13173 80.91.229.2 (20 Jun 2005 05:28:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 20 Jun 2005 05:28:03 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 20 07:27:54 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DkEp3-00058O-4a for ged-emacs-devel@m.gmane.org; Mon, 20 Jun 2005 07:27:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DkEvC-0003Bo-71 for ged-emacs-devel@m.gmane.org; Mon, 20 Jun 2005 01:34:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DkEtW-0002ZN-NF for emacs-devel@gnu.org; Mon, 20 Jun 2005 01:32:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DkEtR-0002We-H2 for emacs-devel@gnu.org; Mon, 20 Jun 2005 01:32:22 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DkEtQ-0002PJ-Ja for emacs-devel@gnu.org; Mon, 20 Jun 2005 01:32:20 -0400 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DkEdA-0003ud-TI; Mon, 20 Jun 2005 01:15:33 -0400 Original-Received: from mail.neti.ee (80-235-32-86-dsl.mus.estpak.ee [80.235.32.86]) by Relayhost1.neti.ee (Postfix) with ESMTP id 1F0321EC5; Mon, 20 Jun 2005 08:12:54 +0300 (EEST) Original-To: Eli Zaretskii In-Reply-To: (Eli Zaretskii's message of "Sun, 19 Jun 2005 21:58:52 +0200") 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:39153 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39153 > 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). Then it would be better to rename it in all C files to not create Lisp symbols in C for both of them. > 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? It is called conditionally on non-window and non-dos systems so it doesn't clash with x_set_frame_parameters or IT_set_frame_parameters. > 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 I see there is a bug not caused by my patch: emacs -q -nw -rv sets the background mode to light on xterm. But since -rv switches foreground and background, it should switch the background mode too from light to dark on xterm. > . 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 For frames with undefined backgrounds it reuses the background mode specified with set-background-color. Is it right? > . 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 This works. > Finally, could you please elaborate on your analysis of this issue; in > particular, where is this handled on X? On X this is handled in `if (EQ (param, Qbackground_color))' condition in update_face_from_frame_parameter(xfaces.c) which is reached from Fmodify_frame_parameters thru the following function calls: update_face_from_frame_parameter at xfaces.c:4490 x_set_background_color at xfns.c:911 x_set_frame_parameters at frame.c:2738 Fmodify_frame_parameters at frame.c:2280 Finternal_set_lisp_face_attribute at xfaces.c:4434 But on tty it doesn't go past the function Fmodify_frame_parameters due to the condition `if (FRAME_WINDOW_P (f))'. The explicit call to `Qframe_update_face_colors' I added in Fmodify_frame_parameters is on the else-branch of this condition. -- Juri Linkov http://www.jurta.org/emacs/