From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Bug#203005: emacs21: Emacs21 does not honor customized default Date: 11 Dec 2003 19:01:15 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20031211123753.GA21204@xanadu.int.undue.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1071162225 13412 80.91.224.253 (11 Dec 2003 17:03:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Dec 2003 17:03:45 +0000 (UTC) Cc: 203005@bugs.debian.org, emacs-devel@gnu.org, shawn@willden.org, rms@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Dec 11 18:03:34 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AUUDu-0006oO-00 for ; Thu, 11 Dec 2003 18:03:34 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AUUDt-0004VC-00 for ; Thu, 11 Dec 2003 18:03:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AUVAj-0005KN-Ja for emacs-devel@quimby.gnus.org; Thu, 11 Dec 2003 13:04:21 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AUV9q-00055D-L3 for emacs-devel@gnu.org; Thu, 11 Dec 2003 13:03:26 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AUV7I-0003G0-JP for emacs-devel@gnu.org; Thu, 11 Dec 2003 13:01:19 -0500 Original-Received: from [207.232.27.5] (helo=WST0054) by monty-python.gnu.org with asmtp (Exim 4.24) id 1AUV7F-00034Q-Dp; Thu, 11 Dec 2003 13:00:45 -0500 Original-To: Matt Kern In-reply-to: <20031211123753.GA21204@xanadu.int.undue.org> (message from Matt Kern on Thu, 11 Dec 2003 12:37:53 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:18640 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18640 > Date: Thu, 11 Dec 2003 12:37:53 +0000 > From: Matt Kern > > +2002-05-31 Eli Zaretskii > + > + * faces.el (face-set-after-frame-default): Don't change `default' face. > > I am not sure why this change has been made. Presumably the default > face is supposed to be inherited or set elsewhere? > > Can you shed some light on it, Eli? You are asking me to remember the reason for a 1-line change 18 months after I've made that change. It's not easy, but I'll try. This change appears in CVS HEAD on a different date (2001-12-30) and was made there by Richard Stallman (CC'ed). So I'm guessing that at a later date Richard asked me to make the same change on the 21.3 release branch, which I did. Perhaps Richard remembers the reason for the original change. Anyway, the CVS HEAD code includes an additional fragment in face-set-after-frame-default, which the 21.3 version doesn't seem to have. I attached face-set-after-frame-default from CVS at the end of this message; note the first part of it which deals specifically with setting up the `default' face. So I'd suggest to insert that initial code fragment into 21.3's version of the function and see if that solves the problem. I don't remember the details, but my vague recollection is that we skipped the default face for some good reason. HTH =================================================================== (defun face-set-after-frame-default (frame) "Set frame-local faces of FRAME from face specs and resources. Initialize colors of certain faces from frame parameters." (if (face-attribute 'default :font t) (set-face-attribute 'default frame :font (face-attribute 'default :font t)) (set-face-attribute 'default frame :family (face-attribute 'default :family t)) (set-face-attribute 'default frame :height (face-attribute 'default :height t)) (set-face-attribute 'default frame :slant (face-attribute 'default :slant t)) (set-face-attribute 'default frame :weight (face-attribute 'default :weight t)) (set-face-attribute 'default frame :width (face-attribute 'default :width t))) (dolist (face (face-list)) ;; Don't let frame creation fail because of an invalid face spec. (condition-case () (when (not (equal face 'default)) (face-spec-set face (face-user-default-spec face) frame) (internal-merge-in-global-face face frame) (when (and (memq window-system '(x w32 mac)) (or (not (boundp 'inhibit-default-face-x-resources)) (not (eq face 'default)))) (make-face-x-resource-internal face frame))) (error nil))) ;; Initialize attributes from frame parameters. (let ((params '((foreground-color default :foreground) (background-color default :background) (border-color border :background) (cursor-color cursor :background) (scroll-bar-foreground scroll-bar :foreground) (scroll-bar-background scroll-bar :background) (mouse-color mouse :background)))) (dolist (param params) (let ((frame-param (frame-parameter frame (nth 0 param))) (face (nth 1 param)) (attr (nth 2 param))) (when (and frame-param ;; Don't override face attributes explicitly ;; specified for new frames. (eq (face-attribute face attr t) 'unspecified)) (set-face-attribute face frame attr frame-param))))))