From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.bugs Subject: Re: infinite loop when customizing default face Date: Fri, 31 May 2002 01:06:01 -0600 (MDT) Sender: bug-gnu-emacs-admin@gnu.org Message-ID: <200205310706.g4V761b14723@aztec.santafe.edu> References: <1022745113.5366.17.camel@momo> Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1022828923 15359 127.0.0.1 (31 May 2002 07:08:43 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 31 May 2002 07:08:43 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, eliz@is.elta.co.il Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17DgWh-0003zb-00 for ; Fri, 31 May 2002 09:08:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17DgXS-0004wG-00; Fri, 31 May 2002 03:09:30 -0400 Original-Received: from pele.santafe.edu ([192.12.12.119]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17DgU6-0004dU-00; Fri, 31 May 2002 03:06:02 -0400 Original-Received: from aztec.santafe.edu (aztec [192.12.12.49]) by pele.santafe.edu (8.11.6+Sun/8.11.6) with ESMTP id g4V761V24099; Fri, 31 May 2002 01:06:01 -0600 (MDT) Original-Received: (from rms@localhost) by aztec.santafe.edu (8.10.2+Sun/8.9.3) id g4V761b14723; Fri, 31 May 2002 01:06:01 -0600 (MDT) X-Authentication-Warning: aztec.santafe.edu: rms set sender to rms@aztec using -f Original-To: ryan.shaw@stanfordalumni.org In-Reply-To: <1022745113.5366.17.camel@momo> (message from Ryan Shaw on 30 May 2002 16:51:53 +0900) Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:1718 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:1718 I recognize this as a bug I fixed in the past couple of months. Does this replacement function fix it? (Eli, could you put this fix into RC?) (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." (dolist (face (face-list)) (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)))) ;; 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))))))