all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: bug-gnu-emacs@gnu.org, eliz@is.elta.co.il
Subject: Re: infinite loop when customizing default face
Date: Fri, 31 May 2002 01:06:01 -0600 (MDT)	[thread overview]
Message-ID: <200205310706.g4V761b14723@aztec.santafe.edu> (raw)
In-Reply-To: <1022745113.5366.17.camel@momo> (message from Ryan Shaw on 30 May 2002 16:51:53 +0900)

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))))))

  reply	other threads:[~2002-05-31  7:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-30  7:51 infinite loop when customizing default face Ryan Shaw
2002-05-31  7:06 ` Richard Stallman [this message]
2002-05-31  7:38   ` Ryan Shaw
2002-05-31 16:27     ` infinite loop in tcl for ESC q fill-paragraph Sam Sirlin
2002-05-31 17:20   ` infinite loop when customizing default face Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200205310706.g4V761b14723@aztec.santafe.edu \
    --to=rms@gnu.org \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=eliz@is.elta.co.il \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.