diff options
Diffstat (limited to 'lisp/org-faces.el')
-rw-r--r-- | lisp/org-faces.el | 109 |
1 files changed, 59 insertions, 50 deletions
diff --git a/lisp/org-faces.el b/lisp/org-faces.el index f8625f1..36f810e 100644 --- a/lisp/org-faces.el +++ b/lisp/org-faces.el @@ -31,19 +31,6 @@ (require 'org-macs) (require 'org-compat) -(defun org-copy-face (old-face new-face docstring &rest attributes) - (unless (facep new-face) - (if (fboundp 'set-face-attribute) - (progn - (make-face new-face) - (set-face-attribute new-face nil :inherit old-face) - (apply 'set-face-attribute new-face nil attributes) - (set-face-doc-string new-face docstring)) - (copy-face old-face new-face) - (if (fboundp 'set-face-doc-string) - (set-face-doc-string new-face docstring))))) -(put 'org-copy-face 'lisp-indent-function 2) - (when (featurep 'xemacs) (put 'mode-line 'face-alias 'modeline)) @@ -427,12 +414,15 @@ determines if it is a foreground or a background color." "Face for checkboxes." :group 'org-faces) +(defface org-checkbox-statistics-todo + '((t (:inherit org-todo))) + "Face used for unfinished checkbox statistics." + :group 'org-faces) -(org-copy-face 'org-todo 'org-checkbox-statistics-todo - "Face used for unfinished checkbox statistics.") - -(org-copy-face 'org-done 'org-checkbox-statistics-done - "Face used for finished checkbox statistics.") +(defface org-checkbox-statistics-done + '((t (:inherit org-done))) + "Face used for finished checkbox statistics." + :group 'org-faces) (defcustom org-tag-faces nil "Faces for specific tags. @@ -491,7 +481,7 @@ changes." (defface org-meta-line (org-compatible-face 'font-lock-comment-face nil) - "Face for meta lines startin with \"#+\"." + "Face for meta lines starting with \"#+\"." :group 'org-faces :version "22.1") @@ -537,14 +527,15 @@ follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword." :group 'org-faces :version "22.1") -(defface org-block-background '((t ())) - "Face used for the source block background.") - -(org-copy-face 'org-meta-line 'org-block-begin-line - "Face used for the line delimiting the begin of source blocks.") +(defface org-block-begin-line + '((t (:inherit org-meta-line))) + "Face used for the line delimiting the begin of source blocks." + :group 'org-faces) -(org-copy-face 'org-meta-line 'org-block-end-line - "Face used for the line delimiting the end of source blocks.") +(defface org-block-end-line + '((t (:inherit org-block-begin-line))) + "Face used for the line delimiting the end of source blocks." + :group 'org-faces) (defface org-verbatim (org-compatible-face 'shadow @@ -560,10 +551,15 @@ follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword." :group 'org-faces :version "22.1") -(org-copy-face 'org-block 'org-quote - "Face for #+BEGIN_QUOTE ... #+END_QUOTE blocks.") -(org-copy-face 'org-block 'org-verse - "Face for #+BEGIN_VERSE ... #+END_VERSE blocks.") +(defface org-quote + '((t (:inherit org-block))) + "Face for #+BEGIN_QUOTE ... #+END_QUOTE blocks." + :group 'org-faces) + +(defface org-verse + '((t (:inherit org-block))) + "Face for #+BEGIN_VERSE ... #+END_VERSE blocks." + :group 'org-faces) (defcustom org-fontify-quote-and-verse-blocks nil "Non-nil means, add a special face to #+begin_quote and #+begin_verse block. @@ -576,13 +572,13 @@ content of these blocks will still be treated as Org syntax." (defface org-clock-overlay ;; copied from secondary-selection (org-compatible-face nil '((((class color) (min-colors 88) (background light)) - (:background "yellow1")) + (:background "LightGray" :foreground "black")) (((class color) (min-colors 88) (background dark)) - (:background "SkyBlue4")) + (:background "SkyBlue4" :foreground "white")) (((class color) (min-colors 16) (background light)) - (:background "yellow")) + (:background "gray" :foreground "black")) (((class color) (min-colors 16) (background dark)) - (:background "SkyBlue4")) + (:background "SkyBlue4" :foreground "white")) (((class color) (min-colors 8)) (:background "cyan" :foreground "black")) (t (:inverse-video t)))) @@ -600,21 +596,28 @@ content of these blocks will still be treated as Org syntax." "Face used in agenda for captions and dates." :group 'org-faces) -(org-copy-face 'org-agenda-structure 'org-agenda-date - "Face used in agenda for normal days.") +(defface org-agenda-date + '((t (:inherit org-agenda-structure))) + "Face used in agenda for normal days." + :group 'org-faces) -(org-copy-face 'org-agenda-date 'org-agenda-date-today +(defface org-agenda-date-today + '((t (:inherit org-agenda-date :weight bold :italic t))) "Face used in agenda for today." - :weight 'bold :italic 't) + :group 'org-faces) -(org-copy-face 'secondary-selection 'org-agenda-clocking - "Face marking the current clock item in the agenda.") +(defface org-agenda-clocking + '((t (:inherit secondary-selection))) + "Face marking the current clock item in the agenda." + :group 'org-faces) -(org-copy-face 'org-agenda-date 'org-agenda-date-weekend +(defface org-agenda-date-weekend + '((t (:inherit org-agenda-date :weight bold))) "Face used in agenda for weekend days. -See the variable `org-agenda-weekend-days' for a definition of which days -belong to the weekend." - :weight 'bold) + +See the variable `org-agenda-weekend-days' for a definition of +which days belong to the weekend." + :group 'org-faces) (defface org-scheduled (org-compatible-face nil @@ -719,8 +722,10 @@ month and 365.24 days for a year)." "Face used for time grids." :group 'org-faces) -(org-copy-face 'org-time-grid 'org-agenda-current-time - "Face used to show the current time in the time grid.") +(defface org-agenda-current-time + '((t (:inherit org-time-grid))) + "Face used to show the current time in the time grid." + :group 'org-faces) (defface org-agenda-diary (org-compatible-face 'default nil) @@ -791,11 +796,15 @@ level org-n-level-faces" :version "24.4" :package-version '(Org . "8.0")) -(org-copy-face 'mode-line 'org-mode-line-clock - "Face used for clock display in mode line.") -(org-copy-face 'mode-line 'org-mode-line-clock-overrun +(defface org-mode-line-clock + '((t (:inherit mode-line))) + "Face used for clock display in mode line." + :group 'org-faces) + +(defface org-mode-line-clock-overrun + '((t (:inherit mode-line :background "red"))) "Face used for clock display for overrun tasks in mode line." - :background "red") + :group 'org-faces) (provide 'org-faces) |