From: Ryan Shaw <ryan.shaw@stanfordalumni.org>
Cc: bug-gnu-emacs@gnu.org, eliz@is.elta.co.il
Subject: Re: infinite loop when customizing default face
Date: 31 May 2002 16:38:45 +0900 [thread overview]
Message-ID: <1022830726.5281.25.camel@momo> (raw)
In-Reply-To: <200205310706.g4V761b14723@aztec.santafe.edu>
[-- Attachment #1: Type: text/plain, Size: 1620 bytes --]
Yes, that fixes it nicely. Thank you very much.
On Fri, 2002-05-31 at 16:06, Richard Stallman wrote:
> 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))))))
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2002-05-31 7:38 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
2002-05-31 7:38 ` Ryan Shaw [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1022830726.5281.25.camel@momo \
--to=ryan.shaw@stanfordalumni.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).