diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 27f9c3b7b..5adf59863 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2009-06-02 Carsten Dominik + * org-compat.el (org-compatible-face): Improve macro. + * org.el (org-global-properties-fixed): Add default for CLOCK_MODELINE_TOTAL. diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 082eaac79..5d26727c6 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -48,21 +48,25 @@ (defun org-compatible-face (inherits specs) "Make a compatible face specification. If INHERITS is an existing face and if the Emacs version supports it, -just inherit the face. If not, use SPECS to define the face. +just inherit the face. If INHERITS is set and the Emacs version does +not support it, copy the face specification from the inheritance face. +If INHERITS is not given and SPECS is, use SPECS to define the face. XEmacs and Emacs 21 do not know about the `min-colors' attribute. For them we convert a (min-colors 8) entry to a `tty' entry and move it 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." + (when (and inherits (facep inherits) (not specs)) + (setq specs (or specs + (get inherits 'saved-face) + (get inherits 'face-defface-spec)))) (cond ((and inherits (facep inherits) (not (featurep 'xemacs)) - (or (> emacs-major-version 22) - (not specs))) - ;; In Emacs 23, we use inheritance where possible. - ;; We only do this in Emacs 23, because only there the outline - ;; 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 + (>= emacs-major-version 22) + ;; do not inherit outline faces before Emacs 23 + (or (>= emacs-major-version 23) + (not (string-match "\\`outline-[0-9]+" + (symbol-name inherits))))) (list (list t :inherit inherits))) ((or (featurep 'xemacs) (< emacs-major-version 22)) ;; These do not understand the `min-colors' attribute.