Browse Source

Fix face inheritance problem for Emacs 22

Carsten Dominik 16 years ago
parent
commit
c3b24f1c19
1 changed files with 5 additions and 1 deletions
  1. 5 1
      lisp/org-compat.el

+ 5 - 1
lisp/org-compat.el

@@ -55,10 +55,14 @@ to the top of the list.  The `min-colors' attribute will be removed from
 any other entries, and any resulting duplicates will be removed entirely."
 any other entries, and any resulting duplicates will be removed entirely."
   (cond
   (cond
    ((and inherits (facep inherits)
    ((and inherits (facep inherits)
-	 (not (featurep 'xemacs)) (> emacs-major-version 22))
+	 (not (featurep 'xemacs))
+	 (or (> emacs-major-version 22)
+	     (not specs)))
     ;; In Emacs 23, we use inheritance where possible.
     ;; In Emacs 23, we use inheritance where possible.
     ;; We only do this in Emacs 23, because only there the outline
     ;; We only do this in Emacs 23, because only there the outline
     ;; faces have been changed to the original org-mode-level-faces.
     ;; faces have been changed to the original org-mode-level-faces.
+    ;; However, if no face specification is present, we also use
+    ;; inheritance in Emacs 22
     (list (list t :inherit inherits)))
     (list (list t :inherit inherits)))
    ((or (featurep 'xemacs) (< emacs-major-version 22))
    ((or (featurep 'xemacs) (< emacs-major-version 22))
     ;; These do not understand the `min-colors' attribute.
     ;; These do not understand the `min-colors' attribute.