浏览代码

org-faces: Simplify face definitions

* lisp/org-faces.el (org-default):
(org-level-1):
(org-level-2):
(org-level-3):
(org-level-4):
(org-level-5):
(org-level-6):
(org-level-7):
(org-level-8):
(org-special-keyword):
(org-drawer):
(org-column):
(org-column-title):
(org-agenda-column-dateline):
(org-warning):
(org-archived):
(org-link):
(org-date-selected):
(org-todo):
(org-done):
(org-agenda-done):
(org-headline-done):
(org-priority):
(org-table):
(org-formula):
(org-code):
(org-meta-line):
(org-document-info-keyword):
(org-block):
(org-verbatim):
(org-clock-overlay):
(org-agenda-structure):
(org-agenda-clocking):
(org-agenda-date-weekend):
(org-scheduled):
(org-scheduled-today):
(org-scheduled-previously):
(org-upcoming-deadline):
(org-agenda-restriction-lock):
(org-agenda-filter-tags):
(org-agenda-filter-regexp):
(org-agenda-filter-category):
(org-time-grid):
(org-agenda-diary):
(org-agenda-calendar-event):
(org-agenda-calendar-sexp):
(org-macro):
(org-tag-group): Eschew `org-compatible-face' usage.

Also use lexical binding.
Nicolas Goaziou 9 年之前
父节点
当前提交
e2bff4bbc0
共有 1 个文件被更改,包括 155 次插入312 次删除
  1. 155 312
      lisp/org-faces.el

+ 155 - 312
lisp/org-faces.el

@@ -1,4 +1,4 @@
-;;; org-faces.el --- Face definitions for Org-mode.
+;;; org-faces.el --- Face definitions -*- lexical-binding: t; -*-
 
 
 ;; Copyright (C) 2004-2016 Free Software Foundation, Inc.
 ;; Copyright (C) 2004-2016 Free Software Foundation, Inc.
 
 
@@ -28,16 +28,12 @@
 
 
 ;;; Code:
 ;;; Code:
 
 
-(require 'org-macs)
-(require 'org-compat)
-
 (defgroup org-faces nil
 (defgroup org-faces nil
-  "Faces in Org-mode."
+  "Faces in Org mode."
   :tag "Org Faces"
   :tag "Org Faces"
   :group 'org-appearance)
   :group 'org-appearance)
 
 
-(defface org-default
-  (org-compatible-face 'default nil)
+(defface org-default '((t :inherit default))
   "Face used for default text."
   "Face used for default text."
   :group 'org-faces)
   :group 'org-faces)
 
 
@@ -49,99 +45,49 @@ The foreground color of this face should be equal to the background
 color of the frame."
 color of the frame."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-level-1 ;; originally copied from font-lock-function-name-face
-  (org-compatible-face 'outline-1
-    '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
-      (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
-      (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
-      (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
-      (((class color) (min-colors 8)) (:foreground "blue" :bold t))
-      (t (:bold t))))
+(defface org-level-1 '((t :inherit outline-1))
   "Face used for level 1 headlines."
   "Face used for level 1 headlines."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-level-2 ;; originally copied from font-lock-variable-name-face
-  (org-compatible-face 'outline-2
-    '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
-      (((class color) (min-colors 16) (background dark))  (:foreground "LightGoldenrod"))
-      (((class color) (min-colors 8)  (background light)) (:foreground "yellow"))
-      (((class color) (min-colors 8)  (background dark))  (:foreground "yellow" :bold t))
-      (t (:bold t))))
+(defface org-level-2 '((t :inherit outline-2))
   "Face used for level 2 headlines."
   "Face used for level 2 headlines."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-level-3 ;; originally copied from font-lock-keyword-face
-  (org-compatible-face 'outline-3
-    '((((class color) (min-colors 88) (background light)) (:foreground "Purple"))
-      (((class color) (min-colors 88) (background dark))  (:foreground "Cyan1"))
-      (((class color) (min-colors 16) (background light)) (:foreground "Purple"))
-      (((class color) (min-colors 16) (background dark))  (:foreground "Cyan"))
-      (((class color) (min-colors 8)  (background light)) (:foreground "purple" :bold t))
-      (((class color) (min-colors 8)  (background dark))  (:foreground "cyan" :bold t))
-      (t (:bold t))))
+(defface org-level-3 '((t :inherit outline-3))
   "Face used for level 3 headlines."
   "Face used for level 3 headlines."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-level-4   ;; originally copied from font-lock-comment-face
-  (org-compatible-face 'outline-4
-    '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
-      (((class color) (min-colors 88) (background dark))  (:foreground "chocolate1"))
-      (((class color) (min-colors 16) (background light)) (:foreground "red"))
-      (((class color) (min-colors 16) (background dark))  (:foreground "red1"))
-      (((class color) (min-colors 8) (background light))  (:foreground "red" :bold t))
-      (((class color) (min-colors 8) (background dark))   (:foreground "red" :bold t))
-      (t (:bold t))))
+(defface org-level-4 '((t :inherit outline-4))
   "Face used for level 4 headlines."
   "Face used for level 4 headlines."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-level-5 ;; originally copied from font-lock-type-face
-  (org-compatible-face 'outline-5
-    '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
-      (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
-      (((class color) (min-colors 8)) (:foreground "green"))))
+(defface org-level-5 '((t :inherit outline-5))
   "Face used for level 5 headlines."
   "Face used for level 5 headlines."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-level-6 ;; originally copied from font-lock-constant-face
-  (org-compatible-face 'outline-6
-    '((((class color) (min-colors 16) (background light)) (:foreground "CadetBlue"))
-      (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine"))
-      (((class color) (min-colors 8)) (:foreground "magenta"))))
+(defface org-level-6 '((t :inherit outline-6))
   "Face used for level 6 headlines."
   "Face used for level 6 headlines."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-level-7 ;; originally copied from font-lock-builtin-face
-  (org-compatible-face 'outline-7
-    '((((class color) (min-colors 16) (background light)) (:foreground "Orchid"))
-      (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue"))
-      (((class color) (min-colors 8)) (:foreground "blue"))))
+(defface org-level-7 '((t :inherit outline-7))
   "Face used for level 7 headlines."
   "Face used for level 7 headlines."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-level-8 ;; originally copied from font-lock-string-face
-  (org-compatible-face 'outline-8
-    '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
-      (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
-      (((class color) (min-colors 8)) (:foreground "green"))))
+(defface org-level-8 '((t :inherit outline-8))
   "Face used for level 8 headlines."
   "Face used for level 8 headlines."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-special-keyword ;; originally copied from font-lock-string-face
-  (org-compatible-face 'font-lock-keyword-face
-    '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
-      (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
-      (t (:italic t))))
+(defface org-special-keyword '((t :inherit font-lock-keyword-face))
   "Face used for special keywords."
   "Face used for special keywords."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-drawer ;; originally copied from font-lock-function-name-face
-  (org-compatible-face nil
-    '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
-      (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
-      (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
-      (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
-      (((class color) (min-colors 8)) (:foreground "blue" :bold t))
-      (t (:bold t))))
+(defface org-drawer	   ;Copied from `font-lock-function-name-face'
+  '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
+    (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
+    (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
+    (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
+    (((class color) (min-colors 8)) (:foreground "blue" :bold t))
+    (t (:bold t)))
   "Face used for drawers."
   "Face used for drawers."
   :group 'org-faces)
   :group 'org-faces)
 
 
@@ -150,18 +96,17 @@ color of the frame."
   :group 'org-faces)
   :group 'org-faces)
 
 
 (defface org-column
 (defface org-column
-  (org-compatible-face nil
-    '((((class color) (min-colors 16) (background light))
-       (:background "grey90" :weight normal :slant normal :strike-through nil
-		    :underline nil))
-      (((class color) (min-colors 16) (background dark))
-       (:background "grey30" :weight normal :slant normal :strike-through nil
-		    :underline nil))
-      (((class color) (min-colors 8))
-       (:background "cyan" :foreground "black"
-		    :weight normal :slant normal :strike-through nil
-		    :underline nil))
-      (t (:inverse-video t))))
+  '((((class color) (min-colors 16) (background light))
+     (:background "grey90" :weight normal :slant normal :strike-through nil
+		  :underline nil))
+    (((class color) (min-colors 16) (background dark))
+     (:background "grey30" :weight normal :slant normal :strike-through nil
+		  :underline nil))
+    (((class color) (min-colors 8))
+     (:background "cyan" :foreground "black"
+		  :weight normal :slant normal :strike-through nil
+		  :underline nil))
+    (t (:inverse-video t)))
   "Face for column display of entry properties.
   "Face for column display of entry properties.
 This is actually only part of the face definition for the text in column view.
 This is actually only part of the face definition for the text in column view.
 The following faces apply, with this priority.
 The following faces apply, with this priority.
