comparison lisp/faces.el @ 48522:70e8f2b6672e

(face-set-after-frame-default): Ignore errors in face-spec-face-set.
author Richard M. Stallman <rms@gnu.org>
date Sun, 24 Nov 2002 18:59:08 +0000
parents 86c1fc3c48f5
children a91fa6973510
comparison
equal deleted inserted replaced
48521:e8d332923257 48522:70e8f2b6672e
1667 1667
1668 1668
1669 (defun face-set-after-frame-default (frame) 1669 (defun face-set-after-frame-default (frame)
1670 "Set frame-local faces of FRAME from face specs and resources. 1670 "Set frame-local faces of FRAME from face specs and resources.
1671 Initialize colors of certain faces from frame parameters." 1671 Initialize colors of certain faces from frame parameters."
1672 ;; Don't let frame creation fail because of an invalid face spec.
1672 (dolist (face (face-list)) 1673 (dolist (face (face-list))
1673 (when (not (equal face 'default)) 1674 (condition-case ()
1674 (face-spec-set face (face-user-default-spec face) frame) 1675 (when (not (equal face 'default))
1675 (internal-merge-in-global-face face frame) 1676 (face-spec-set face (face-user-default-spec face) frame)
1676 (when (and (memq window-system '(x w32 mac)) 1677 (internal-merge-in-global-face face frame)
1677 (or (not (boundp 'inhibit-default-face-x-resources)) 1678 (when (and (memq window-system '(x w32 mac))
1678 (not (eq face 'default)))) 1679 (or (not (boundp 'inhibit-default-face-x-resources))
1679 (make-face-x-resource-internal face frame)))) 1680 (not (eq face 'default))))
1680 1681 (make-face-x-resource-internal face frame)))
1682 (error nil)))
1681 ;; Initialize attributes from frame parameters. 1683 ;; Initialize attributes from frame parameters.
1682 (let ((params '((foreground-color default :foreground) 1684 (let ((params '((foreground-color default :foreground)
1683 (background-color default :background) 1685 (background-color default :background)
1684 (border-color border :background) 1686 (border-color border :background)
1685 (cursor-color cursor :background) 1687 (cursor-color cursor :background)