]> git.eshelyaron.com Git - emacs.git/commitdiff
(face-attribute): Handle the case where a face inherits from
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 1 Nov 2005 07:19:07 +0000 (07:19 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 1 Nov 2005 07:19:07 +0000 (07:19 +0000)
a non-existent face.

lisp/faces.el

index 81a6a953aa522f92cb71b609179dda587c885310..8ca9e40d7d224573bae6d45ad4ccd7d0fd5bed1c 100644 (file)
@@ -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))