@@ -186,51 +131,29 @@ set the properties in the `org-column' face.  For example, set
   :group 'org-faces)
   :group 'org-faces)
 
 
 (defface org-column-title
 (defface org-column-title
-  (org-compatible-face nil
-    '((((class color) (min-colors 16) (background light))
-       (:background "grey90" :underline t :weight bold))
-      (((class color) (min-colors 16) (background dark))
-       (:background "grey30" :underline t :weight bold))
-      (((class color) (min-colors 8))
-       (:background "cyan" :foreground "black" :underline t :weight bold))
-      (t (:inverse-video t))))
+  '((((class color) (min-colors 16) (background light))
+     (:background "grey90" :underline t :weight bold))
+    (((class color) (min-colors 16) (background dark))
+     (:background "grey30" :underline t :weight bold))
+    (((class color) (min-colors 8))
+     (:background "cyan" :foreground "black" :underline t :weight bold))
+    (t (:inverse-video t)))
   "Face for column display of entry properties."
   "Face for column display of entry properties."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-agenda-column-dateline
-  (org-compatible-face 'org-column
-    '((t nil)))
+(defface org-agenda-column-dateline '((t :inherit org-column))
   "Face used in agenda column view for datelines with summaries."
   "Face used in agenda column view for datelines with summaries."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-warning
-  (org-compatible-face 'font-lock-warning-face
-    '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
-      (((class color) (min-colors 16) (background dark))  (:foreground "Pink" :bold t))
-      (((class color) (min-colors 8)  (background light)) (:foreground "red"  :bold t))
-      (((class color) (min-colors 8)  (background dark))  (:foreground "red"  :bold t))
-      (t (:bold t))))
+(defface org-warning '((t :inherit font-lock-warning-face))
   "Face for deadlines and TODO keywords."
   "Face for deadlines and TODO keywords."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-archived    ; similar to shadow
-  (org-compatible-face 'shadow
-    '((((class color grayscale) (min-colors 88) (background light))
-       (:foreground "grey50"))
-      (((class color grayscale) (min-colors 88) (background dark))
-       (:foreground "grey70"))
-      (((class color) (min-colors 8) (background light))
-       (:foreground "green"))
-      (((class color) (min-colors 8) (background dark))
-       (:foreground "yellow"))))
+(defface org-archived '((t :inherit shadow))
   "Face for headline with the ARCHIVE tag."
   "Face for headline with the ARCHIVE tag."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-link
-  (org-compatible-face 'link
-    '((((class color) (background light)) (:foreground "Purple" :underline t))
-      (((class color) (background dark)) (:foreground "Cyan" :underline t))
-      (t (:underline t))))
+(defface org-link '((t :inherit link))
   "Face for links."
   "Face for links."
   :group 'org-faces)
   :group 'org-faces)
 
 
@@ -263,12 +186,11 @@ set the properties in the `org-column' face.  For example, set
   :group 'org-faces)
   :group 'org-faces)
 
 
 (defface org-date-selected
 (defface org-date-selected
-  (org-compatible-face nil
-    '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :inverse-video t))
-      (((class color) (min-colors 16) (background dark))  (:foreground "Pink" :inverse-video t))
-      (((class color) (min-colors 8)  (background light)) (:foreground "red"  :inverse-video t))
-      (((class color) (min-colors 8)  (background dark))  (:foreground "red"  :inverse-video t))
-      (t (:inverse-video t))))
+  '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :inverse-video t))
+    (((class color) (min-colors 16) (background dark))  (:foreground "Pink" :inverse-video t))
+    (((class color) (min-colors 8)  (background light)) (:foreground "red"  :inverse-video t))
+    (((class color) (min-colors 8)  (background dark))  (:foreground "red"  :inverse-video t))
+    (t (:inverse-video t)))
   "Face for highlighting the calendar day when using `org-read-date'.
   "Face for highlighting the calendar day when using `org-read-date'.
 Using a bold face here might cause discrepancies while displaying the
 Using a bold face here might cause discrepancies while displaying the
 calendar."
 calendar."
