aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/faces.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2002-11-24 18:59:08 +0000
committerRichard M. Stallman <[email protected]>2002-11-24 18:59:08 +0000
commitebfa5c375edc2ad19a0d3eab60d8ab8f2c682d61 (patch)
treed0bff01a5ee3a2de0ca4e2c1aa6072ddeb22129d /lisp/faces.el
parentb5188bcde8280375a922492f04a472ebeb4aa466 (diff)
(face-set-after-frame-default): Ignore errors in face-spec-face-set.
Diffstat (limited to 'lisp/faces.el')
-rw-r--r--lisp/faces.el18
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index f721ac0a7e..028ea671bd 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1669,15 +1669,17 @@ Value is the new frame created."
(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."
+ ;; Don't let frame creation fail because of an invalid face spec.
(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))))
-
+ (condition-case ()
+ (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)))
+ (error nil)))
;; Initialize attributes from frame parameters.
(let ((params '((foreground-color default :foreground)
(background-color default :background)