Fix TOC link references.
[org-mode/org-tableheadings.git] / lisp / org-faces.el
blob54729649d1d9ebcaef3828260c07d576c71adce2
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' in Org's contrib/ directory 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 (defface org-priority ;; originally copied from font-lock-string-face
398 (org-compatible-face 'font-lock-keyword-face
399 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
400 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
401 (t (:italic t))))
402 "Face used for priority cookies."
403 :group 'org-faces)
405 (defcustom org-priority-faces nil
406 "Faces for specific Priorities.
407 This is a list of cons cells, with priority character in the car
408 and faces in the cdr. The face can be a symbol, a color as
409 as a string, or a property list of attributes, like
410 (:foreground \"blue\" :weight bold :underline t).
411 If it is a color string, the variable `org-faces-easy-properties'
412 determines if it is a foreground or a background color."
413 :group 'org-faces
414 :group 'org-todo
415 :type '(repeat
416 (cons
417 (character :tag "Priority")
418 (choice :tag "Face "
419 (string :tag "Color")
420 (sexp :tag "Face")))))
422 (defvar org-tags-special-faces-re nil)
423 (defun org-set-tag-faces (var value)
424 (set var value)
425 (if (not value)
426 (setq org-tags-special-faces-re nil)
427 (setq org-tags-special-faces-re
428 (concat ":\\(" (mapconcat 'car value "\\|") "\\):"))))
430 (defface org-checkbox
431 (org-compatible-face 'bold
432 '((t (:bold t))))
433 "Face for checkboxes."
434 :group 'org-faces)
437 (org-copy-face 'org-todo 'org-checkbox-statistics-todo
438 "Face used for unfinished checkbox statistics.")
440 (org-copy-face 'org-done 'org-checkbox-statistics-done
441 "Face used for finished checkbox statistics.")
443 (defcustom org-tag-faces nil
444 "Faces for specific tags.
445 This is a list of cons cells, with tags in the car and faces in the cdr.
446 The face can be a symbol, a foreground color (in which case the rest is
447 inherited from the `org-tag' face) or a property list of attributes,
448 like (:foreground \"blue\" :weight bold :underline t).
449 If you set this variable through customize, it will immediately be effective
450 in new buffers and in modified lines.
451 If you set it with Lisp, a restart of Emacs is required to activate the
452 changes."
453 :group 'org-faces
454 :group 'org-tags
455 :set 'org-set-tag-faces
456 :type '(repeat
457 (cons
458 (string :tag "Tag ")
459 (choice :tag "Face"
460 (string :tag "Foreground color")
461 (sexp :tag "Face")))))
463 (defface org-table ;; originally copied from font-lock-function-name-face
464 (org-compatible-face nil
465 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
466 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
467 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
468 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
469 (((class color) (min-colors 8) (background light)) (:foreground "blue"))
470 (((class color) (min-colors 8) (background dark)))))
471 "Face used for tables."
472 :group 'org-faces)
474 (defface org-formula
475 (org-compatible-face nil
476 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
477 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
478 (((class color) (min-colors 8) (background light)) (:foreground "red"))
479 (((class color) (min-colors 8) (background dark)) (:foreground "red"))
480 (t (:bold t :italic t))))
481 "Face for formulas."
482 :group 'org-faces)
484 (defface org-code
485 (org-compatible-face 'shadow
486 '((((class color grayscale) (min-colors 88) (background light))
487 (:foreground "grey50"))
488 (((class color grayscale) (min-colors 88) (background dark))
489 (:foreground "grey70"))
490 (((class color) (min-colors 8) (background light))
491 (:foreground "green"))
492 (((class color) (min-colors 8) (background dark))
493 (:foreground "yellow"))))
494 "Face for fixed-width text like code snippets."
495 :group 'org-faces
496 :version "22.1")
498 (defface org-meta-line
499 (org-compatible-face 'font-lock-comment-face nil)
500 "Face for meta lines startin with \"#+\"."
501 :group 'org-faces
502 :version "22.1")
504 (defface org-document-title
505 '((((class color) (background light)) (:foreground "midnight blue" :weight bold))
506 (((class color) (background dark)) (:foreground "pale turquoise" :weight bold))
507 (t (:weight bold)))
508 "Face for document title, i.e. that which follows the #+TITLE: keyword."
509 :group 'org-faces)
511 (defface org-document-info
512 '((((class color) (background light)) (:foreground "midnight blue"))
513 (((class color) (background dark)) (:foreground "pale turquoise"))
514 (t nil))
515 "Face for document date, author and email; i.e. that which
516 follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword."
517 :group 'org-faces)
519 (defface org-document-info-keyword
520 (org-compatible-face 'shadow
521 '((((class color grayscale) (min-colors 88) (background light))
522 (:foreground "grey50"))
523 (((class color grayscale) (min-colors 88) (background dark))
524 (:foreground "grey70"))
525 (((class color) (min-colors 8) (background light))
526 (:foreground "green"))
527 (((class color) (min-colors 8) (background dark))
528 (:foreground "yellow"))))
529 "Face for #+TITLE:, #+AUTHOR:, #+EMAIL: and #+DATE: keywords."
530 :group 'org-faces)
532 (defface org-block
533 (org-compatible-face 'shadow
534 '((((class color grayscale) (min-colors 88) (background light))
535 (:foreground "grey50"))
536 (((class color grayscale) (min-colors 88) (background dark))
537 (:foreground "grey70"))
538 (((class color) (min-colors 8) (background light))
539 (:foreground "green"))
540 (((class color) (min-colors 8) (background dark))
541 (:foreground "yellow"))))
542 "Face text in #+begin ... #+end blocks."
543 :group 'org-faces
544 :version "22.1")
546 (defface org-block-background '((t ()))
547 "Face used for the source block background.")
549 (org-copy-face 'org-meta-line 'org-block-begin-line
550 "Face used for the line delimiting the begin of source blocks.")
552 (org-copy-face 'org-meta-line 'org-block-end-line
553 "Face used for the line delimiting the end of source blocks.")
555 (defface org-verbatim
556 (org-compatible-face 'shadow
557 '((((class color grayscale) (min-colors 88) (background light))
558 (:foreground "grey50" :underline t))
559 (((class color grayscale) (min-colors 88) (background dark))
560 (:foreground "grey70" :underline t))
561 (((class color) (min-colors 8) (background light))
562 (:foreground "green" :underline t))
563 (((class color) (min-colors 8) (background dark))
564 (:foreground "yellow" :underline t))))
565 "Face for fixed-with text like code snippets."
566 :group 'org-faces
567 :version "22.1")
569 (org-copy-face 'org-block 'org-quote
570 "Face for #+BEGIN_QUOTE ... #+END_QUOTE blocks.")
571 (org-copy-face 'org-block 'org-verse
572 "Face for #+BEGIN_VERSE ... #+END_VERSE blocks.")
574 (defcustom org-fontify-quote-and-verse-blocks nil
575 "Non-nil means, add a special face to #+begin_quote and #+begin_verse block.
576 When nil, format these as normal Org. This is the default, because the
577 content of these blocks will still be treated as Org syntax."
578 :group 'org-faces
579 :version "24.1"
580 :type 'boolean)
582 (defface org-clock-overlay ;; copied from secondary-selection
583 (org-compatible-face nil
584 '((((class color) (min-colors 88) (background light))
585 (:background "yellow1"))
586 (((class color) (min-colors 88) (background dark))
587 (:background "SkyBlue4"))
588 (((class color) (min-colors 16) (background light))
589 (:background "yellow"))
590 (((class color) (min-colors 16) (background dark))
591 (:background "SkyBlue4"))
592 (((class color) (min-colors 8))
593 (:background "cyan" :foreground "black"))
594 (t (:inverse-video t))))
595 "Basic face for displaying the secondary selection."
596 :group 'org-faces)
598 (defface org-agenda-structure ;; originally copied from font-lock-function-name-face
599 (org-compatible-face nil
600 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
601 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
602 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
603 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
604 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
605 (t (:bold t))))
606 "Face used in agenda for captions and dates."
607 :group 'org-faces)
609 (org-copy-face 'org-agenda-structure 'org-agenda-date
610 "Face used in agenda for normal days.")
612 (org-copy-face 'org-agenda-date 'org-agenda-date-today
613 "Face used in agenda for today."
614 :weight 'bold :italic 't)
616 (org-copy-face 'secondary-selection 'org-agenda-clocking
617 "Face marking the current clock item in the agenda.")
619 (org-copy-face 'org-agenda-date 'org-agenda-date-weekend
620 "Face used in agenda for weekend days.
621 See the variable `org-agenda-weekend-days' for a definition of which days
622 belong to the weekend."
623 :weight 'bold)
625 (defface org-scheduled
626 (org-compatible-face nil
627 '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
628 (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
629 (((class color) (min-colors 8)) (:foreground "green"))
630 (t (:bold t :italic t))))
631 "Face for items scheduled for a certain day."
632 :group 'org-faces)
634 (defface org-scheduled-today
635 (org-compatible-face nil
636 '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
637 (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
638 (((class color) (min-colors 8)) (:foreground "green"))
639 (t (:bold t :italic t))))
640 "Face for items scheduled for a certain day."
641 :group 'org-faces)
643 (defface org-agenda-dimmed-todo-face
644 '((((background light)) (:foreground "grey50"))
645 (((background dark)) (:foreground "grey50")))
646 "Face used to dim blocked tasks in the agenda."
647 :group 'org-faces)
649 (defface org-scheduled-previously
650 (org-compatible-face nil
651 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
652 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
653 (((class color) (min-colors 8) (background light)) (:foreground "red"))
654 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
655 (t (:bold t))))
656 "Face for items scheduled previously, and not yet done."
657 :group 'org-faces)
659 (defface org-upcoming-deadline
660 (org-compatible-face nil
661 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
662 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
663 (((class color) (min-colors 8) (background light)) (:foreground "red"))
664 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
665 (t (:bold t))))
666 "Face for items scheduled previously, and not yet done."
667 :group 'org-faces)
669 (defcustom org-agenda-deadline-faces
670 '((1.0 . org-warning)
671 (0.5 . org-upcoming-deadline)
672 (0.0 . default))
673 "Faces for showing deadlines in the agenda.
674 This is a list of cons cells. The cdr of each cell is a face to be used,
675 and it can also just be like '(:foreground \"yellow\").
676 Each car is a fraction of the head-warning time that must have passed for
677 this the face in the cdr to be used for display. The numbers must be
678 given in descending order. The head-warning time is normally taken
679 from `org-deadline-warning-days', but can also be specified in the deadline
680 timestamp itself, like this:
682 DEADLINE: <2007-08-13 Mon -8d>
684 You may use d for days, w for weeks, m for months and y for years. Months
685 and years will only be treated in an approximate fashion (30.4 days for a
686 month and 365.24 days for a year)."
687 :group 'org-faces
688 :group 'org-agenda-daily/weekly
689 :type '(repeat
690 (cons
691 (number :tag "Fraction of head-warning time passed")
692 (sexp :tag "Face"))))
694 (defface org-agenda-restriction-lock
695 (org-compatible-face nil
696 '((((class color) (min-colors 88) (background light)) (:background "#eeeeee"))
697 (((class color) (min-colors 88) (background dark)) (:background "#1C1C1C"))
698 (((class color) (min-colors 16) (background light)) (:background "#eeeeee"))
699 (((class color) (min-colors 16) (background dark)) (:background "#1C1C1C"))
700 (((class color) (min-colors 8)) (:background "cyan" :foreground "black"))
701 (t (:inverse-video t))))
702 "Face for showing the agenda restriction lock."
703 :group 'org-faces)
705 (defface org-agenda-filter-tags
706 (org-compatible-face 'mode-line nil)
707 "Face for tag(s) in the mode-line when filtering the agenda."
708 :group 'org-faces)
710 (defface org-agenda-filter-regexp
711 (org-compatible-face 'mode-line nil)
712 "Face for regexp(s) in the mode-line when filtering the agenda."
713 :group 'org-faces)
715 (defface org-agenda-filter-category
716 (org-compatible-face 'mode-line nil)
717 "Face for categories(s) in the mode-line when filtering the agenda."
718 :group 'org-faces)
720 (defface org-time-grid ;; originally copied from font-lock-variable-name-face
721 (org-compatible-face nil
722 '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
723 (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
724 (((class color) (min-colors 8)) (:foreground "yellow" :weight light))))
725 "Face used for time grids."
726 :group 'org-faces)
728 (org-copy-face 'org-time-grid 'org-agenda-current-time
729 "Face used to show the current time in the time grid.")
731 (defface org-agenda-diary
732 (org-compatible-face 'default nil)
733 "Face used for agenda entries that come from the Emacs diary."
734 :group 'org-faces)
736 (defface org-agenda-calendar-event
737 (org-compatible-face 'default nil)
738 "Face used to show events and appointments in the agenda."
739 :group 'org-faces)
741 (defface org-agenda-calendar-sexp
742 (org-compatible-face 'default nil)
743 "Face used to show events computed from a S-expression."
744 :group 'org-faces)
746 (defconst org-level-faces
747 '(org-level-1 org-level-2 org-level-3 org-level-4
748 org-level-5 org-level-6 org-level-7 org-level-8
751 (defcustom org-n-level-faces (length org-level-faces)
752 "The number of different faces to be used for headlines.
753 Org-mode defines 8 different headline faces, so this can be at most 8.
754 If it is less than 8, the level-1 face gets re-used for level N+1 etc."
755 :type 'integer
756 :group 'org-faces)
758 (defcustom org-cycle-level-faces t
759 "Non-nil means level styles cycle after level `org-n-level-faces'.
760 Then so level org-n-level-faces+1 is styled like level 1.
761 If nil, then all levels >=org-n-level-faces are styled like
762 level org-n-level-faces"
763 :group 'org-appearance
764 :group 'org-faces
765 :version "24.1"
766 :type 'boolean)
768 (defface org-latex-and-related
769 (let ((font (cond ((assq :inherit custom-face-attributes)
770 '(:inherit underline))
771 (t '(:underline t)))))
772 `((((class grayscale) (background light))
773 (:foreground "DimGray" ,@font))
774 (((class grayscale) (background dark))
775 (:foreground "LightGray" ,@font))
776 (((class color) (background light))
777 (:foreground "SaddleBrown"))
778 (((class color) (background dark))
779 (:foreground "burlywood"))
780 (t (,@font))))
781 "Face used to highlight LaTeX data, entities and sub/superscript."
782 :group 'org-faces
783 :version "24.4"
784 :package-version '(Org . "8.0"))
786 (defface org-macro
787 (org-compatible-face 'org-latex-and-related nil)
788 "Face for macros."
789 :group 'org-faces
790 :version "24.4"
791 :package-version '(Org . "8.0"))
793 (defface org-tag-group
794 (org-compatible-face 'org-tag nil)
795 "Face for group tags."
796 :group 'org-faces
797 :version "24.4"
798 :package-version '(Org . "8.0"))
800 (org-copy-face 'mode-line 'org-mode-line-clock
801 "Face used for clock display in mode line.")
802 (org-copy-face 'mode-line 'org-mode-line-clock-overrun
803 "Face used for clock display for overrun tasks in mode line."
804 :background "red")
806 (provide 'org-faces)
808 ;;; org-faces.el ends here