Fix last change on rcirc-print and rcirc-decode-coding-system
[emacs.git] / lisp / org / org-faces.el
blobe5877768fe732234bf9f951536b78b11f2f9d9b0
1 ;;; org-faces.el --- Face definitions for Org-mode.
3 ;; Copyright (C) 2004-2011 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 ;; Version: 7.4
9 ;;
10 ;; This file is part of GNU Emacs.
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation, either version 3 of the License, or
15 ;; (at your option) any later version.
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
24 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
26 ;;; Commentary:
28 ;; This file contains the face definitions for Org.
30 ;;; Code:
32 (require 'org-macs)
33 (require 'org-compat)
35 (defun org-copy-face (old-face new-face docstring &rest attributes)
36 (unless (facep new-face)
37 (if (fboundp 'set-face-attribute)
38 (progn
39 (make-face new-face)
40 (set-face-attribute new-face nil :inherit old-face)
41 (apply 'set-face-attribute new-face nil attributes)
42 (set-face-doc-string new-face docstring))
43 (copy-face old-face new-face)
44 (if (fboundp 'set-face-doc-string)
45 (set-face-doc-string new-face docstring)))))
46 (put 'org-copy-face 'lisp-indent-function 2)
48 (defgroup org-faces nil
49 "Faces in Org-mode."
50 :tag "Org Faces"
51 :group 'org-appearance)
53 (defface org-hide
54 '((((background light)) (:foreground "white"))
55 (((background dark)) (:foreground "black")))
56 "Face used to hide leading stars in headlines.
57 The foreground color of this face should be equal to the background
58 color of the frame."
59 :group 'org-faces)
61 (defface org-level-1 ;; originally copied from font-lock-function-name-face
62 (org-compatible-face 'outline-1
63 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
64 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
65 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
66 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
67 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
68 (t (:bold t))))
69 "Face used for level 1 headlines."
70 :group 'org-faces)
72 (defface org-level-2 ;; originally copied from font-lock-variable-name-face
73 (org-compatible-face 'outline-2
74 '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
75 (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
76 (((class color) (min-colors 8) (background light)) (:foreground "yellow"))
77 (((class color) (min-colors 8) (background dark)) (:foreground "yellow" :bold t))
78 (t (:bold t))))
79 "Face used for level 2 headlines."
80 :group 'org-faces)
82 (defface org-level-3 ;; originally copied from font-lock-keyword-face
83 (org-compatible-face 'outline-3
84 '((((class color) (min-colors 88) (background light)) (:foreground "Purple"))
85 (((class color) (min-colors 88) (background dark)) (:foreground "Cyan1"))
86 (((class color) (min-colors 16) (background light)) (:foreground "Purple"))
87 (((class color) (min-colors 16) (background dark)) (:foreground "Cyan"))
88 (((class color) (min-colors 8) (background light)) (:foreground "purple" :bold t))
89 (((class color) (min-colors 8) (background dark)) (:foreground "cyan" :bold t))
90 (t (:bold t))))
91 "Face used for level 3 headlines."
92 :group 'org-faces)
94 (defface org-level-4 ;; originally copied from font-lock-comment-face
95 (org-compatible-face 'outline-4
96 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
97 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
98 (((class color) (min-colors 16) (background light)) (:foreground "red"))
99 (((class color) (min-colors 16) (background dark)) (:foreground "red1"))
100 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
101 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
102 (t (:bold t))))
103 "Face used for level 4 headlines."
104 :group 'org-faces)
106 (defface org-level-5 ;; originally copied from font-lock-type-face
107 (org-compatible-face 'outline-5
108 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
109 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
110 (((class color) (min-colors 8)) (:foreground "green"))))
111 "Face used for level 5 headlines."
112 :group 'org-faces)
114 (defface org-level-6 ;; originally copied from font-lock-constant-face
115 (org-compatible-face 'outline-6
116 '((((class color) (min-colors 16) (background light)) (:foreground "CadetBlue"))
117 (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine"))
118 (((class color) (min-colors 8)) (:foreground "magenta"))))
119 "Face used for level 6 headlines."
120 :group 'org-faces)
122 (defface org-level-7 ;; originally copied from font-lock-builtin-face
123 (org-compatible-face 'outline-7
124 '((((class color) (min-colors 16) (background light)) (:foreground "Orchid"))
125 (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue"))
126 (((class color) (min-colors 8)) (:foreground "blue"))))
127 "Face used for level 7 headlines."
128 :group 'org-faces)
130 (defface org-level-8 ;; originally copied from font-lock-string-face
131 (org-compatible-face 'outline-8
132 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
133 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
134 (((class color) (min-colors 8)) (:foreground "green"))))
135 "Face used for level 8 headlines."
136 :group 'org-faces)
138 (defface org-special-keyword ;; originally copied from font-lock-string-face
139 (org-compatible-face nil
140 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
141 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
142 (t (:italic t))))
143 "Face used for special keywords."
144 :group 'org-faces)
146 (defface org-drawer ;; originally copied from font-lock-function-name-face
147 (org-compatible-face nil
148 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
149 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
150 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
151 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
152 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
153 (t (:bold t))))
154 "Face used for drawers."
155 :group 'org-faces)
157 (defface org-property-value nil
158 "Face used for the value of a property."
159 :group 'org-faces)
161 (defface org-column
162 (org-compatible-face nil
163 '((((class color) (min-colors 16) (background light))
164 (:background "grey90" :weight normal :slant normal :strike-through nil
165 :underline nil))
166 (((class color) (min-colors 16) (background dark))
167 (:background "grey30" :weight normal :slant normal :strike-through nil
168 :underline nil))
169 (((class color) (min-colors 8))
170 (:background "cyan" :foreground "black"
171 :weight normal :slant normal :strike-through nil
172 :underline nil))
173 (t (:inverse-video t))))
174 "Face for column display of entry properties.
175 This is actually only part of the face definition for the text in column view.
176 The following faces apply, with this priority.
178 1. The color of the reference face. This is normally the level fact that
179 is used in the outline. In agenda-mode, it will be the face of the
180 first character in the line. The color is explicitly retained to
181 make sure that the column line still looks a bit like the structure
182 line it is masking.
184 2. The `org-column' face.
186 3. The remaining properties of the reference face.
188 Since column view works by putting overlays with a display property
189 over individual characters in the buffer, the face of the underlining
190 character (this might for example be the a TODO keyword) might still
191 shine through in some properties. So when your column view looks
192 funny, with \"random\" colors, weight, strike-through, try to explicitly
193 set the properties in the `org-column' face. For example, set
194 :underline to nil, or the :slant to `normal'.
196 Under XEmacs, the rules are simpler, because the XEmacs version of
197 column view defines special faces for each outline level. See the file
198 `org-colview-xemacs.el' for details."
199 :group 'org-faces)
201 (defface org-column-title
202 (org-compatible-face nil
203 '((((class color) (min-colors 16) (background light))
204 (:background "grey90" :underline t :weight bold))
205 (((class color) (min-colors 16) (background dark))
206 (:background "grey30" :underline t :weight bold))
207 (((class color) (min-colors 8))
208 (:background "cyan" :foreground "black" :underline t :weight bold))
209 (t (:inverse-video t))))
210 "Face for column display of entry properties."
211 :group 'org-faces)
213 (when (fboundp 'set-face-attribute)
214 ;; Make sure that a fixed-width face is used when we have a column table.
215 (set-face-attribute 'org-column nil
216 :height (face-attribute 'default :height)
217 :family (face-attribute 'default :family)))
219 (defface org-agenda-column-dateline
220 (org-compatible-face 'org-column
221 '((t nil)))
222 "Face used in agenda column view for datelines with summaries."
223 :group 'org-faces)
225 (defface org-warning
226 (org-compatible-face 'font-lock-warning-face
227 '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
228 (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
229 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
230 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
231 (t (:bold t))))
232 "Face for deadlines and TODO keywords."
233 :group 'org-faces)
235 (defface org-archived ; similar to shadow
236 (org-compatible-face 'shadow
237 '((((class color grayscale) (min-colors 88) (background light))
238 (:foreground "grey50"))
239 (((class color grayscale) (min-colors 88) (background dark))
240 (:foreground "grey70"))
241 (((class color) (min-colors 8) (background light))
242 (:foreground "green"))
243 (((class color) (min-colors 8) (background dark))
244 (:foreground "yellow"))))
245 "Face for headline with the ARCHIVE tag."
246 :group 'org-faces)
248 (defface org-link
249 '((t :inherit link))
250 "Face for links."
251 :group 'org-faces)
253 (defface org-footnote
254 '((((class color) (background light)) (:foreground "Purple" :underline t))
255 (((class color) (background dark)) (:foreground "Cyan" :underline t))
256 (t (:underline t)))
257 "Face for links."
258 :group 'org-faces)
260 (defface org-ellipsis
261 '((((class color) (background light)) (:foreground "DarkGoldenrod" :underline t))
262 (((class color) (background dark)) (:foreground "LightGoldenrod" :underline t))
263 (t (:strike-through t)))
264 "Face for the ellipsis in folded text."
265 :group 'org-faces)
267 (defface org-target
268 '((((class color) (background light)) (:underline t))
269 (((class color) (background dark)) (:underline t))
270 (t (:underline t)))
271 "Face for link targets."
272 :group 'org-faces)
274 (defface org-date
275 '((((class color) (background light)) (:foreground "Purple" :underline t))
276 (((class color) (background dark)) (:foreground "Cyan" :underline t))
277 (t (:underline t)))
278 "Face for date/time stamps."
279 :group 'org-faces)
281 (defface org-sexp-date
282 '((((class color) (background light)) (:foreground "Purple"))
283 (((class color) (background dark)) (:foreground "Cyan"))
284 (t (:underline t)))
285 "Face for diary-like sexp date specifications."
286 :group 'org-faces)
288 (defface org-tag
289 '((t (:bold t)))
290 "Default face for tags.
291 Note that the variable `org-tag-faces' can be used to overrule this face for
292 specific tags."
293 :group 'org-faces)
295 (defface org-todo ; font-lock-warning-face
296 (org-compatible-face nil
297 '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
298 (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
299 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
300 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
301 (t (:inverse-video t :bold t))))
302 "Face for TODO keywords."
303 :group 'org-faces)
305 (defface org-done ;; originally copied from font-lock-type-face
306 (org-compatible-face nil
307 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen" :bold t))
308 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen" :bold t))
309 (((class color) (min-colors 8)) (:foreground "green"))
310 (t (:bold t))))
311 "Face used for todo keywords that indicate DONE items."
312 :group 'org-faces)
314 (defface org-agenda-done ;; originally copied from font-lock-type-face
315 (org-compatible-face nil
316 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
317 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
318 (((class color) (min-colors 8)) (:foreground "green"))
319 (t (:bold nil))))
320 "Face used in agenda, to indicate lines switched to DONE.
321 This face is used to de-emphasize items that where brightly colord in the
322 agenda because they were things to do, or overdue. The DONE state itself
323 is of course immediately visible, but for example a passed deadline is
324 \(by default) very bright read. This face could be simply the default face
325 of the frame, for example."
326 :group 'org-faces)
328 (defface org-headline-done ;; originally copied from font-lock-string-face
329 (org-compatible-face nil
330 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
331 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
332 (((class color) (min-colors 8) (background light)) (:bold nil))))
333 "Face used to indicate that a headline is DONE.
334 This face is only used if `org-fontify-done-headline' is set. If applies
335 to the part of the headline after the DONE keyword."
336 :group 'org-faces)
338 (defcustom org-faces-easy-properties
339 '((todo . :foreground) (tag . :foreground) (priority . :foreground))
340 "The property changes by easy faces.
341 This is an alist, the keys show the area of application, the values
342 can be `:foreground' or `:background'. A color string for special
343 keywords will then be interpreted as either foreground or background
344 color."
345 :group 'org-faces
346 :group 'org-todo
347 :type '(repeat
348 (cons (choice (const todo) (const tag) (const priority))
349 (choice (const :foreground) (const :background)))))
351 (defcustom org-todo-keyword-faces nil
352 "Faces for specific TODO keywords.
353 This is a list of cons cells, with TODO keywords in the car
354 and faces in the cdr. The face can be a symbol, a color
355 as a string (in which case the rest is inherited from the `org-todo' face),
356 or a property list of attributes, like
357 (:foreground \"blue\" :weight bold :underline t).
358 If it is a color string, the variable `org-faces-easy-properties'
359 determines if it is a foreground or a background color."
360 :group 'org-faces
361 :group 'org-todo
362 :type '(repeat
363 (cons
364 (string :tag "Keyword")
365 (choice :tag "Face "
366 (string :tag "Color")
367 (sexp :tag "Face")))))
369 (defcustom org-priority-faces nil
370 "Faces for specific Priorities.
371 This is a list of cons cells, with priority character in the car
372 and faces in the cdr. The face can be a symbol, a color as
373 as a string, or a property list of attributes, like
374 (:foreground \"blue\" :weight bold :underline t).
375 If it is a color string, the variable `org-faces-easy-properties'
376 determines if it is a foreground or a background color."
377 :group 'org-faces
378 :group 'org-todo
379 :type '(repeat
380 (cons
381 (character :tag "Priority")
382 (choice :tag "Face "
383 (string :tag "Color")
384 (sexp :tag "Face")))))
386 (defvar org-tags-special-faces-re nil)
387 (defun org-set-tag-faces (var value)
388 (set var value)
389 (if (not value)
390 (setq org-tags-special-faces-re nil)
391 (setq org-tags-special-faces-re
392 (concat ":\\(" (mapconcat 'car value "\\|") "\\):"))))
394 (defface org-checkbox
395 (org-compatible-face 'bold
396 '((t (:bold t))))
397 "Face for checkboxes"
398 :group 'org-faces)
401 (org-copy-face 'org-todo 'org-checkbox-statistics-todo
402 "Face used for unfinished checkbox statistics.")
404 (org-copy-face 'org-done 'org-checkbox-statistics-done
405 "Face used for finished checkbox statistics.")
407 (defcustom org-tag-faces nil
408 "Faces for specific tags.
409 This is a list of cons cells, with tags in the car and faces in the cdr.
410 The face can be a symbol, a foreground color (in which case the rest is
411 inherited from the `org-tag' face) or a property list of attributes,
412 like (:foreground \"blue\" :weight bold :underline t).
413 If you set this variable through customize, it will immediately be effective
414 in new buffers and in modified lines.
415 If you set it with Lisp, a restart of Emacs is required to activate the
416 changes."
417 :group 'org-faces
418 :group 'org-tags
419 :set 'org-set-tag-faces
420 :type '(repeat
421 (cons
422 (string :tag "Tag ")
423 (choice :tag "Face"
424 (string :tag "Foreground color")
425 (sexp :tag "Face")))))
427 (defface org-table ;; originally copied from font-lock-function-name-face
428 (org-compatible-face nil
429 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
430 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
431 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
432 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
433 (((class color) (min-colors 8) (background light)) (:foreground "blue"))
434 (((class color) (min-colors 8) (background dark)))))
435 "Face used for tables."
436 :group 'org-faces)
438 (defface org-formula
439 (org-compatible-face nil
440 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
441 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
442 (((class color) (min-colors 8) (background light)) (:foreground "red"))
443 (((class color) (min-colors 8) (background dark)) (:foreground "red"))
444 (t (:bold t :italic t))))
445 "Face for formulas."
446 :group 'org-faces)
448 (defface org-code
449 (org-compatible-face 'shadow
450 '((((class color grayscale) (min-colors 88) (background light))
451 (:foreground "grey50"))
452 (((class color grayscale) (min-colors 88) (background dark))
453 (:foreground "grey70"))
454 (((class color) (min-colors 8) (background light))
455 (:foreground "green"))
456 (((class color) (min-colors 8) (background dark))
457 (:foreground "yellow"))))
458 "Face for fixed-width text like code snippets."
459 :group 'org-faces
460 :version "22.1")
462 (defface org-meta-line
463 (org-compatible-face 'font-lock-comment-face nil)
464 "Face for meta lines startin with \"#+\"."
465 :group 'org-faces
466 :version "22.1")
468 (defface org-document-title
469 '((((class color) (background light)) (:foreground "midnight blue" :weight bold :height 1.44))
470 (((class color) (background dark)) (:foreground "pale turquoise" :weight bold :height 1.44))
471 (t (:weight bold :height 1.44)))
472 "Face for document title, i.e. that which follows the #+TITLE: keyword."
473 :group 'org-faces)
475 (defface org-document-info
476 '((((class color) (background light)) (:foreground "midnight blue"))
477 (((class color) (background dark)) (:foreground "pale turquoise"))
478 (t nil))
479 "Face for document date, author and email; i.e. that which
480 follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword."
481 :group 'org-faces)
483 (defface org-document-info-keyword
484 (org-compatible-face 'shadow
485 '((((class color grayscale) (min-colors 88) (background light))
486 (:foreground "grey50"))
487 (((class color grayscale) (min-colors 88) (background dark))
488 (:foreground "grey70"))
489 (((class color) (min-colors 8) (background light))
490 (:foreground "green"))
491 (((class color) (min-colors 8) (background dark))
492 (:foreground "yellow"))))
493 "Face for #+TITLE:, #+AUTHOR:, #+EMAIL: and #+DATE: keywords."
494 :group 'org-faces)
496 (defface org-block
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 text in #+begin ... #+end blocks."
507 :group 'org-faces
508 :version "22.1")
510 (defface org-verbatim
511 (org-compatible-face 'shadow
512 '((((class color grayscale) (min-colors 88) (background light))
513 (:foreground "grey50" :underline t))
514 (((class color grayscale) (min-colors 88) (background dark))
515 (:foreground "grey70" :underline t))
516 (((class color) (min-colors 8) (background light))
517 (:foreground "green" :underline t))
518 (((class color) (min-colors 8) (background dark))
519 (:foreground "yellow" :underline t))))
520 "Face for fixed-with text like code snippets."
521 :group 'org-faces
522 :version "22.1")
524 (org-copy-face 'org-block 'org-quote
525 "Face for #+BEGIN_QUOTE ... #+END_QUOTE blocks.")
526 (org-copy-face 'org-block 'org-verse
527 "Face for #+BEGIN_VERSE ... #+END_VERSE blocks.")
529 (defcustom org-fontify-quote-and-verse-blocks nil
530 "Non-nil means, add a special face to #+begin_quote and #+begin_verse block.
531 When nil, format these as normal Org. This is the default, because the
532 content of these blocks will still be treated as Org syntax."
533 :group 'org-faces
534 :type 'boolean)
536 (defface org-clock-overlay ;; copied from secondary-selection
537 (org-compatible-face nil
538 '((((class color) (min-colors 88) (background light))
539 (:background "yellow1"))
540 (((class color) (min-colors 88) (background dark))
541 (:background "SkyBlue4"))
542 (((class color) (min-colors 16) (background light))
543 (:background "yellow"))
544 (((class color) (min-colors 16) (background dark))
545 (:background "SkyBlue4"))
546 (((class color) (min-colors 8))
547 (:background "cyan" :foreground "black"))
548 (t (:inverse-video t))))
549 "Basic face for displaying the secondary selection."
550 :group 'org-faces)
552 (defface org-agenda-structure ;; originally copied from font-lock-function-name-face
553 (org-compatible-face nil
554 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
555 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
556 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
557 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
558 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
559 (t (:bold t))))
560 "Face used in agenda for captions and dates."
561 :group 'org-faces)
563 (org-copy-face 'org-agenda-structure 'org-agenda-date
564 "Face used in agenda for normal days.")
566 (org-copy-face 'org-agenda-date 'org-agenda-date-today
567 "Face used in agenda for today."
568 :weight 'bold :italic 't)
570 (org-copy-face 'secondary-selection 'org-agenda-clocking
571 "Face marking the current clock item in the agenda.")
573 (org-copy-face 'org-agenda-date 'org-agenda-date-weekend
574 "Face used in agenda for weekend days.
575 See the variable `org-agenda-weekend-days' for a definition of which days
576 belong to the weekend."
577 :weight 'bold)
579 (defface org-scheduled
580 (org-compatible-face nil
581 '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
582 (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
583 (((class color) (min-colors 8)) (:foreground "green"))
584 (t (:bold t :italic t))))
585 "Face for items scheduled for a certain day."
586 :group 'org-faces)
588 (defface org-scheduled-today
589 (org-compatible-face nil
590 '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
591 (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
592 (((class color) (min-colors 8)) (:foreground "green"))
593 (t (:bold t :italic t))))
594 "Face for items scheduled for a certain day."
595 :group 'org-faces)
597 (defface org-agenda-dimmed-todo-face
598 '((((background light)) (:foreground "grey50"))
599 (((background dark)) (:foreground "grey50")))
600 "Face used to dim blocked tasks in the agenda."
601 :group 'org-faces)
603 (defface org-scheduled-previously
604 (org-compatible-face nil
605 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
606 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
607 (((class color) (min-colors 8) (background light)) (:foreground "red"))
608 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
609 (t (:bold t))))
610 "Face for items scheduled previously, and not yet done."
611 :group 'org-faces)
613 (defface org-upcoming-deadline
614 (org-compatible-face nil
615 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
616 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
617 (((class color) (min-colors 8) (background light)) (:foreground "red"))
618 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
619 (t (:bold t))))
620 "Face for items scheduled previously, and not yet done."
621 :group 'org-faces)
623 (defcustom org-agenda-deadline-faces
624 '((1.0 . org-warning)
625 (0.5 . org-upcoming-deadline)
626 (0.0 . default))
627 "Faces for showing deadlines in the agenda.
628 This is a list of cons cells. The cdr of each cell is a face to be used,
629 and it can also just be like '(:foreground \"yellow\").
630 Each car is a fraction of the head-warning time that must have passed for
631 this the face in the cdr to be used for display. The numbers must be
632 given in descending order. The head-warning time is normally taken
633 from `org-deadline-warning-days', but can also be specified in the deadline
634 timestamp itself, like this:
636 DEADLINE: <2007-08-13 Mon -8d>
638 You may use d for days, w for weeks, m for months and y for years. Months
639 and years will only be treated in an approximate fashion (30.4 days for a
640 month and 365.24 days for a year)."
641 :group 'org-faces
642 :group 'org-agenda-daily/weekly
643 :type '(repeat
644 (cons
645 (number :tag "Fraction of head-warning time passed")
646 (sexp :tag "Face"))))
648 (defface org-agenda-restriction-lock
649 (org-compatible-face nil
650 '((((class color) (min-colors 88) (background light)) (:background "yellow1"))
651 (((class color) (min-colors 88) (background dark)) (:background "skyblue4"))
652 (((class color) (min-colors 16) (background light)) (:background "yellow1"))
653 (((class color) (min-colors 16) (background dark)) (:background "skyblue4"))
654 (((class color) (min-colors 8)) (:background "cyan" :foreground "black"))
655 (t (:inverse-video t))))
656 "Face for showing the agenda restriction lock."
657 :group 'org-faces)
659 (defface org-time-grid ;; originally copied from font-lock-variable-name-face
660 (org-compatible-face nil
661 '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
662 (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
663 (((class color) (min-colors 8)) (:foreground "yellow" :weight light))))
664 "Face used for time grids."
665 :group 'org-faces)
667 (defface org-agenda-diary
668 (org-compatible-face 'default
669 nil)
670 "Face used for agenda entries that come from the Emacs diary."
671 :group 'org-faces)
673 (defconst org-level-faces
674 '(org-level-1 org-level-2 org-level-3 org-level-4
675 org-level-5 org-level-6 org-level-7 org-level-8
678 (defcustom org-n-level-faces (length org-level-faces)
679 "The number of different faces to be used for headlines.
680 Org-mode defines 8 different headline faces, so this can be at most 8.
681 If it is less than 8, the level-1 face gets re-used for level N+1 etc."
682 :type 'integer
683 :group 'org-faces)
685 (defcustom org-cycle-level-faces t
686 "Non-nil means level styles cycle after level `org-n-level-faces'.
687 Then so level org-n-level-faces+1 is styled like level 1.
688 If nil, then all levels >=org-n-level-faces are styled like
689 level org-n-level-faces"
690 :group 'org-appearance
691 :group 'org-faces
692 :type 'boolean)
694 (defface org-latex-and-export-specials
695 (let ((font (cond ((assq :inherit custom-face-attributes)
696 '(:inherit underline))
697 (t '(:underline t)))))
698 `((((class grayscale) (background light))
699 (:foreground "DimGray" ,@font))
700 (((class grayscale) (background dark))
701 (:foreground "LightGray" ,@font))
702 (((class color) (background light))
703 (:foreground "SaddleBrown"))
704 (((class color) (background dark))
705 (:foreground "burlywood"))
706 (t (,@font))))
707 "Face used to highlight math latex and other special exporter stuff."
708 :group 'org-faces)
710 (org-copy-face 'modeline 'org-mode-line-clock
711 "Face used for clock display in mode line.")
712 (org-copy-face 'modeline 'org-mode-line-clock-overrun
713 "Face used for clock display for overrun tasks in mode line."
714 :background "red")
716 (provide 'org-faces)
719 ;;; org-faces.el ends here