[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: infinite loop when customizing default face

From: Ryan Shaw
Subject: Re: infinite loop when customizing default face
Date: 31 May 2002 16:38:45 +0900

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: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]