ob-exp: Use lexical binding
[org-mode/org-tableheadings.git] / lisp / org-faces.el
blobec93e9b4e6d44685c719b97cda592c512cc3112b
1 ;;; org-faces.el --- Face definitions for Org-mode.
3 ;; Copyright (C) 2004-2016 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 (defgroup org-faces nil
35 "Faces in Org-mode."
36 :tag "Org Faces"
37 :group 'org-appearance)
39 (defface org-default
40 (org-compatible-face 'default nil)
41 "Face used for default text."
42 :group 'org-faces)
44 (defface org-hide
45 '((((background light)) (:foreground "white"))
46 (((background dark)) (:foreground "black")))
47 "Face used to hide leading stars in headlines.
48 The foreground color of this face should be equal to the background
49 color of the frame."
50 :group 'org-faces)
52 (defface org-level-1 ;; originally copied from font-lock-function-name-face
53 (org-compatible-face 'outline-1
54 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
55 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
56 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
57 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
58 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
59 (t (:bold t))))
60 "Face used for level 1 headlines."
61 :group 'org-faces)
63 (defface org-level-2 ;; originally copied from font-lock-variable-name-face
64 (org-compatible-face 'outline-2
65 '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
66 (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
67 (((class color) (min-colors 8) (background light)) (:foreground "yellow"))
68 (((class color) (min-colors 8) (background dark)) (:foreground "yellow" :bold t))
69 (t (:bold t))))
70 "Face used for level 2 headlines."
71 :group 'org-faces)
73 (defface org-level-3 ;; originally copied from font-lock-keyword-face
74 (org-compatible-face 'outline-3
75 '((((class color) (min-colors 88) (background light)) (:foreground "Purple"))
76 (((class color) (min-colors 88) (background dark)) (:foreground "Cyan1"))
77 (((class color) (min-colors 16) (background light)) (:foreground "Purple"))
78 (((class color) (min-colors 16) (background dark)) (:foreground "Cyan"))
79 (((class color) (min-colors 8) (background light)) (:foreground "purple" :bold t))
80 (((class color) (min-colors 8) (background dark)) (:foreground "cyan" :bold t))
81 (t (:bold t))))
82 "Face used for level 3 headlines."
83 :group 'org-faces)
85 (defface org-level-4 ;; originally copied from font-lock-comment-face
86 (org-compatible-face 'outline-4
87 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
88 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
89 (((class color) (min-colors 16) (background light)) (:foreground "red"))
90 (((class color) (min-colors 16) (background dark)) (:foreground "red1"))
91 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
92 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
93 (t (:bold t))))
94 "Face used for level 4 headlines."
95 :group 'org-faces)
97 (defface org-level-5 ;; originally copied from font-lock-type-face
98 (org-compatible-face 'outline-5
99 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
100 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
101 (((class color) (min-colors 8)) (:foreground "green"))))
102 "Face used for level 5 headlines."
103 :group 'org-faces)
105 (defface org-level-6 ;; originally copied from font-lock-constant-face
106 (org-compatible-face 'outline-6
107 '((((class color) (min-colors 16) (background light)) (:foreground "CadetBlue"))
108 (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine"))
109 (((class color) (min-colors 8)) (:foreground "magenta"))))
110 "Face used for level 6 headlines."
111 :group 'org-faces)
113 (defface org-level-7 ;; originally copied from font-lock-builtin-face
114 (org-compatible-face 'outline-7
115 '((((class color) (min-colors 16) (background light)) (:foreground "Orchid"))
116 (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue"))
117 (((class color) (min-colors 8)) (:foreground "blue"))))
118 "Face used for level 7 headlines."
119 :group 'org-faces)
121 (defface org-level-8 ;; originally copied from font-lock-string-face
122 (org-compatible-face 'outline-8
123 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
124 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
125 (((class color) (min-colors 8)) (:foreground "green"))))
126 "Face used for level 8 headlines."
127 :group 'org-faces)
129 (defface org-special-keyword ;; originally copied from font-lock-string-face
130 (org-compatible-face 'font-lock-keyword-face
131 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
132 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
133 (t (:italic t))))
134 "Face used for special keywords."
135 :group 'org-faces)
137 (defface org-drawer ;; originally copied from font-lock-function-name-face
138 (org-compatible-face nil
139 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
140 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
141 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
142 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
143 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
144 (t (:bold t))))
145 "Face used for drawers."
146 :group 'org-faces)
148 (defface org-property-value nil
149 "Face used for the value of a property."
150 :group 'org-faces)
152 (defface org-column
153 (org-compatible-face nil
154 '((((class color) (min-colors 16) (background light))
155 (:background "grey90" :weight normal :slant normal :strike-through nil
156 :underline nil))
157 (((class color) (min-colors 16) (background dark))
158 (:background "grey30" :weight normal :slant normal :strike-through nil
159 :underline nil))
160 (((class color) (min-colors 8))
161 (:background "cyan" :foreground "black"
162 :weight normal :slant normal :strike-through nil
163 :underline nil))
164 (t (:inverse-video t))))
165 "Face for column display of entry properties.
166 This is actually only part of the face definition for the text in column view.
167 The following faces apply, with this priority.
169 1. The color of the reference face. This is normally the level fact that
170 is used in the outline. In agenda-mode, it will be the face of the
171 first character in the line. The color is explicitly retained to
172 make sure that the column line still looks a bit like the structure
173 line it is masking.
175 2. The `org-column' face.
177 3. The remaining properties of the reference face.
179 Since column view works by putting overlays with a display property
180 over individual characters in the buffer, the face of the underlining
181 character (this might for example be the a TODO keyword) might still
182 shine through in some properties. So when your column view looks
183 funny, with \"random\" colors, weight, strike-through, try to explicitly
184 set the properties in the `org-column' face. For example, set
185 :underline to nil, or the :slant to `normal'."
186 :group 'org-faces)
188 (defface org-column-title
189 (org-compatible-face nil
190 '((((class color) (min-colors 16) (background light))
191 (:background "grey90" :underline t :weight bold))
192 (((class color) (min-colors 16) (background dark))
193 (:background "grey30" :underline t :weight bold))
194 (((class color) (min-colors 8))
195 (:background "cyan" :foreground "black" :underline t :weight bold))
196 (t (:inverse-video t))))
197 "Face for column display of entry properties."
198 :group 'org-faces)
200 (defface org-agenda-column-dateline
201 (org-compatible-face 'org-column
202 '((t nil)))
203 "Face used in agenda column view for datelines with summaries."
204 :group 'org-faces)
206 (defface org-warning
207 (org-compatible-face 'font-lock-warning-face
208 '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
209 (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
210 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
211 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
212 (t (:bold t))))
213 "Face for deadlines and TODO keywords."
214 :group 'org-faces)
216 (defface org-archived ; similar to shadow
217 (org-compatible-face 'shadow
218 '((((class color grayscale) (min-colors 88) (background light))
219 (:foreground "grey50"))
220 (((class color grayscale) (min-colors 88) (background dark))
221 (:foreground "grey70"))
222 (((class color) (min-colors 8) (background light))
223 (:foreground "green"))
224 (((class color) (min-colors 8) (background dark))
225 (:foreground "yellow"))))
226 "Face for headline with the ARCHIVE tag."
227 :group 'org-faces)
229 (defface org-link
230 (org-compatible-face 'link
231 '((((class color) (background light)) (:foreground "Purple" :underline t))
232 (((class color) (background dark)) (:foreground "Cyan" :underline t))
233 (t (:underline t))))
234 "Face for links."
235 :group 'org-faces)
237 (defface org-footnote
238 '((((class color) (background light)) (:foreground "Purple" :underline t))
239 (((class color) (background dark)) (:foreground "Cyan" :underline t))
240 (t (:underline t)))
241 "Face for footnotes."
242 :group 'org-faces)
244 (defface org-ellipsis
245 '((((class color) (background light)) (:foreground "DarkGoldenrod" :underline t))
246 (((class color) (background dark)) (:foreground "LightGoldenrod" :underline t))
247 (t (:strike-through t)))
248 "Face for the ellipsis in folded text."
249 :group 'org-faces)
251 (defface org-target
252 '((((class color) (background light)) (:underline t))
253 (((class color) (background dark)) (:underline t))
254 (t (:underline t)))
255 "Face for link targets."
256 :group 'org-faces)
258 (defface org-date
259 '((((class color) (background light)) (:foreground "Purple" :underline t))
260 (((class color) (background dark)) (:foreground "Cyan" :underline t))
261 (t (:underline t)))
262 "Face for date/time stamps."
263 :group 'org-faces)
265 (defface org-date-selected
266 (org-compatible-face nil
267 '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :inverse-video t))
268 (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :inverse-video t))
269 (((class color) (min-colors 8) (background light)) (:foreground "red" :inverse-video t))
270 (((class color) (min-colors 8) (background dark)) (:foreground "red" :inverse-video t))
271 (t (:inverse-video t))))
272 "Face for highlighting the calendar day when using `org-read-date'.
273 Using a bold face here might cause discrepancies while displaying the
274 calendar."
275 :group 'org-faces)
277 (defface org-sexp-date
278 '((((class color) (background light)) (:foreground "Purple"))
279 (((class color) (background dark)) (:foreground "Cyan"))
280 (t (:underline t)))
281 "Face for diary-like sexp date specifications."
282 :group 'org-faces)
284 (defface org-tag
285 '((t (:bold t)))
286 "Default face for tags.
287 Note that the variable `org-tag-faces' can be used to overrule this face for
288 specific tags."
289 :group 'org-faces)
291 (defface org-list-dt
292 '((t (:bold t)))
293 "Default face for definition terms in lists."
294 :group 'org-faces)
296 (defface org-todo ; font-lock-warning-face
297 (org-compatible-face nil
298 '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
299 (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
300 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
301 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
302 (t (:inverse-video t :bold t))))
303 "Face for TODO keywords."
304 :group 'org-faces)
306 (defface org-done ;; originally copied from font-lock-type-face
307 (org-compatible-face nil
308 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen" :bold t))
309 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen" :bold t))
310 (((class color) (min-colors 8)) (:foreground "green"))
311 (t (:bold t))))
312 "Face used for todo keywords that indicate DONE items."
313 :group 'org-faces)
315 (defface org-agenda-done ;; originally copied from font-lock-type-face
316 (org-compatible-face nil
317 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
318 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
319 (((class color) (min-colors 8)) (:foreground "green"))
320 (t (:bold nil))))
321 "Face used in agenda, to indicate lines switched to DONE.
322 This face is used to de-emphasize items that where brightly colored in the
323 agenda because they were things to do, or overdue. The DONE state itself
324 is of course immediately visible, but for example a passed deadline is
325 \(by default) very bright read. This face could be simply the default face
326 of the frame, for example."
327 :group 'org-faces)
329 (defface org-headline-done ;; originally copied from font-lock-string-face
330 (org-compatible-face nil
331 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
332 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
333 (((class color) (min-colors 8) (background light)) (:bold nil))))
334 "Face used to indicate that a headline is DONE.
335 This face is only used if `org-fontify-done-headline' is set. If applies
336 to the part of the headline after the DONE keyword."
337 :group 'org-faces)
339 (defcustom org-faces-easy-properties
340 '((todo . :foreground) (tag . :foreground) (priority . :foreground))
341 "The property changes by easy faces.
342 This is an alist, the keys show the area of application, the values
343 can be `:foreground' or `:background'. A color string for special
344 keywords will then be interpreted as either foreground or background
345 color."
346 :group 'org-faces
347 :group 'org-todo
348 :version "24.1"
349 :type '(repeat
350 (cons (choice (const todo) (const tag) (const priority))
351 (choice (const :foreground) (const :background)))))
353 (defcustom org-todo-keyword-faces nil
354 "Faces for specific TODO keywords.
355 This is a list of cons cells, with TODO keywords in the car
356 and faces in the cdr. The face can be a symbol, a color
357 as a string (in which case the rest is inherited from the `org-todo' face),
358 or a property list of attributes, like
359 (:foreground \"blue\" :weight bold :underline t).
360 If it is a color string, the variable `org-faces-easy-properties'
361 determines if it is a foreground or a background color."
362 :group 'org-faces
363 :group 'org-todo
364 :type '(repeat
365 (cons
366 (string :tag "Keyword")
367 (choice :tag "Face "
368 (string :tag "Color")
369 (sexp :tag "Face")))))
371 (defface org-priority ;; originally copied from font-lock-string-face
372 (org-compatible-face 'font-lock-keyword-face
373 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
374 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
375 (t (:italic t))))
376 "Face used for priority cookies."
377 :group 'org-faces)
379 (defcustom org-priority-faces nil
380 "Faces for specific Priorities.
381 This is a list of cons cells, with priority character in the car
382 and faces in the cdr. The face can be a symbol, a color as
383 as a string, or a property list of attributes, like
384 (:foreground \"blue\" :weight bold :underline t).
385 If it is a color string, the variable `org-faces-easy-properties'
386 determines if it is a foreground or a background color."
387 :group 'org-faces
388 :group 'org-todo
389 :type '(repeat
390 (cons
391 (character :tag "Priority")
392 (choice :tag "Face "
393 (string :tag "Color")
394 (sexp :tag "Face")))))
396 (defvar org-tags-special-faces-re nil)
397 (defun org-set-tag-faces (var value)
398 (set var value)
399 (if (not value)
400 (setq org-tags-special-faces-re nil)
401 (setq org-tags-special-faces-re
402 (concat ":\\(" (mapconcat 'car value "\\|") "\\):"))))
404 (defface org-checkbox
405 (org-compatible-face 'bold
406 '((t (:bold t))))
407 "Face for checkboxes."
408 :group 'org-faces)
410 (defface org-checkbox-statistics-todo
411 '((t (:inherit org-todo)))
412 "Face used for unfinished checkbox statistics."
413 :group 'org-faces)
415 (defface org-checkbox-statistics-done
416 '((t (:inherit org-done)))
417 "Face used for finished checkbox statistics."
418 :group 'org-faces)
420 (defcustom org-tag-faces nil
421 "Faces for specific tags.
422 This is a list of cons cells, with tags in the car and faces in the cdr.
423 The face can be a symbol, a foreground color (in which case the rest is
424 inherited from the `org-tag' face) or a property list of attributes,
425 like (:foreground \"blue\" :weight bold :underline t).
426 If you set this variable through customize, it will immediately be effective
427 in new buffers and in modified lines.
428 If you set it with Lisp, a restart of Emacs is required to activate the
429 changes."
430 :group 'org-faces
431 :group 'org-tags
432 :set 'org-set-tag-faces
433 :type '(repeat
434 (cons
435 (string :tag "Tag ")
436 (choice :tag "Face"
437 (string :tag "Foreground color")
438 (sexp :tag "Face")))))
440 (defface org-table ;; originally copied from font-lock-function-name-face
441 (org-compatible-face nil
442 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
443 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
444 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
445 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
446 (((class color) (min-colors 8) (background light)) (:foreground "blue"))
447 (((class color) (min-colors 8) (background dark)))))
448 "Face used for tables."
449 :group 'org-faces)
451 (defface org-formula
452 (org-compatible-face nil
453 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
454 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
455 (((class color) (min-colors 8) (background light)) (:foreground "red"))
456 (((class color) (min-colors 8) (background dark)) (:foreground "red"))
457 (t (:bold t :italic t))))
458 "Face for formulas."
459 :group 'org-faces)
461 (defface org-code
462 (org-compatible-face 'shadow
463 '((((class color grayscale) (min-colors 88) (background light))
464 (:foreground "grey50"))
465 (((class color grayscale) (min-colors 88) (background dark))
466 (:foreground "grey70"))
467 (((class color) (min-colors 8) (background light))
468 (:foreground "green"))
469 (((class color) (min-colors 8) (background dark))
470 (:foreground "yellow"))))
471 "Face for fixed-width text like code snippets."
472 :group 'org-faces
473 :version "22.1")
475 (defface org-meta-line
476 (org-compatible-face 'font-lock-comment-face nil)
477 "Face for meta lines starting with \"#+\"."
478 :group 'org-faces
479 :version "22.1")
481 (defface org-document-title
482 '((((class color) (background light)) (:foreground "midnight blue" :weight bold))
483 (((class color) (background dark)) (:foreground "pale turquoise" :weight bold))
484 (t (:weight bold)))
485 "Face for document title, i.e. that which follows the #+TITLE: keyword."
486 :group 'org-faces)
488 (defface org-document-info
489 '((((class color) (background light)) (:foreground "midnight blue"))
490 (((class color) (background dark)) (:foreground "pale turquoise"))
491 (t nil))
492 "Face for document date, author and email; i.e. that which
493 follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword."
494 :group 'org-faces)
496 (defface org-document-info-keyword
497 (org-compatible-face 'shadow
498 '((((class color grayscale) (min-colors 88) (background light))
499 (:foreground "grey50"))
500 (((class color grayscale) (min-colors 88) (background dark))
501 (:foreground "grey70"))
502 (((class color) (min-colors 8) (background light))
503 (:foreground "green"))
504 (((class color) (min-colors 8) (background dark))
505 (:foreground "yellow"))))
506 "Face for #+TITLE:, #+AUTHOR:, #+EMAIL: and #+DATE: keywords."
507 :group 'org-faces)
509 (defface org-block
510 (org-compatible-face 'shadow
511 '((((class color grayscale) (min-colors 88) (background light))
512 (:foreground "grey50"))
513 (((class color grayscale) (min-colors 88) (background dark))
514 (:foreground "grey70"))
515 (((class color) (min-colors 8) (background light))
516 (:foreground "green"))
517 (((class color) (min-colors 8) (background dark))
518 (:foreground "yellow"))))
519 "Face text in #+begin ... #+end blocks.
520 In addition to this face that take precedence for particular
521 languages. For instance, to change the block face for Emacs-Lisp
522 blocks define a `org-block-emacs-lisp' face."
523 :group 'org-faces
524 :version "22.1")
526 (defface org-block-begin-line
527 '((t (:inherit org-meta-line)))
528 "Face used for the line delimiting the begin of source blocks."
529 :group 'org-faces)
531 (defface org-block-end-line
532 '((t (:inherit org-block-begin-line)))
533 "Face used for the line delimiting the end of source blocks."
534 :group 'org-faces)
536 (defface org-verbatim
537 (org-compatible-face 'shadow
538 '((((class color grayscale) (min-colors 88) (background light))
539 (:foreground "grey50" :underline t))
540 (((class color grayscale) (min-colors 88) (background dark))
541 (:foreground "grey70" :underline t))
542 (((class color) (min-colors 8) (background light))
543 (:foreground "green" :underline t))
544 (((class color) (min-colors 8) (background dark))
545 (:foreground "yellow" :underline t))))
546 "Face for fixed-with text like code snippets."
547 :group 'org-faces
548 :version "22.1")
550 (defface org-quote
551 '((t (:inherit org-block)))
552 "Face for #+BEGIN_QUOTE ... #+END_QUOTE blocks."
553 :group 'org-faces)
555 (defface org-verse
556 '((t (:inherit org-block)))
557 "Face for #+BEGIN_VERSE ... #+END_VERSE blocks."
558 :group 'org-faces)
560 (defcustom org-fontify-quote-and-verse-blocks nil
561 "Non-nil means, add a special face to #+begin_quote and #+begin_verse block.
562 When nil, format these as normal Org. This is the default, because the
563 content of these blocks will still be treated as Org syntax."
564 :group 'org-faces
565 :version "24.1"
566 :type 'boolean)
568 (defface org-clock-overlay ;; copied from secondary-selection
569 (org-compatible-face nil
570 '((((class color) (min-colors 88) (background light))
571 (:background "LightGray" :foreground "black"))
572 (((class color) (min-colors 88) (background dark))
573 (:background "SkyBlue4" :foreground "white"))
574 (((class color) (min-colors 16) (background light))
575 (:background "gray" :foreground "black"))
576 (((class color) (min-colors 16) (background dark))
577 (:background "SkyBlue4" :foreground "white"))
578 (((class color) (min-colors 8))
579 (:background "cyan" :foreground "black"))
580 (t (:inverse-video t))))
581 "Basic face for displaying the secondary selection."
582 :group 'org-faces)
584 (defface org-agenda-structure ;; originally copied from font-lock-function-name-face
585 (org-compatible-face nil
586 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
587 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
588 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
589 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
590 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
591 (t (:bold t))))
592 "Face used in agenda for captions and dates."
593 :group 'org-faces)
595 (defface org-agenda-date
596 '((t (:inherit org-agenda-structure)))
597 "Face used in agenda for normal days."
598 :group 'org-faces)
600 (defface org-agenda-date-today
601 '((t (:inherit org-agenda-date :weight bold :italic t)))
602 "Face used in agenda for today."
603 :group 'org-faces)
605 (defface org-agenda-clocking
606 '((t (:inherit secondary-selection)))
607 "Face marking the current clock item in the agenda."
608 :group 'org-faces)
610 (defface org-agenda-date-weekend
611 '((t (:inherit org-agenda-date :weight bold)))
612 "Face used in agenda for weekend days.
614 See the variable `org-agenda-weekend-days' for a definition of
615 which days belong to the weekend."
616 :group 'org-faces)
618 (defface org-scheduled
619 (org-compatible-face nil
620 '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
621 (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
622 (((class color) (min-colors 8)) (:foreground "green"))
623 (t (:bold t :italic t))))
624 "Face for items scheduled for a certain day."
625 :group 'org-faces)
627 (defface org-scheduled-today
628 (org-compatible-face nil
629 '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
630 (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
631 (((class color) (min-colors 8)) (:foreground "green"))
632 (t (:bold t :italic t))))
633 "Face for items scheduled for a certain day."
634 :group 'org-faces)
636 (defface org-agenda-dimmed-todo-face
637 '((((background light)) (:foreground "grey50"))
638 (((background dark)) (:foreground "grey50")))
639 "Face used to dim blocked tasks in the agenda."
640 :group 'org-faces)
642 (defface org-scheduled-previously
643 (org-compatible-face nil
644 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
645 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
646 (((class color) (min-colors 8) (background light)) (:foreground "red"))
647 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
648 (t (:bold t))))
649 "Face for items scheduled previously, and not yet done."
650 :group 'org-faces)
652 (defface org-upcoming-deadline
653 (org-compatible-face nil
654 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
655 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
656 (((class color) (min-colors 8) (background light)) (:foreground "red"))
657 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
658 (t (:bold t))))
659 "Face for items scheduled previously, and not yet done."
660 :group 'org-faces)
662 (defcustom org-agenda-deadline-faces
663 '((1.0 . org-warning)
664 (0.5 . org-upcoming-deadline)
665 (0.0 . default))
666 "Faces for showing deadlines in the agenda.
667 This is a list of cons cells. The cdr of each cell is a face to be used,
668 and it can also just be like \\='(:foreground \"yellow\").
669 Each car is a fraction of the head-warning time that must have passed for
670 this the face in the cdr to be used for display. The numbers must be
671 given in descending order. The head-warning time is normally taken
672 from `org-deadline-warning-days', but can also be specified in the deadline
673 timestamp itself, like this:
675 DEADLINE: <2007-08-13 Mon -8d>
677 You may use d for days, w for weeks, m for months and y for years. Months
678 and years will only be treated in an approximate fashion (30.4 days for a
679 month and 365.24 days for a year)."
680 :group 'org-faces
681 :group 'org-agenda-daily/weekly
682 :type '(repeat
683 (cons
684 (number :tag "Fraction of head-warning time passed")
685 (sexp :tag "Face"))))
687 (defface org-agenda-restriction-lock
688 (org-compatible-face nil
689 '((((class color) (min-colors 88) (background light)) (:background "#eeeeee"))
690 (((class color) (min-colors 88) (background dark)) (:background "#1C1C1C"))
691 (((class color) (min-colors 16) (background light)) (:background "#eeeeee"))
692 (((class color) (min-colors 16) (background dark)) (:background "#1C1C1C"))
693 (((class color) (min-colors 8)) (:background "cyan" :foreground "black"))
694 (t (:inverse-video t))))
695 "Face for showing the agenda restriction lock."
696 :group 'org-faces)
698 (defface org-agenda-filter-tags
699 (org-compatible-face 'mode-line nil)
700 "Face for tag(s) in the mode-line when filtering the agenda."
701 :group 'org-faces)
703 (defface org-agenda-filter-regexp
704 (org-compatible-face 'mode-line nil)
705 "Face for regexp(s) in the mode-line when filtering the agenda."
706 :group 'org-faces)
708 (defface org-agenda-filter-category
709 (org-compatible-face 'mode-line nil)
710 "Face for categories(s) in the mode-line when filtering the agenda."
711 :group 'org-faces)
713 (defface org-time-grid ;; originally copied from font-lock-variable-name-face
714 (org-compatible-face nil
715 '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
716 (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
717 (((class color) (min-colors 8)) (:foreground "yellow" :weight light))))
718 "Face used for time grids."
719 :group 'org-faces)
721 (defface org-agenda-current-time
722 '((t (:inherit org-time-grid)))
723 "Face used to show the current time in the time grid."
724 :group 'org-faces)
726 (defface org-agenda-diary
727 (org-compatible-face 'default nil)
728 "Face used for agenda entries that come from the Emacs diary."
729 :group 'org-faces)
731 (defface org-agenda-calendar-event
732 (org-compatible-face 'default nil)
733 "Face used to show events and appointments in the agenda."
734 :group 'org-faces)
736 (defface org-agenda-calendar-sexp
737 (org-compatible-face 'default nil)
738 "Face used to show events computed from a S-expression."
739 :group 'org-faces)
741 (defconst org-level-faces
742 '(org-level-1 org-level-2 org-level-3 org-level-4
743 org-level-5 org-level-6 org-level-7 org-level-8
746 (defcustom org-n-level-faces (length org-level-faces)
747 "The number of different faces to be used for headlines.
748 Org-mode defines 8 different headline faces, so this can be at most 8.
749 If it is less than 8, the level-1 face gets re-used for level N+1 etc."
750 :type 'integer
751 :group 'org-faces)
753 (defcustom org-cycle-level-faces t
754 "Non-nil means level styles cycle after level `org-n-level-faces'.
755 Then so level org-n-level-faces+1 is styled like level 1.
756 If nil, then all levels >=org-n-level-faces are styled like
757 level org-n-level-faces"
758 :group 'org-appearance
759 :group 'org-faces
760 :version "24.1"
761 :type 'boolean)
763 (defface org-latex-and-related
764 (let ((font (cond ((assq :inherit custom-face-attributes)
765 '(:inherit underline))
766 (t '(:underline t)))))
767 `((((class grayscale) (background light))
768 (:foreground "DimGray" ,@font))
769 (((class grayscale) (background dark))
770 (:foreground "LightGray" ,@font))
771 (((class color) (background light))
772 (:foreground "SaddleBrown"))
773 (((class color) (background dark))
774 (:foreground "burlywood"))
775 (t (,@font))))
776 "Face used to highlight LaTeX data, entities and sub/superscript."
777 :group 'org-faces
778 :version "24.4"
779 :package-version '(Org . "8.0"))
781 (defface org-macro
782 (org-compatible-face 'org-latex-and-related nil)
783 "Face for macros."
784 :group 'org-faces
785 :version "24.4"
786 :package-version '(Org . "8.0"))
788 (defface org-tag-group
789 (org-compatible-face 'org-tag nil)
790 "Face for group tags."
791 :group 'org-faces
792 :version "24.4"
793 :package-version '(Org . "8.0"))
795 (defface org-mode-line-clock
796 '((t (:inherit mode-line)))
797 "Face used for clock display in mode line."
798 :group 'org-faces)
800 (defface org-mode-line-clock-overrun
801 '((t (:inherit mode-line :background "red")))
802 "Face used for clock display for overrun tasks in mode line."
803 :group 'org-faces)
805 (provide 'org-faces)
807 ;;; org-faces.el ends here