Use `org-autoload' instead of `autoload'.
[org-mode.git] / lisp / org-faces.el
blob606db0814c26c5a9fe5a8854c68e8667210811a9
1 ;;; org-faces.el --- Face definitions for Org-mode.
3 ;; Copyright (C) 2004-2013 Free Software Foundation, Inc.
5 ;; Author: Carsten Dominik <carsten at orgmode dot org>
6 ;; Keywords: outlines, hypermedia, calendar, wp
7 ;; Homepage: http://orgmode.org
8 ;;
9 ;; This file is part of GNU Emacs.
11 ;; GNU Emacs is free software: you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation, either version 3 of the License, or
14 ;; (at your option) any later version.
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
23 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
25 ;;; Commentary:
27 ;; This file contains the face definitions for Org.
29 ;;; Code:
31 (require 'org-macs)
32 (require 'org-compat)
34 (defun org-copy-face (old-face new-face docstring &rest attributes)
35 (unless (facep new-face)
36 (if (fboundp 'set-face-attribute)
37 (progn
38 (make-face new-face)
39 (set-face-attribute new-face nil :inherit old-face)
40 (apply 'set-face-attribute new-face nil attributes)
41 (set-face-doc-string new-face docstring))
42 (copy-face old-face new-face)
43 (if (fboundp 'set-face-doc-string)
44 (set-face-doc-string new-face docstring)))))
45 (put 'org-copy-face 'lisp-indent-function 2)
47 (when (featurep 'xemacs)
48 (put 'mode-line 'face-alias 'modeline))
50 (defgroup org-faces nil
51 "Faces in Org-mode."
52 :tag "Org Faces"
53 :group 'org-appearance)
55 (defface org-default
56 (org-compatible-face 'default nil)
57 "Face used for default text."
58 :group 'org-faces)
60 (defface org-hide
61 '((((background light)) (:foreground "white"))
62 (((background dark)) (:foreground "black")))
63 "Face used to hide leading stars in headlines.
64 The foreground color of this face should be equal to the background
65 color of the frame."
66 :group 'org-faces)
68 (defface org-level-1 ;; originally copied from font-lock-function-name-face
69 (org-compatible-face 'outline-1
70 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
71 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
72 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
73 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
74 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
75 (t (:bold t))))
76 "Face used for level 1 headlines."
77 :group 'org-faces)
79 (defface org-level-2 ;; originally copied from font-lock-variable-name-face
80 (org-compatible-face 'outline-2
81 '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
82 (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
83 (((class color) (min-colors 8) (background light)) (:foreground "yellow"))
84 (((class color) (min-colors 8) (background dark)) (:foreground "yellow" :bold t))
85 (t (:bold t))))
86 "Face used for level 2 headlines."
87 :group 'org-faces)
89 (defface org-level-3 ;; originally copied from font-lock-keyword-face
90 (org-compatible-face 'outline-3
91 '((((class color) (min-colors 88) (background light)) (:foreground "Purple"))
92 (((class color) (min-colors 88) (background dark)) (:foreground "Cyan1"))
93 (((class color) (min-colors 16) (background light)) (:foreground "Purple"))
94 (((class color) (min-colors 16) (background dark)) (:foreground "Cyan"))
95 (((class color) (min-colors 8) (background light)) (:foreground "purple" :bold t))
96 (((class color) (min-colors 8) (background dark)) (:foreground "cyan" :bold t))
97 (t (:bold t))))
98 "Face used for level 3 headlines."
99 :group 'org-faces)
101 (defface org-level-4 ;; originally copied from font-lock-comment-face
102 (org-compatible-face 'outline-4
103 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
104 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
105 (((class color) (min-colors 16) (background light)) (:foreground "red"))
106 (((class color) (min-colors 16) (background dark)) (:foreground "red1"))
107 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
108 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
109 (t (:bold t))))
110 "Face used for level 4 headlines."
111 :group 'org-faces)
113 (defface org-level-5 ;; originally copied from font-lock-type-face
114 (org-compatible-face 'outline-5
115 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
116 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
117 (((class color) (min-colors 8)) (:foreground "green"))))
118 "Face used for level 5 headlines."
119 :group 'org-faces)
121 (defface org-level-6 ;; originally copied from font-lock-constant-face
122 (org-compatible-face 'outline-6
123 '((((class color) (min-colors 16) (background light)) (:foreground "CadetBlue"))
124 (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine"))
125 (((class color) (min-colors 8)) (:foreground "magenta"))))
126 "Face used for level 6 headlines."
127 :group 'org-faces)
129 (defface org-level-7 ;; originally copied from font-lock-builtin-face
130 (org-compatible-face 'outline-7
131 '((((class color) (min-colors 16) (background light)) (:foreground "Orchid"))
132 (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue"))
133 (((class color) (min-colors 8)) (:foreground "blue"))))
134 "Face used for level 7 headlines."
135 :group 'org-faces)
137 (defface org-level-8 ;; originally copied from font-lock-string-face
138 (org-compatible-face 'outline-8
139 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
140 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
141 (((class color) (min-colors 8)) (:foreground "green"))))
142 "Face used for level 8 headlines."
143 :group 'org-faces)
145 (defface org-special-keyword ;; originally copied from font-lock-string-face
146 (org-compatible-face 'font-lock-keyword-face
147 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
148 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
149 (t (:italic t))))
150 "Face used for special keywords."
151 :group 'org-faces)
153 (defface org-drawer ;; originally copied from font-lock-function-name-face
154 (org-compatible-face nil
155 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
156 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
157 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
158 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
159 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
160 (t (:bold t))))
161 "Face used for drawers."
162 :group 'org-faces)
164 (defface org-property-value nil
165 "Face used for the value of a property."
166 :group 'org-faces)
168 (defface org-column
169 (org-compatible-face nil
170 '((((class color) (min-colors 16) (background light))
171 (:background "grey90" :weight normal :slant normal :strike-through nil
172 :underline nil))
173 (((class color) (min-colors 16) (background dark))
174 (:background "grey30" :weight normal :slant normal :strike-through nil
175 :underline nil))
176 (((class color) (min-colors 8))
177 (:background "cyan" :foreground "black"
178 :weight normal :slant normal :strike-through nil
179 :underline nil))
180 (t (:inverse-video t))))
181 "Face for column display of entry properties.
182 This is actually only part of the face definition for the text in column view.
183 The following faces apply, with this priority.
185 1. The color of the reference face. This is normally the level fact that
186 is used in the outline. In agenda-mode, it will be the face of the
187 first character in the line. The color is explicitly retained to
188 make sure that the column line still looks a bit like the structure
189 line it is masking.
191 2. The `org-column' face.
193 3. The remaining properties of the reference face.
195 Since column view works by putting overlays with a display property
196 over individual characters in the buffer, the face of the underlining
197 character (this might for example be the a TODO keyword) might still
198 shine through in some properties. So when your column view looks
199 funny, with \"random\" colors, weight, strike-through, try to explicitly
200 set the properties in the `org-column' face. For example, set
201 :underline to nil, or the :slant to `normal'.
203 Under XEmacs, the rules are simpler, because the XEmacs version of
204 column view defines special faces for each outline level. See the file
205 `org-colview-xemacs.el' for details."
206 :group 'org-faces)
208 (defface org-column-title
209 (org-compatible-face nil
210 '((((class color) (min-colors 16) (background light))
211 (:background "grey90" :underline t :weight bold))
212 (((class color) (min-colors 16) (background dark))
213 (:background "grey30" :underline t :weight bold))
214 (((class color) (min-colors 8))
215 (:background "cyan" :foreground "black" :underline t :weight bold))
216 (t (:inverse-video t))))
217 "Face for column display of entry properties."
218 :group 'org-faces)
220 (when (fboundp 'set-face-attribute)
221 ;; Make sure that a fixed-width face is used when we have a column table.
222 (set-face-attribute 'org-column nil
223 :height (face-attribute 'default :height)
224 :family (face-attribute 'default :family)))
226 (defface org-agenda-column-dateline
227 (org-compatible-face 'org-column
228 '((t nil)))
229 "Face used in agenda column view for datelines with summaries."
230 :group 'org-faces)
232 (defface org-warning
233 (org-compatible-face 'font-lock-warning-face
234 '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
235 (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
236 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
237 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
238 (t (:bold t))))
239 "Face for deadlines and TODO keywords."
240 :group 'org-faces)
242 (defface org-archived ; similar to shadow
243 (org-compatible-face 'shadow
244 '((((class color grayscale) (min-colors 88) (background light))
245 (:foreground "grey50"))
246 (((class color grayscale) (min-colors 88) (background dark))
247 (:foreground "grey70"))
248 (((class color) (min-colors 8) (background light))
249 (:foreground "green"))
250 (((class color) (min-colors 8) (background dark))
251 (:foreground "yellow"))))
252 "Face for headline with the ARCHIVE tag."
253 :group 'org-faces)
255 (defface org-link
256 (org-compatible-face 'link
257 '((((class color) (background light)) (:foreground "Purple" :underline t))
258 (((class color) (background dark)) (:foreground "Cyan" :underline t))
259 (t (:underline t))))
260 "Face for links."
261 :group 'org-faces)
263 (defface org-footnote
264 '((((class color) (background light)) (:foreground "Purple" :underline t))
265 (((class color) (background dark)) (:foreground "Cyan" :underline t))
266 (t (:underline t)))
267 "Face for links."
268 :group 'org-faces)
270 (defface org-ellipsis
271 '((((class color) (background light)) (:foreground "DarkGoldenrod" :underline t))
272 (((class color) (background dark)) (:foreground "LightGoldenrod" :underline t))
273 (t (:strike-through t)))
274 "Face for the ellipsis in folded text."
275 :group 'org-faces)
277 (defface org-target
278 '((((class color) (background light)) (:underline t))
279 (((class color) (background dark)) (:underline t))
280 (t (:underline t)))
281 "Face for link targets."
282 :group 'org-faces)
284 (defface org-date
285 '((((class color) (background light)) (:foreground "Purple" :underline t))
286 (((class color) (background dark)) (:foreground "Cyan" :underline t))
287 (t (:underline t)))
288 "Face for date/time stamps."
289 :group 'org-faces)
291 (defface org-date-selected
292 (org-compatible-face nil
293 '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :inverse-video t))
294 (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :inverse-video t))
295 (((class color) (min-colors 8) (background light)) (:foreground "red" :inverse-video t))
296 (((class color) (min-colors 8) (background dark)) (:foreground "red" :inverse-video t))
297 (t (:inverse-video t))))
298 "Face for highlighting the calendar day when using `org-read-date'.
299 Using a bold face here might cause discrepancies while displaying the
300 calendar."
301 :group 'org-faces)
303 (defface org-sexp-date
304 '((((class color) (background light)) (:foreground "Purple"))
305 (((class color) (background dark)) (:foreground "Cyan"))
306 (t (:underline t)))
307 "Face for diary-like sexp date specifications."
308 :group 'org-faces)
310 (defface org-tag
311 '((t (:bold t)))
312 "Default face for tags.
313 Note that the variable `org-tag-faces' can be used to overrule this face for
314 specific tags."
315 :group 'org-faces)
317 (defface org-list-dt
318 '((t (:bold t)))
319 "Default face for definition terms in lists."
320 :group 'org-faces)
322 (defface org-todo ; font-lock-warning-face
323 (org-compatible-face nil
324 '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
325 (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
326 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
327 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
328 (t (:inverse-video t :bold t))))
329 "Face for TODO keywords."
330 :group 'org-faces)
332 (defface org-done ;; originally copied from font-lock-type-face
333 (org-compatible-face nil
334 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen" :bold t))
335 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen" :bold t))
336 (((class color) (min-colors 8)) (:foreground "green"))
337 (t (:bold t))))
338 "Face used for todo keywords that indicate DONE items."
339 :group 'org-faces)
341 (defface org-agenda-done ;; originally copied from font-lock-type-face
342 (org-compatible-face nil
343 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
344 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
345 (((class color) (min-colors 8)) (:foreground "green"))
346 (t (:bold nil))))
347 "Face used in agenda, to indicate lines switched to DONE.
348 This face is used to de-emphasize items that where brightly colored in the
349 agenda because they were things to do, or overdue. The DONE state itself
350 is of course immediately visible, but for example a passed deadline is
351 \(by default) very bright read. This face could be simply the default face
352 of the frame, for example."
353 :group 'org-faces)
355 (defface org-headline-done ;; originally copied from font-lock-string-face
356 (org-compatible-face nil
357 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
358 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
359 (((class color) (min-colors 8) (background light)) (:bold nil))))
360 "Face used to indicate that a headline is DONE.
361 This face is only used if `org-fontify-done-headline' is set. If applies
362 to the part of the headline after the DONE keyword."
363 :group 'org-faces)
365 (defcustom org-faces-easy-properties
366 '((todo . :foreground) (tag . :foreground) (priority . :foreground))
367 "The property changes by easy faces.
368 This is an alist, the keys show the area of application, the values
369 can be `:foreground' or `:background'. A color string for special
370 keywords will then be interpreted as either foreground or background
371 color."
372 :group 'org-faces
373 :group 'org-todo
374 :version "24.1"
375 :type '(repeat
376 (cons (choice (const todo) (const tag) (const priority))
377 (choice (const :foreground) (const :background)))))
379 (defcustom org-todo-keyword-faces nil
380 "Faces for specific TODO keywords.
381 This is a list of cons cells, with TODO keywords in the car
382 and faces in the cdr. The face can be a symbol, a color
383 as a string (in which case the rest is inherited from the `org-todo' face),
384 or a property list of attributes, like
385 (:foreground \"blue\" :weight bold :underline t).
386 If it is a color string, the variable `org-faces-easy-properties'
387 determines if it is a foreground or a background color."
388 :group 'org-faces
389 :group 'org-todo
390 :type '(repeat
391 (cons
392 (string :tag "Keyword")
393 (choice :tag "Face "
394 (string :tag "Color")
395 (sexp :tag "Face")))))
397 (defcustom org-priority-faces nil
398 "Faces for specific Priorities.
399 This is a list of cons cells, with priority character in the car
400 and faces in the cdr. The face can be a symbol, a color as
401 as a string, or a property list of attributes, like
402 (:foreground \"blue\" :weight bold :underline t).
403 If it is a color string, the variable `org-faces-easy-properties'
404 determines if it is a foreground or a background color."
405 :group 'org-faces
406 :group 'org-todo
407 :type '(repeat
408 (cons
409 (character :tag "Priority")
410 (choice :tag "Face "
411 (string :tag "Color")
412 (sexp :tag "Face")))))
414 (defvar org-tags-special-faces-re nil)
415 (defun org-set-tag-faces (var value)
416 (set var value)
417 (if (not value)
418 (setq org-tags-special-faces-re nil)
419 (setq org-tags-special-faces-re
420 (concat ":\\(" (mapconcat 'car value "\\|") "\\):"))))
422 (defface org-checkbox
423 (org-compatible-face 'bold
424 '((t (:bold t))))
425 "Face for checkboxes."
426 :group 'org-faces)
429 (org-copy-face 'org-todo 'org-checkbox-statistics-todo
430 "Face used for unfinished checkbox statistics.")
432 (org-copy-face 'org-done 'org-checkbox-statistics-done
433 "Face used for finished checkbox statistics.")
435 (defcustom org-tag-faces nil
436 "Faces for specific tags.
437 This is a list of cons cells, with tags in the car and faces in the cdr.
438 The face can be a symbol, a foreground color (in which case the rest is
439 inherited from the `org-tag' face) or a property list of attributes,
440 like (:foreground \"blue\" :weight bold :underline t).
441 If you set this variable through customize, it will immediately be effective
442 in new buffers and in modified lines.
443 If you set it with Lisp, a restart of Emacs is required to activate the
444 changes."
445 :group 'org-faces
446 :group 'org-tags
447 :set 'org-set-tag-faces
448 :type '(repeat
449 (cons
450 (string :tag "Tag ")
451 (choice :tag "Face"
452 (string :tag "Foreground color")
453 (sexp :tag "Face")))))
455 (defface org-table ;; originally copied from font-lock-function-name-face
456 (org-compatible-face nil
457 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
458 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
459 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
460 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
461 (((class color) (min-colors 8) (background light)) (:foreground "blue"))
462 (((class color) (min-colors 8) (background dark)))))
463 "Face used for tables."
464 :group 'org-faces)
466 (defface org-formula
467 (org-compatible-face nil
468 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
469 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
470 (((class color) (min-colors 8) (background light)) (:foreground "red"))
471 (((class color) (min-colors 8) (background dark)) (:foreground "red"))
472 (t (:bold t :italic t))))
473 "Face for formulas."
474 :group 'org-faces)
476 (defface org-code
477 (org-compatible-face 'shadow
478 '((((class color grayscale) (min-colors 88) (background light))
479 (:foreground "grey50"))
480 (((class color grayscale) (min-colors 88) (background dark))
481 (:foreground "grey70"))
482 (((class color) (min-colors 8) (background light))
483 (:foreground "green"))
484 (((class color) (min-colors 8) (background dark))
485 (:foreground "yellow"))))
486 "Face for fixed-width text like code snippets."
487 :group 'org-faces
488 :version "22.1")
490 (defface org-meta-line
491 (org-compatible-face 'font-lock-comment-face nil)
492 "Face for meta lines startin with \"#+\"."
493 :group 'org-faces
494 :version "22.1")
496 (defface org-document-title
497 '((((class color) (background light)) (:foreground "midnight blue" :weight bold))
498 (((class color) (background dark)) (:foreground "pale turquoise" :weight bold))
499 (t (:weight bold)))
500 "Face for document title, i.e. that which follows the #+TITLE: keyword."
501 :group 'org-faces)
503 (defface org-document-info
504 '((((class color) (background light)) (:foreground "midnight blue"))
505 (((class color) (background dark)) (:foreground "pale turquoise"))
506 (t nil))
507 "Face for document date, author and email; i.e. that which
508 follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword."
509 :group 'org-faces)
511 (defface org-document-info-keyword
512 (org-compatible-face 'shadow
513 '((((class color grayscale) (min-colors 88) (background light))
514 (:foreground "grey50"))
515 (((class color grayscale) (min-colors 88) (background dark))
516 (:foreground "grey70"))
517 (((class color) (min-colors 8) (background light))
518 (:foreground "green"))
519 (((class color) (min-colors 8) (background dark))
520 (:foreground "yellow"))))
521 "Face for #+TITLE:, #+AUTHOR:, #+EMAIL: and #+DATE: keywords."
522 :group 'org-faces)
524 (defface org-block
525 (org-compatible-face 'shadow
526 '((((class color grayscale) (min-colors 88) (background light))
527 (:foreground "grey50"))
528 (((class color grayscale) (min-colors 88) (background dark))
529 (:foreground "grey70"))
530 (((class color) (min-colors 8) (background light))
531 (:foreground "green"))
532 (((class color) (min-colors 8) (background dark))
533 (:foreground "yellow"))))
534 "Face text in #+begin ... #+end blocks."
535 :group 'org-faces
536 :version "22.1")
538 (defface org-block-background '((t ()))
539 "Face used for the source block background.")
541 (org-copy-face 'org-meta-line 'org-block-begin-line
542 "Face used for the line delimiting the begin of source blocks.")
544 (org-copy-face 'org-meta-line 'org-block-end-line
545 "Face used for the line delimiting the end of source blocks.")
547 (defface org-verbatim
548 (org-compatible-face 'shadow
549 '((((class color grayscale) (min-colors 88) (background light))
550 (:foreground "grey50" :underline t))
551 (((class color grayscale) (min-colors 88) (background dark))
552 (:foreground "grey70" :underline t))
553 (((class color) (min-colors 8) (background light))
554 (:foreground "green" :underline t))
555 (((class color) (min-colors 8) (background dark))
556 (:foreground "yellow" :underline t))))
557 "Face for fixed-with text like code snippets."
558 :group 'org-faces
559 :version "22.1")
561 (org-copy-face 'org-block 'org-quote
562 "Face for #+BEGIN_QUOTE ... #+END_QUOTE blocks.")
563 (org-copy-face 'org-block 'org-verse
564 "Face for #+BEGIN_VERSE ... #+END_VERSE blocks.")
566 (defcustom org-fontify-quote-and-verse-blocks nil
567 "Non-nil means, add a special face to #+begin_quote and #+begin_verse block.
568 When nil, format these as normal Org. This is the default, because the
569 content of these blocks will still be treated as Org syntax."
570 :group 'org-faces
571 :version "24.1"
572 :type 'boolean)
574 (defface org-clock-overlay ;; copied from secondary-selection
575 (org-compatible-face nil
576 '((((class color) (min-colors 88) (background light))
577 (:background "yellow1"))
578 (((class color) (min-colors 88) (background dark))
579 (:background "SkyBlue4"))
580 (((class color) (min-colors 16) (background light))
581 (:background "yellow"))
582 (((class color) (min-colors 16) (background dark))
583 (:background "SkyBlue4"))
584 (((class color) (min-colors 8))
585 (:background "cyan" :foreground "black"))
586 (t (:inverse-video t))))
587 "Basic face for displaying the secondary selection."
588 :group 'org-faces)
590 (defface org-agenda-structure ;; originally copied from font-lock-function-name-face
591 (org-compatible-face nil
592 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
593 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
594 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
595 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
596 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
597 (t (:bold t))))
598 "Face used in agenda for captions and dates."
599 :group 'org-faces)
601 (org-copy-face 'org-agenda-structure 'org-agenda-date
602 "Face used in agenda for normal days.")
604 (org-copy-face 'org-agenda-date 'org-agenda-date-today
605 "Face used in agenda for today."
606 :weight 'bold :italic 't)
608 (org-copy-face 'secondary-selection 'org-agenda-clocking
609 "Face marking the current clock item in the agenda.")
611 (org-copy-face 'org-agenda-date 'org-agenda-date-weekend
612 "Face used in agenda for weekend days.
613 See the variable `org-agenda-weekend-days' for a definition of which days
614 belong to the weekend."
615 :weight 'bold)
617 (defface org-scheduled
618 (org-compatible-face nil
619 '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
620 (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
621 (((class color) (min-colors 8)) (:foreground "green"))
622 (t (:bold t :italic t))))
623 "Face for items scheduled for a certain day."
624 :group 'org-faces)
626 (defface org-scheduled-today
627 (org-compatible-face nil
628 '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
629 (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
630 (((class color) (min-colors 8)) (:foreground "green"))
631 (t (:bold t :italic t))))
632 "Face for items scheduled for a certain day."
633 :group 'org-faces)
635 (defface org-agenda-dimmed-todo-face
636 '((((background light)) (:foreground "grey50"))
637 (((background dark)) (:foreground "grey50")))
638 "Face used to dim blocked tasks in the agenda."
639 :group 'org-faces)
641 (defface org-scheduled-previously
642 (org-compatible-face nil
643 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
644 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
645 (((class color) (min-colors 8) (background light)) (:foreground "red"))
646 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
647 (t (:bold t))))
648 "Face for items scheduled previously, and not yet done."
649 :group 'org-faces)
651 (defface org-upcoming-deadline
652 (org-compatible-face nil
653 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
654 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
655 (((class color) (min-colors 8) (background light)) (:foreground "red"))
656 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
657 (t (:bold t))))
658 "Face for items scheduled previously, and not yet done."
659 :group 'org-faces)
661 (defcustom org-agenda-deadline-faces
662 '((1.0 . org-warning)
663 (0.5 . org-upcoming-deadline)
664 (0.0 . default))
665 "Faces for showing deadlines in the agenda.
666 This is a list of cons cells. The cdr of each cell is a face to be used,
667 and it can also just be like '(:foreground \"yellow\").
668 Each car is a fraction of the head-warning time that must have passed for
669 this the face in the cdr to be used for display. The numbers must be
670 given in descending order. The head-warning time is normally taken
671 from `org-deadline-warning-days', but can also be specified in the deadline
672 timestamp itself, like this:
674 DEADLINE: <2007-08-13 Mon -8d>
676 You may use d for days, w for weeks, m for months and y for years. Months
677 and years will only be treated in an approximate fashion (30.4 days for a
678 month and 365.24 days for a year)."
679 :group 'org-faces
680 :group 'org-agenda-daily/weekly
681 :type '(repeat
682 (cons
683 (number :tag "Fraction of head-warning time passed")
684 (sexp :tag "Face"))))
686 (defface org-agenda-restriction-lock
687 (org-compatible-face nil
688 '((((class color) (min-colors 88) (background light)) (:background "yellow1"))
689 (((class color) (min-colors 88) (background dark)) (:background "skyblue4"))
690 (((class color) (min-colors 16) (background light)) (:background "yellow1"))
691 (((class color) (min-colors 16) (background dark)) (:background "skyblue4"))
692 (((class color) (min-colors 8)) (:background "cyan" :foreground "black"))
693 (t (:inverse-video t))))
694 "Face for showing the agenda restriction lock."
695 :group 'org-faces)
697 (defface org-agenda-filter-tags
698 (org-compatible-face 'mode-line
699 nil)
700 "Face for tag(s) in the mode-line when filtering the agenda."
701 :group 'org-faces)
703 (defface org-agenda-filter-category
704 (org-compatible-face 'mode-line
705 nil)
706 "Face for tag(s) in the mode-line when filtering the agenda."
707 :group 'org-faces)
709 (defface org-time-grid ;; originally copied from font-lock-variable-name-face
710 (org-compatible-face nil
711 '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
712 (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
713 (((class color) (min-colors 8)) (:foreground "yellow" :weight light))))
714 "Face used for time grids."
715 :group 'org-faces)
717 (org-copy-face 'org-time-grid 'org-agenda-current-time
718 "Face used to show the current time in the time grid.")
720 (defface org-agenda-diary
721 (org-compatible-face 'default
722 nil)
723 "Face used for agenda entries that come from the Emacs diary."
724 :group 'org-faces)
726 (defface org-agenda-calendar-event
727 (org-compatible-face 'default
728 nil)
729 "Face used to show events and appointments in the agenda."
730 :group 'org-faces)
732 (defface org-agenda-calendar-sexp
733 (org-compatible-face 'default
734 nil)
735 "Face used to show events computed from a S-expression."
736 :group 'org-faces)
738 (defconst org-level-faces
739 '(org-level-1 org-level-2 org-level-3 org-level-4
740 org-level-5 org-level-6 org-level-7 org-level-8
743 (defcustom org-n-level-faces (length org-level-faces)
744 "The number of different faces to be used for headlines.
745 Org-mode defines 8 different headline faces, so this can be at most 8.
746 If it is less than 8, the level-1 face gets re-used for level N+1 etc."
747 :type 'integer
748 :group 'org-faces)
750 (defcustom org-cycle-level-faces t
751 "Non-nil means level styles cycle after level `org-n-level-faces'.
752 Then so level org-n-level-faces+1 is styled like level 1.
753 If nil, then all levels >=org-n-level-faces are styled like
754 level org-n-level-faces"
755 :group 'org-appearance
756 :group 'org-faces
757 :version "24.1"
758 :type 'boolean)
760 (defface org-latex-and-export-specials
761 (let ((font (cond ((assq :inherit custom-face-attributes)
762 '(:inherit underline))
763 (t '(:underline t)))))
764 `((((class grayscale) (background light))
765 (:foreground "DimGray" ,@font))
766 (((class grayscale) (background dark))
767 (:foreground "LightGray" ,@font))
768 (((class color) (background light))
769 (:foreground "SaddleBrown"))
770 (((class color) (background dark))
771 (:foreground "burlywood"))
772 (t (,@font))))
773 "Face used to highlight math latex and other special exporter stuff."
774 :group 'org-faces)
776 (org-copy-face 'mode-line 'org-mode-line-clock
777 "Face used for clock display in mode line.")
778 (org-copy-face 'mode-line 'org-mode-line-clock-overrun
779 "Face used for clock display for overrun tasks in mode line."
780 :background "red")
782 (provide 'org-faces)
784 ;;; org-faces.el ends here