From 621e71ee736bd205fc7be46ee62bdb7fcea7b88c Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 1 Nov 2005 07:19:07 +0000 Subject: [PATCH] (face-attribute): Handle the case where a face inherits from a non-existent face. --- lisp/faces.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/faces.el b/lisp/faces.el index 81a6a953aa5..8ca9e40d7d2 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -374,8 +374,11 @@ completely specified)." ;; VALUE is relative, so merge with inherited faces (let ((inh-from (face-attribute face :inherit frame))) (unless (or (null inh-from) (eq inh-from 'unspecified)) - (setq value - (face-attribute-merged-with attribute value inh-from frame))))) + (condition-case nil + (setq value + (face-attribute-merged-with attribute value inh-from frame)) + ;; The `inherit' attribute may point to non existent faces. + (error nil))))) (when (and inherit (not (eq inherit t)) (face-attribute-relative-p attribute value)) -- 2.39.5