@@ -281,43 +203,38 @@ calendar."
   "Face for diary-like sexp date specifications."
   "Face for diary-like sexp date specifications."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-tag
-  '((t (:bold t)))
+(defface org-tag '((t (:bold t)))
   "Default face for tags.
   "Default face for tags.
 Note that the variable `org-tag-faces' can be used to overrule this face for
 Note that the variable `org-tag-faces' can be used to overrule this face for
 specific tags."
 specific tags."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-list-dt
-  '((t (:bold t)))
+(defface org-list-dt '((t (:bold t)))
   "Default face for definition terms in lists."
   "Default face for definition terms in lists."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-todo ; font-lock-warning-face
-  (org-compatible-face nil
-    '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
-      (((class color) (min-colors 16) (background dark))  (:foreground "Pink" :bold t))
-      (((class color) (min-colors 8)  (background light)) (:foreground "red"  :bold t))
-      (((class color) (min-colors 8)  (background dark))  (:foreground "red"  :bold t))
-      (t (:inverse-video t :bold t))))
+(defface org-todo		 ;Copied from `font-lock-warning-face'
+  '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
+    (((class color) (min-colors 16) (background dark))  (:foreground "Pink" :bold t))
+    (((class color) (min-colors 8)  (background light)) (:foreground "red"  :bold t))
+    (((class color) (min-colors 8)  (background dark))  (:foreground "red"  :bold t))
+    (t (:inverse-video t :bold t)))
   "Face for TODO keywords."
   "Face for TODO keywords."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-done ;; originally copied from font-lock-type-face
-  (org-compatible-face nil
-    '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen" :bold t))
-      (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen" :bold t))
-      (((class color) (min-colors 8)) (:foreground "green"))
-      (t (:bold t))))
+(defface org-done		    ;Copied from `font-lock-type-face'
+  '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen" :bold t))
+    (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen" :bold t))
+    (((class color) (min-colors 8)) (:foreground "green"))
+    (t (:bold t)))
   "Face used for todo keywords that indicate DONE items."
   "Face used for todo keywords that indicate DONE items."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-agenda-done ;; originally copied from font-lock-type-face
-  (org-compatible-face nil
-    '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
-      (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
-      (((class color) (min-colors 8)) (:foreground "green"))
-      (t (:bold nil))))
+(defface org-agenda-done	    ;Copied from `font-lock-type-face'
+  '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
+    (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
+    (((class color) (min-colors 8)) (:foreground "green"))
+    (t (:bold nil)))
   "Face used in agenda, to indicate lines switched to DONE.
   "Face used in agenda, to indicate lines switched to DONE.
 This face is used to de-emphasize items that where brightly colored in the
 This face is used to de-emphasize items that where brightly colored in the
 agenda because they were things to do, or overdue.  The DONE state itself
 agenda because they were things to do, or overdue.  The DONE state itself
@@ -326,11 +243,10 @@ is of course immediately visible, but for example a passed deadline is
 of the frame, for example."
 of the frame, for example."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-headline-done ;; originally copied from font-lock-string-face
-  (org-compatible-face nil
-    '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
-      (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
-      (((class color) (min-colors 8)  (background light)) (:bold nil))))
+(defface org-headline-done	  ;Copied from `font-lock-string-face'
+  '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
+    (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
+    (((class color) (min-colors 8)  (background light)) (:bold nil)))
   "Face used to indicate that a headline is DONE.
   "Face used to indicate that a headline is DONE.
 This face is only used if `org-fontify-done-headline' is set.  If applies
 This face is only used if `org-fontify-done-headline' is set.  If applies
 to the part of the headline after the DONE keyword."
 to the part of the headline after the DONE keyword."
@@ -368,11 +284,7 @@ determines if it is a foreground or a background color."
 		   (string :tag "Color")
 		   (string :tag "Color")
 		   (sexp :tag "Face")))))
 		   (sexp :tag "Face")))))
 
 
