changeset 66596:56a63119fa20

(face-attribute): Handle the case where a face inherits from a non-existent face.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 01 Nov 2005 07:19:07 +0000
parents 1d442f601f13
children 4944ad66d9a3
files lisp/faces.el
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/faces.el	Tue Nov 01 07:18:10 2005 +0000
+++ b/lisp/faces.el	Tue Nov 01 07:19:07 2005 +0000
@@ -374,8 +374,11 @@
       ;; 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))