From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Faces applies to new frames Date: Thu, 26 Jun 2008 22:43:12 -0400 Message-ID: <87prq3k37j.fsf@stupidchicken.com> References: <87k5gbx12n.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1214534615 17348 80.91.229.12 (27 Jun 2008 02:43:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Jun 2008 02:43:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 27 04:44:20 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KC3we-0002ig-4m for ged-emacs-devel@m.gmane.org; Fri, 27 Jun 2008 04:44:16 +0200 Original-Received: from localhost ([127.0.0.1]:50788 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KC3vo-00070T-Ei for ged-emacs-devel@m.gmane.org; Thu, 26 Jun 2008 22:43:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KC3vk-00070O-SB for emacs-devel@gnu.org; Thu, 26 Jun 2008 22:43:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KC3vi-00070C-9u for emacs-devel@gnu.org; Thu, 26 Jun 2008 22:43:19 -0400 Original-Received: from [199.232.76.173] (port=48545 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KC3vi-000709-56 for emacs-devel@gnu.org; Thu, 26 Jun 2008 22:43:18 -0400 Original-Received: from c-24-63-201-57.hsd1.ma.comcast.net ([24.63.201.57]:11281 helo=furry) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KC3vh-0006Qd-W7 for emacs-devel@gnu.org; Thu, 26 Jun 2008 22:43:18 -0400 Original-Received: by furry (Postfix, from userid 1000) id 3A4B5C054; Thu, 26 Jun 2008 22:43:12 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Thu, 26 Jun 2008 21:28:48 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:99992 Archived-At: Stefan Monnier writes: >> AFAICT, the problem is that the default face is controlled by the `font' >> frame parameter, but this is not saved to default-frame-alist by >> internal-set-lisp-face-attribute. In comparison, the foreground-color > > I'm not convinced this is the root of the problem. For one, by default > there is no `font' parameter in default-frame-alist, so as long as we > leave it that way, it should not affect face settings. The code in > face-set-after-frame-default should apply the defface-spec to every > new frame, so we shouldn't need any entry in default-frame-alist for it > to apply to new frames. The face-set-after-frame-default used to skip > `default', so that was an important reason for the bug#47. I've fixed > this part, but there are other weird things going on (I have some other > weird problems here where X resources are obeyed even after I remove > the calls to `make-face-x-resource-internal'). Maybe there's more than one bug here. When set-face-attribute is called with a nil FRAME argument, that changes the face for all frames, and this is done via frame parameters and not by changing the defface spec. I don't think face-set-after-frame-default is even relevant to this case. >From looking inside internal-set-lisp-face-attribute, it seems that the face for future frames is changed by changing the frame parameters `foreground', `background', etc. The `font' parameter is changed for each existing frame (xfaces.c:3411), but nothing is saved in default-frame-alist.