-(defface org-priority ;; originally copied from font-lock-string-face
-  (org-compatible-face 'font-lock-keyword-face
-    '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
-      (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
-      (t (:italic t))))
+(defface org-priority '((t :inherit font-lock-keyword-face))
   "Face used for priority cookies."
   "Face used for priority cookies."
   :group 'org-faces)
   :group 'org-faces)
 
 
@@ -401,19 +313,15 @@ determines if it is a foreground or a background color."
     (setq org-tags-special-faces-re
     (setq org-tags-special-faces-re
 	  (concat ":\\(" (mapconcat 'car value "\\|") "\\):"))))
 	  (concat ":\\(" (mapconcat 'car value "\\|") "\\):"))))
 
 
-(defface org-checkbox
-  (org-compatible-face 'bold
-    '((t (:bold t))))
+(defface org-checkbox '((t :inherit bold))
   "Face for checkboxes."
   "Face for checkboxes."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-checkbox-statistics-todo
-  '((t (:inherit org-todo)))
+(defface org-checkbox-statistics-todo '((t (:inherit org-todo)))
   "Face used for unfinished checkbox statistics."
   "Face used for unfinished checkbox statistics."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-checkbox-statistics-done
-  '((t (:inherit org-done)))
+(defface org-checkbox-statistics-done '((t (:inherit org-done)))
   "Face used for finished checkbox statistics."
   "Face used for finished checkbox statistics."
   :group 'org-faces)
   :group 'org-faces)
 
 
@@ -437,43 +345,31 @@ changes."
 		   (string :tag "Foreground color")
 		   (string :tag "Foreground color")
 		   (sexp :tag "Face")))))
 		   (sexp :tag "Face")))))
 
 
-(defface org-table ;; originally copied from font-lock-function-name-face
-  (org-compatible-face nil
-    '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
-      (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
-      (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
-      (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
-      (((class color) (min-colors 8)  (background light)) (:foreground "blue"))
-      (((class color) (min-colors 8)  (background dark)))))
+(defface org-table	   ;Copied from `font-lock-function-name-face'
+  '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
+    (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
+    (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
+    (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
+    (((class color) (min-colors 8)  (background light)) (:foreground "blue"))
+    (((class color) (min-colors 8)  (background dark))))
   "Face used for tables."
   "Face used for tables."
   :group 'org-faces)
   :group 'org-faces)
 
 
 (defface org-formula
 (defface org-formula
-  (org-compatible-face nil
-    '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
-      (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
-      (((class color) (min-colors 8)  (background light)) (:foreground "red"))
-      (((class color) (min-colors 8)  (background dark)) (:foreground "red"))
-      (t (:bold t :italic t))))
+  '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
+    (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
+    (((class color) (min-colors 8)  (background light)) (:foreground "red"))
+    (((class color) (min-colors 8)  (background dark)) (:foreground "red"))
+    (t (:bold t :italic t)))
   "Face for formulas."
   "Face for formulas."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-code
-  (org-compatible-face 'shadow
-    '((((class color grayscale) (min-colors 88) (background light))
-       (:foreground "grey50"))
-      (((class color grayscale) (min-colors 88) (background dark))
-       (:foreground "grey70"))
-      (((class color) (min-colors 8) (background light))
-       (:foreground "green"))
-      (((class color) (min-colors 8) (background dark))
-       (:foreground "yellow"))))
+(defface org-code '((t :inherit shadow))
   "Face for fixed-width text like code snippets."
   "Face for fixed-width text like code snippets."
   :group 'org-faces
   :group 'org-faces
   :version "22.1")
   :version "22.1")
 
 
-(defface org-meta-line
-  (org-compatible-face 'font-lock-comment-face nil)
+(defface org-meta-line '((t :inherit font-lock-comment-face))
   "Face for meta lines starting with \"#+\"."
   "Face for meta lines starting with \"#+\"."
   :group 'org-faces
   :group 'org-faces
   :version "22.1")
   :version "22.1")
@@ -493,29 +389,11 @@ changes."
 follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword."
 follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-document-info-keyword
-  (org-compatible-face 'shadow
-    '((((class color grayscale) (min-colors 88) (background light))
-       (:foreground "grey50"))
-      (((class color grayscale) (min-colors 88) (background dark))
-       (:foreground "grey70"))
-      (((class color) (min-colors 8) (background light))
-       (:foreground "green"))
-      (((class color) (min-colors 8) (background dark))
-       (:foreground "yellow"))))
+(defface org-document-info-keyword '((t :inherit shadow))
   "Face for #+TITLE:, #+AUTHOR:, #+EMAIL: and #+DATE: keywords."
   "Face for #+TITLE:, #+AUTHOR:, #+EMAIL: and #+DATE: keywords."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-block
-  (org-compatible-face 'shadow
-    '((((class color grayscale) (min-colors 88) (background light))
-       (:foreground "grey50"))
-      (((class color grayscale) (min-colors 88) (background dark))
-       (:foreground "grey70"))
-      (((class color) (min-colors 8) (background light))
-       (:foreground "green"))
-      (((class color) (min-colors 8) (background dark))
-       (:foreground "yellow"))))
+(defface org-block '((t :inherit shadow))
   "Face text in #+begin ... #+end blocks.
   "Face text in #+begin ... #+end blocks.
 In addition to this face that take precedence for particular
 In addition to this face that take precedence for particular
 languages.  For instance, to change the block face for Emacs-Lisp
 languages.  For instance, to change the block face for Emacs-Lisp
@@ -523,37 +401,24 @@ blocks define a `org-block-emacs-lisp' face."
   :group 'org-faces
   :group 'org-faces
   :version "22.1")
   :version "22.1")
 
 
-(defface org-block-begin-line
-  '((t (:inherit org-meta-line)))
+(defface org-block-begin-line '((t (:inherit org-meta-line)))
   "Face used for the line delimiting the begin of source blocks."
   "Face used for the line delimiting the begin of source blocks."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-block-end-line
-  '((t (:inherit org-block-begin-line)))
+(defface org-block-end-line '((t (:inherit org-block-begin-line)))
   "Face used for the line delimiting the end of source blocks."
   "Face used for the line delimiting the end of source blocks."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-verbatim
-  (org-compatible-face 'shadow
-    '((((class color grayscale) (min-colors 88) (background light))
-       (:foreground "grey50" :underline t))
-      (((class color grayscale) (min-colors 88) (background dark))
-       (:foreground "grey70" :underline t))
-      (((class color) (min-colors 8) (background light))
-       (:foreground "green" :underline t))
-      (((class color) (min-colors 8) (background dark))
-       (:foreground "yellow" :underline t))))
-  "Face for fixed-with text like code snippets."
+(defface org-verbatim '((t (:inherit shadow)))
+  "Face for fixed-with text like code snippets"
   :group 'org-faces
   :group 'org-faces
   :version "22.1")
   :version "22.1")
 
 
-(defface org-quote
-  '((t (:inherit org-block)))
+(defface org-quote '((t (:inherit org-block)))
   "Face for #+BEGIN_QUOTE ... #+END_QUOTE blocks."
   "Face for #+BEGIN_QUOTE ... #+END_QUOTE blocks."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-verse
-  '((t (:inherit org-block)))
+(defface org-verse '((t (:inherit org-block)))
   "Face for #+BEGIN_VERSE ... #+END_VERSE blocks."
   "Face for #+BEGIN_VERSE ... #+END_VERSE blocks."
   :group 'org-faces)
   :group 'org-faces)
 
 
@@ -565,35 +430,32 @@ content of these blocks will still be treated as Org syntax."
   :version "24.1"
   :version "24.1"
   :type 'boolean)
   :type 'boolean)
 
 
-(defface org-clock-overlay ;; copied from secondary-selection
-  (org-compatible-face nil
-    '((((class color) (min-colors 88) (background light))
-       (:background "LightGray" :foreground "black"))
-      (((class color) (min-colors 88) (background dark))
-       (:background "SkyBlue4" :foreground "white"))
-      (((class color) (min-colors 16) (background light))
-       (:background "gray" :foreground "black"))
-      (((class color) (min-colors 16) (background dark))
-       (:background "SkyBlue4" :foreground "white"))
-      (((class color) (min-colors 8))
-       (:background "cyan" :foreground "black"))
-      (t (:inverse-video t))))
+(defface org-clock-overlay	    ;Copied from `secondary-selection'
+  '((((class color) (min-colors 88) (background light))
+     (:background "LightGray" :foreground "black"))
+    (((class color) (min-colors 88) (background dark))
+     (:background "SkyBlue4" :foreground "white"))
+    (((class color) (min-colors 16) (background light))
+     (:background "gray" :foreground "black"))
+    (((class color) (min-colors 16) (background dark))
+     (:background "SkyBlue4" :foreground "white"))
+    (((class color) (min-colors 8))
+     (:background "cyan" :foreground "black"))
+    (t (:inverse-video t)))
   "Basic face for displaying the secondary selection."
   "Basic face for displaying the secondary selection."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-agenda-structure ;; originally copied from font-lock-function-name-face
-  (org-compatible-face nil
-    '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
-      (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
-      (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
-      (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
-      (((class color) (min-colors 8)) (:foreground "blue" :bold t))
-      (t (:bold t))))
+(defface org-agenda-structure ;Copied from `font-lock-function-name-face'
+  '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
+    (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
+    (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
+    (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
+    (((class color) (min-colors 8)) (:foreground "blue" :bold t))
+    (t (:bold t)))
   "Face used in agenda for captions and dates."
   "Face used in agenda for captions and dates."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-agenda-date
-  '((t (:inherit org-agenda-structure)))
+(defface org-agenda-date '((t (:inherit org-agenda-structure)))
   "Face used in agenda for normal days."
   "Face used in agenda for normal days."
   :group 'org-faces)
   :group 'org-faces)
 
 
@@ -602,13 +464,11 @@ content of these blocks will still be treated as Org syntax."
   "Face used in agenda for today."
   "Face used in agenda for today."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-agenda-clocking
-  '((t (:inherit secondary-selection)))
+(defface org-agenda-clocking '((t (:inherit secondary-selection)))
   "Face marking the current clock item in the agenda."
   "Face marking the current clock item in the agenda."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-agenda-date-weekend
-  '((t (:inherit org-agenda-date :weight bold)))
+(defface org-agenda-date-weekend '((t (:inherit org-agenda-date :weight bold)))
   "Face used in agenda for weekend days.
   "Face used in agenda for weekend days.
 
 
 See the variable `org-agenda-weekend-days' for a definition of
 See the variable `org-agenda-weekend-days' for a definition of
@@ -616,20 +476,18 @@ which days belong to the weekend."
   :group 'org-faces)
   :group 'org-faces)
 
 
 (defface org-scheduled
 (defface org-scheduled
-  (org-compatible-face nil
-    '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
-      (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
-      (((class color) (min-colors 8)) (:foreground "green"))
-      (t (:bold t :italic t))))
+  '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
+    (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
+    (((class color) (min-colors 8)) (:foreground "green"))
+    (t (:bold t :italic t)))
   "Face for items scheduled for a certain day."
   "Face for items scheduled for a certain day."
   :group 'org-faces)
   :group 'org-faces)
 
 
 (defface org-scheduled-today
 (defface org-scheduled-today
-  (org-compatible-face nil
-    '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
-      (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
-      (((class color) (min-colors 8)) (:foreground "green"))
-      (t (:bold t :italic t))))
+  '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
+    (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
+    (((class color) (min-colors 8)) (:foreground "green"))
+    (t (:bold t :italic t)))
   "Face for items scheduled for a certain day."
   "Face for items scheduled for a certain day."
   :group 'org-faces)
   :group 'org-faces)
 
 
@@ -640,22 +498,20 @@ which days belong to the weekend."
   :group 'org-faces)
   :group 'org-faces)
 
 
 (defface org-scheduled-previously
 (defface org-scheduled-previously
-  (org-compatible-face nil
-    '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
-      (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
-      (((class color) (min-colors 8)  (background light)) (:foreground "red"))
-      (((class color) (min-colors 8)  (background dark)) (:foreground "red" :bold t))
-      (t (:bold t))))
+  '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
+    (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
+    (((class color) (min-colors 8)  (background light)) (:foreground "red"))
+    (((class color) (min-colors 8)  (background dark)) (:foreground "red" :bold t))
+    (t (:bold t)))
   "Face for items scheduled previously, and not yet done."
   "Face for items scheduled previously, and not yet done."
   :group 'org-faces)
   :group 'org-faces)
 
 
 (defface org-upcoming-deadline
 (defface org-upcoming-deadline
-  (org-compatible-face nil
-    '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
-      (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
-      (((class color) (min-colors 8)  (background light)) (:foreground "red"))
-      (((class color) (min-colors 8)  (background dark)) (:foreground "red" :bold t))
-      (t (:bold t))))
+  '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
+    (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
+    (((class color) (min-colors 8)  (background light)) (:foreground "red"))
+    (((class color) (min-colors 8)  (background dark)) (:foreground "red" :bold t))
+    (t (:bold t)))
   "Face for items scheduled previously, and not yet done."
   "Face for items scheduled previously, and not yet done."
   :group 'org-faces)
   :group 'org-faces)
 
 
@@ -685,63 +541,53 @@ month and 365.24 days for a year)."
 	   (sexp :tag "Face"))))
 	   (sexp :tag "Face"))))
 
 
 (defface org-agenda-restriction-lock
 (defface org-agenda-restriction-lock
-  (org-compatible-face nil
-    '((((class color) (min-colors 88) (background light)) (:background "#eeeeee"))
-      (((class color) (min-colors 88) (background dark))  (:background "#1C1C1C"))
-      (((class color) (min-colors 16) (background light)) (:background "#eeeeee"))
-      (((class color) (min-colors 16) (background dark))  (:background "#1C1C1C"))
-      (((class color) (min-colors 8)) (:background "cyan" :foreground "black"))
-      (t (:inverse-video t))))
+  '((((class color) (min-colors 88) (background light)) (:background "#eeeeee"))
+    (((class color) (min-colors 88) (background dark))  (:background "#1C1C1C"))
+    (((class color) (min-colors 16) (background light)) (:background "#eeeeee"))
+    (((class color) (min-colors 16) (background dark))  (:background "#1C1C1C"))
+    (((class color) (min-colors 8)) (:background "cyan" :foreground "black"))
+    (t (:inverse-video t)))
   "Face for showing the agenda restriction lock."
   "Face for showing the agenda restriction lock."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-agenda-filter-tags
-  (org-compatible-face 'mode-line nil)
+(defface org-agenda-filter-tags '((t :inherit mode-line))
   "Face for tag(s) in the mode-line when filtering the agenda."
   "Face for tag(s) in the mode-line when filtering the agenda."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-agenda-filter-regexp
-  (org-compatible-face 'mode-line nil)
+(defface org-agenda-filter-regexp '((t :inherit mode-line))
   "Face for regexp(s) in the mode-line when filtering the agenda."
   "Face for regexp(s) in the mode-line when filtering the agenda."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-agenda-filter-category
-  (org-compatible-face 'mode-line nil)
+(defface org-agenda-filter-category '((t :inherit mode-line))
   "Face for categories(s) in the mode-line when filtering the agenda."
   "Face for categories(s) in the mode-line when filtering the agenda."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-time-grid ;; originally copied from font-lock-variable-name-face
-  (org-compatible-face nil
-    '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
-      (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
-      (((class color) (min-colors 8)) (:foreground "yellow" :weight light))))
+(defface org-time-grid	   ;Copied from `font-lock-variable-name-face'
+  '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
+    (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
+    (((class color) (min-colors 8)) (:foreground "yellow" :weight light)))
   "Face used for time grids."
   "Face used for time grids."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-agenda-current-time
-  '((t (:inherit org-time-grid)))
+(defface org-agenda-current-time '((t (:inherit org-time-grid)))
   "Face used to show the current time in the time grid."
   "Face used to show the current time in the time grid."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-agenda-diary
-  (org-compatible-face 'default nil)
+(defface org-agenda-diary '((t :inherit default))
   "Face used for agenda entries that come from the Emacs diary."
   "Face used for agenda entries that come from the Emacs diary."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-agenda-calendar-event
-  (org-compatible-face 'default nil)
+(defface org-agenda-calendar-event '((t :inherit default))
   "Face used to show events and appointments in the agenda."
   "Face used to show events and appointments in the agenda."
   :group 'org-faces)
   :group 'org-faces)
 
 
-(defface org-agenda-calendar-sexp
-  (org-compatible-face 'default nil)
+(defface org-agenda-calendar-sexp '((t :inherit default))
   "Face used to show events computed from a S-expression."
   "Face used to show events computed from a S-expression."
   :group 'org-faces)
   :group 'org-faces)
 
 
 (defconst org-level-faces
 (defconst org-level-faces
   '(org-level-1 org-level-2 org-level-3 org-level-4
   '(org-level-1 org-level-2 org-level-3 org-level-4
-		org-level-5 org-level-6 org-level-7 org-level-8
-		))
+		org-level-5 org-level-6 org-level-7 org-level-8))
 
 
 (defcustom org-n-level-faces (length org-level-faces)
 (defcustom org-n-level-faces (length org-level-faces)
   "The number of different faces to be used for headlines.
   "The number of different faces to be used for headlines.
@@ -778,22 +624,19 @@ level org-n-level-faces"
   :version "24.4"
   :version "24.4"
   :package-version '(Org . "8.0"))
   :package-version '(Org . "8.0"))
 
 
-(defface org-macro
-  (org-compatible-face 'org-latex-and-related nil)
+(defface org-macro '((t :inherit org-latex-and-related))
   "Face for macros."
   "Face for macros."
   :group 'org-faces
   :group 'org-faces
   :version "24.4"
   :version "24.4"
   :package-version '(Org . "8.0"))
   :package-version '(Org . "8.0"))
 
 
-(defface org-tag-group
-  (org-compatible-face 'org-tag nil)
+(defface org-tag-group '((t :inherit org-tag))
   "Face for group tags."
   "Face for group tags."
   :group 'org-faces
   :group 'org-faces
   :version "24.4"
   :version "24.4"
   :package-version '(Org . "8.0"))
   :package-version '(Org . "8.0"))
 
 
-(defface org-mode-line-clock
-  '((t (:inherit mode-line)))
+(defface org-mode-line-clock '((t (:inherit mode-line)))
   "Face used for clock display in mode line."
   "Face used for clock display in mode line."
   :group 'org-faces)
   :group 'org-faces)