* dbusbind.c (Fdbus_register_signal): When service is not
[emacs.git] / lisp / org / org-faces.el
blobaf9632eec44f2d74b8cc3f487b2b0b4b3026a9cd
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.7
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-default
54 (org-compatible-face 'default nil)
55 "Face used for default text."
56 :group 'org-faces)
58 (defface org-hide
59 '((((background light)) (:foreground "white"))
60 (((background dark)) (:foreground "black")))
61 "Face used to hide leading stars in headlines.
62 The foreground color of this face should be equal to the background
63 color of the frame."
64 :group 'org-faces)
66 (defface org-level-1 ;; originally copied from font-lock-function-name-face
67 (org-compatible-face 'outline-1
68 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
69 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
70 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
71 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
72 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
73 (t (:bold t))))
74 "Face used for level 1 headlines."
75 :group 'org-faces)
77 (defface org-level-2 ;; originally copied from font-lock-variable-name-face
78 (org-compatible-face 'outline-2
79 '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
80 (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
81 (((class color) (min-colors 8) (background light)) (:foreground "yellow"))
82 (((class color) (min-colors 8) (background dark)) (:foreground "yellow" :bold t))
83 (t (:bold t))))
84 "Face used for level 2 headlines."
85 :group 'org-faces)
87 (defface org-level-3 ;; originally copied from font-lock-keyword-face
88 (org-compatible-face 'outline-3
89 '((((class color) (min-colors 88) (background light)) (:foreground "Purple"))
90 (((class color) (min-colors 88) (background dark)) (:foreground "Cyan1"))
91 (((class color) (min-colors 16) (background light)) (:foreground "Purple"))
92 (((class color) (min-colors 16) (background dark)) (:foreground "Cyan"))
93 (((class color) (min-colors 8) (background light)) (:foreground "purple" :bold t))
94 (((class color) (min-colors 8) (background dark)) (:foreground "cyan" :bold t))
95 (t (:bold t))))
96 "Face used for level 3 headlines."
97 :group 'org-faces)
99 (defface org-level-4 ;; originally copied from font-lock-comment-face
100 (org-compatible-face 'outline-4
101 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
102 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
103 (((class color) (min-colors 16) (background light)) (:foreground "red"))
104 (((class color) (min-colors 16) (background dark)) (:foreground "red1"))
105 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
106 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
107 (t (:bold t))))
108 "Face used for level 4 headlines."
109 :group 'org-faces)
111 (defface org-level-5 ;; originally copied from font-lock-type-face
112 (org-compatible-face 'outline-5
113 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
114 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
115 (((class color) (min-colors 8)) (:foreground "green"))))
116 "Face used for level 5 headlines."
117 :group 'org-faces)
119 (defface org-level-6 ;; originally copied from font-lock-constant-face
120 (org-compatible-face 'outline-6
121 '((((class color) (min-colors 16) (background light)) (:foreground "CadetBlue"))
122 (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine"))
123 (((class color) (min-colors 8)) (:foreground "magenta"))))
124 "Face used for level 6 headlines."
125 :group 'org-faces)
127 (defface org-level-7 ;; originally copied from font-lock-builtin-face
128 (org-compatible-face 'outline-7
129 '((((class color) (min-colors 16) (background light)) (:foreground "Orchid"))
130 (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue"))
131 (((class color) (min-colors 8)) (:foreground "blue"))))
132 "Face used for level 7 headlines."
133 :group 'org-faces)
135 (defface org-level-8 ;; originally copied from font-lock-string-face
136 (org-compatible-face 'outline-8
137 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
138 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
139 (((class color) (min-colors 8)) (:foreground "green"))))
140 "Face used for level 8 headlines."
141 :group 'org-faces)
143 (defface org-special-keyword ;; originally copied from font-lock-string-face
144 (org-compatible-face 'font-lock-keyword-face
145 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
146 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
147 (t (:italic t))))
148 "Face used for special keywords."
149 :group 'org-faces)
151 (defface org-drawer ;; originally copied from font-lock-function-name-face
152 (org-compatible-face nil
153 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
154 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
155 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
156 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
157 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
158 (t (:bold t))))
159 "Face used for drawers."
160 :group 'org-faces)
162 (defface org-property-value nil
163 "Face used for the value of a property."
164 :group 'org-faces)
166 (defface org-column
167 (org-compatible-face nil
168 '((((class color) (min-colors 16) (background light))
169 (:background "grey90" :weight normal :slant normal :strike-through nil
170 :underline nil))
171 (((class color) (min-colors 16) (background dark))
172 (:background "grey30" :weight normal :slant normal :strike-through nil
173 :underline nil))
174 (((class color) (min-colors 8))
175 (:background "cyan" :foreground "black"
176 :weight normal :slant normal :strike-through nil
177 :underline nil))
178 (t (:inverse-video t))))
179 "Face for column display of entry properties.
180 This is actually only part of the face definition for the text in column view.
181 The following faces apply, with this priority.
183 1. The color of the reference face. This is normally the level fact that
184 is used in the outline. In agenda-mode, it will be the face of the
185 first character in the line. The color is explicitly retained to
186 make sure that the column line still looks a bit like the structure
187 line it is masking.
189 2. The `org-column' face.
191 3. The remaining properties of the reference face.
193 Since column view works by putting overlays with a display property
194 over individual characters in the buffer, the face of the underlining
195 character (this might for example be the a TODO keyword) might still
196 shine through in some properties. So when your column view looks
197 funny, with \"random\" colors, weight, strike-through, try to explicitly
198 set the properties in the `org-column' face. For example, set
199 :underline to nil, or the :slant to `normal'.
201 Under XEmacs, the rules are simpler, because the XEmacs version of
202 column view defines special faces for each outline level. See the file
203 `org-colview-xemacs.el' for details."
204 :group 'org-faces)
206 (defface org-column-title
207 (org-compatible-face nil
208 '((((class color) (min-colors 16) (background light))
209 (:background "grey90" :underline t :weight bold))
210 (((class color) (min-colors 16) (background dark))
211 (:background "grey30" :underline t :weight bold))
212 (((class color) (min-colors 8))
213 (:background "cyan" :foreground "black" :underline t :weight bold))
214 (t (:inverse-video t))))
215 "Face for column display of entry properties."
216 :group 'org-faces)
218 (when (fboundp 'set-face-attribute)
219 ;; Make sure that a fixed-width face is used when we have a column table.
220 (set-face-attribute 'org-column nil
221 :height (face-attribute 'default :height)
222 :family (face-attribute 'default :family)))
224 (defface org-agenda-column-dateline
225 (org-compatible-face 'org-column
226 '((t nil)))
227 "Face used in agenda column view for datelines with summaries."
228 :group 'org-faces)
230 (defface org-warning
231 (org-compatible-face 'font-lock-warning-face
232 '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
233 (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
234 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
235 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
236 (t (:bold t))))
237 "Face for deadlines and TODO keywords."
238 :group 'org-faces)
240 (defface org-archived ; similar to shadow
241 (org-compatible-face 'shadow
242 '((((class color grayscale) (min-colors 88) (background light))
243 (:foreground "grey50"))
244 (((class color grayscale) (min-colors 88) (background dark))
245 (:foreground "grey70"))
246 (((class color) (min-colors 8) (background light))
247 (:foreground "green"))
248 (((class color) (min-colors 8) (background dark))
249 (:foreground "yellow"))))
250 "Face for headline with the ARCHIVE tag."
251 :group 'org-faces)
253 (defface org-link
254 (org-compatible-face 'link
255 '((((class color) (background light)) (:foreground "Purple" :underline t))
256 (((class color) (background dark)) (:foreground "Cyan" :underline t))
257 (t (:underline t))))
258 "Face for links."
259 :group 'org-faces)
261 (defface org-footnote
262 '((((class color) (background light)) (:foreground "Purple" :underline t))
263 (((class color) (background dark)) (:foreground "Cyan" :underline t))
264 (t (:underline t)))
265 "Face for links."
266 :group 'org-faces)
268 (defface org-ellipsis
269 '((((class color) (background light)) (:foreground "DarkGoldenrod" :underline t))
270 (((class color) (background dark)) (:foreground "LightGoldenrod" :underline t))
271 (t (:strike-through t)))
272 "Face for the ellipsis in folded text."
273 :group 'org-faces)
275 (defface org-target
276 '((((class color) (background light)) (:underline t))
277 (((class color) (background dark)) (:underline t))
278 (t (:underline t)))
279 "Face for link targets."
280 :group 'org-faces)
282 (defface org-date
283 '((((class color) (background light)) (:foreground "Purple" :underline t))
284 (((class color) (background dark)) (:foreground "Cyan" :underline t))
285 (t (:underline t)))
286 "Face for date/time stamps."
287 :group 'org-faces)
289 (defface org-sexp-date
290 '((((class color) (background light)) (:foreground "Purple"))
291 (((class color) (background dark)) (:foreground "Cyan"))
292 (t (:underline t)))
293 "Face for diary-like sexp date specifications."
294 :group 'org-faces)
296 (defface org-tag
297 '((t (:bold t)))
298 "Default face for tags.
299 Note that the variable `org-tag-faces' can be used to overrule this face for
300 specific tags."
301 :group 'org-faces)
303 (defface org-todo ; font-lock-warning-face
304 (org-compatible-face nil
305 '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
306 (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
307 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
308 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
309 (t (:inverse-video t :bold t))))
310 "Face for TODO keywords."
311 :group 'org-faces)
313 (defface org-done ;; originally copied from font-lock-type-face
314 (org-compatible-face nil
315 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen" :bold t))
316 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen" :bold t))
317 (((class color) (min-colors 8)) (:foreground "green"))
318 (t (:bold t))))
319 "Face used for todo keywords that indicate DONE items."
320 :group 'org-faces)
322 (defface org-agenda-done ;; originally copied from font-lock-type-face
323 (org-compatible-face nil
324 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
325 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
326 (((class color) (min-colors 8)) (:foreground "green"))
327 (t (:bold nil))))
328 "Face used in agenda, to indicate lines switched to DONE.
329 This face is used to de-emphasize items that where brightly colored in the
330 agenda because they were things to do, or overdue. The DONE state itself
331 is of course immediately visible, but for example a passed deadline is
332 \(by default) very bright read. This face could be simply the default face
333 of the frame, for example."
334 :group 'org-faces)
336 (defface org-headline-done ;; originally copied from font-lock-string-face
337 (org-compatible-face nil
338 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
339 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
340 (((class color) (min-colors 8) (background light)) (:bold nil))))
341 "Face used to indicate that a headline is DONE.
342 This face is only used if `org-fontify-done-headline' is set. If applies
343 to the part of the headline after the DONE keyword."
344 :group 'org-faces)
346 (defcustom org-faces-easy-properties
347 '((todo . :foreground) (tag . :foreground) (priority . :foreground))
348 "The property changes by easy faces.
349 This is an alist, the keys show the area of application, the values
350 can be `:foreground' or `:background'. A color string for special
351 keywords will then be interpreted as either foreground or background
352 color."
353 :group 'org-faces
354 :group 'org-todo
355 :type '(repeat
356 (cons (choice (const todo) (const tag) (const priority))
357 (choice (const :foreground) (const :background)))))
359 (defcustom org-todo-keyword-faces nil
360 "Faces for specific TODO keywords.
361 This is a list of cons cells, with TODO keywords in the car
362 and faces in the cdr. The face can be a symbol, a color
363 as a string (in which case the rest is inherited from the `org-todo' face),
364 or a property list of attributes, like
365 (:foreground \"blue\" :weight bold :underline t).
366 If it is a color string, the variable `org-faces-easy-properties'
367 determines if it is a foreground or a background color."
368 :group 'org-faces
369 :group 'org-todo
370 :type '(repeat
371 (cons
372 (string :tag "Keyword")
373 (choice :tag "Face "
374 (string :tag "Color")
375 (sexp :tag "Face")))))
377 (defcustom org-priority-faces nil
378 "Faces for specific Priorities.
379 This is a list of cons cells, with priority character in the car
380 and faces in the cdr. The face can be a symbol, a color as
381 as a string, or a property list of attributes, like
382 (:foreground \"blue\" :weight bold :underline t).
383 If it is a color string, the variable `org-faces-easy-properties'
384 determines if it is a foreground or a background color."
385 :group 'org-faces
386 :group 'org-todo
387 :type '(repeat
388 (cons
389 (character :tag "Priority")
390 (choice :tag "Face "
391 (string :tag "Color")
392 (sexp :tag "Face")))))
394 (defvar org-tags-special-faces-re nil)
395 (defun org-set-tag-faces (var value)
396 (set var value)
397 (if (not value)
398 (setq org-tags-special-faces-re nil)
399 (setq org-tags-special-faces-re
400 (concat ":\\(" (mapconcat 'car value "\\|") "\\):"))))
402 (defface org-checkbox
403 (org-compatible-face 'bold
404 '((t (:bold t))))
405 "Face for checkboxes"
406 :group 'org-faces)
409 (org-copy-face 'org-todo 'org-checkbox-statistics-todo
410 "Face used for unfinished checkbox statistics.")
412 (org-copy-face 'org-done 'org-checkbox-statistics-done
413 "Face used for finished checkbox statistics.")
415 (defcustom org-tag-faces nil
416 "Faces for specific tags.
417 This is a list of cons cells, with tags in the car and faces in the cdr.
418 The face can be a symbol, a foreground color (in which case the rest is
419 inherited from the `org-tag' face) or a property list of attributes,
420 like (:foreground \"blue\" :weight bold :underline t).
421 If you set this variable through customize, it will immediately be effective
422 in new buffers and in modified lines.
423 If you set it with Lisp, a restart of Emacs is required to activate the
424 changes."
425 :group 'org-faces
426 :group 'org-tags
427 :set 'org-set-tag-faces
428 :type '(repeat
429 (cons
430 (string :tag "Tag ")
431 (choice :tag "Face"
432 (string :tag "Foreground color")
433 (sexp :tag "Face")))))
435 (defface org-table ;; originally copied from font-lock-function-name-face
436 (org-compatible-face nil
437 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
438 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
439 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
440 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
441 (((class color) (min-colors 8) (background light)) (:foreground "blue"))
442 (((class color) (min-colors 8) (background dark)))))
443 "Face used for tables."
444 :group 'org-faces)
446 (defface org-formula
447 (org-compatible-face nil
448 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
449 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
450 (((class color) (min-colors 8) (background light)) (:foreground "red"))
451 (((class color) (min-colors 8) (background dark)) (:foreground "red"))
452 (t (:bold t :italic t))))
453 "Face for formulas."
454 :group 'org-faces)
456 (defface org-code
457 (org-compatible-face 'shadow
458 '((((class color grayscale) (min-colors 88) (background light))
459 (:foreground "grey50"))
460 (((class color grayscale) (min-colors 88) (background dark))
461 (:foreground "grey70"))
462 (((class color) (min-colors 8) (background light))
463 (:foreground "green"))
464 (((class color) (min-colors 8) (background dark))
465 (:foreground "yellow"))))
466 "Face for fixed-width text like code snippets."
467 :group 'org-faces
468 :version "22.1")
470 (defface org-meta-line
471 (org-compatible-face 'font-lock-comment-face nil)
472 "Face for meta lines startin with \"#+\"."
473 :group 'org-faces
474 :version "22.1")
476 (defface org-document-title
477 '((((class color) (background light)) (:foreground "midnight blue" :weight bold :height 1.44))
478 (((class color) (background dark)) (:foreground "pale turquoise" :weight bold :height 1.44))
479 (t (:weight bold :height 1.44)))
480 "Face for document title, i.e. that which follows the #+TITLE: keyword."
481 :group 'org-faces)
483 (defface org-document-info
484 '((((class color) (background light)) (:foreground "midnight blue"))
485 (((class color) (background dark)) (:foreground "pale turquoise"))
486 (t nil))
487 "Face for document date, author and email; i.e. that which
488 follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword."
489 :group 'org-faces)
491 (defface org-document-info-keyword
492 (org-compatible-face 'shadow
493 '((((class color grayscale) (min-colors 88) (background light))
494 (:foreground "grey50"))
495 (((class color grayscale) (min-colors 88) (background dark))
496 (:foreground "grey70"))
497 (((class color) (min-colors 8) (background light))
498 (:foreground "green"))
499 (((class color) (min-colors 8) (background dark))
500 (:foreground "yellow"))))
501 "Face for #+TITLE:, #+AUTHOR:, #+EMAIL: and #+DATE: keywords."
502 :group 'org-faces)
504 (defface org-block
505 (org-compatible-face 'shadow
506 '((((class color grayscale) (min-colors 88) (background light))
507 (:foreground "grey50"))
508 (((class color grayscale) (min-colors 88) (background dark))
509 (:foreground "grey70"))
510 (((class color) (min-colors 8) (background light))
511 (:foreground "green"))
512 (((class color) (min-colors 8) (background dark))
513 (:foreground "yellow"))))
514 "Face text in #+begin ... #+end blocks."
515 :group 'org-faces
516 :version "22.1")
518 (defface org-block-background '((t ()))
519 "Face used for the source block background.")
521 (org-copy-face 'org-meta-line 'org-block-begin-line
522 "Face used for the line delimiting the begin of source blocks.")
524 (org-copy-face 'org-meta-line 'org-block-end-line
525 "Face used for the line delimiting the end of source blocks.")
527 (defface org-verbatim
528 (org-compatible-face 'shadow
529 '((((class color grayscale) (min-colors 88) (background light))
530 (:foreground "grey50" :underline t))
531 (((class color grayscale) (min-colors 88) (background dark))
532 (:foreground "grey70" :underline t))
533 (((class color) (min-colors 8) (background light))
534 (:foreground "green" :underline t))
535 (((class color) (min-colors 8) (background dark))
536 (:foreground "yellow" :underline t))))
537 "Face for fixed-with text like code snippets."
538 :group 'org-faces
539 :version "22.1")
541 (org-copy-face 'org-block 'org-quote
542 "Face for #+BEGIN_QUOTE ... #+END_QUOTE blocks.")
543 (org-copy-face 'org-block 'org-verse
544 "Face for #+BEGIN_VERSE ... #+END_VERSE blocks.")
546 (defcustom org-fontify-quote-and-verse-blocks nil
547 "Non-nil means, add a special face to #+begin_quote and #+begin_verse block.
548 When nil, format these as normal Org. This is the default, because the
549 content of these blocks will still be treated as Org syntax."
550 :group 'org-faces
551 :type 'boolean)
553 (defface org-clock-overlay ;; copied from secondary-selection
554 (org-compatible-face nil
555 '((((class color) (min-colors 88) (background light))
556 (:background "yellow1"))
557 (((class color) (min-colors 88) (background dark))
558 (:background "SkyBlue4"))
559 (((class color) (min-colors 16) (background light))
560 (:background "yellow"))
561 (((class color) (min-colors 16) (background dark))
562 (:background "SkyBlue4"))
563 (((class color) (min-colors 8))
564 (:background "cyan" :foreground "black"))
565 (t (:inverse-video t))))
566 "Basic face for displaying the secondary selection."
567 :group 'org-faces)
569 (defface org-agenda-structure ;; originally copied from font-lock-function-name-face
570 (org-compatible-face nil
571 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
572 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
573 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
574 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
575 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
576 (t (:bold t))))
577 "Face used in agenda for captions and dates."
578 :group 'org-faces)
580 (org-copy-face 'org-agenda-structure 'org-agenda-date
581 "Face used in agenda for normal days.")
583 (org-copy-face 'org-agenda-date 'org-agenda-date-today
584 "Face used in agenda for today."
585 :weight 'bold :italic 't)
587 (org-copy-face 'secondary-selection 'org-agenda-clocking
588 "Face marking the current clock item in the agenda.")
590 (org-copy-face 'org-agenda-date 'org-agenda-date-weekend
591 "Face used in agenda for weekend days.
592 See the variable `org-agenda-weekend-days' for a definition of which days
593 belong to the weekend."
594 :weight 'bold)
596 (defface org-scheduled
597 (org-compatible-face nil
598 '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
599 (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
600 (((class color) (min-colors 8)) (:foreground "green"))
601 (t (:bold t :italic t))))
602 "Face for items scheduled for a certain day."
603 :group 'org-faces)
605 (defface org-scheduled-today
606 (org-compatible-face nil
607 '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
608 (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
609 (((class color) (min-colors 8)) (:foreground "green"))
610 (t (:bold t :italic t))))
611 "Face for items scheduled for a certain day."
612 :group 'org-faces)
614 (defface org-agenda-dimmed-todo-face
615 '((((background light)) (:foreground "grey50"))
616 (((background dark)) (:foreground "grey50")))
617 "Face used to dim blocked tasks in the agenda."
618 :group 'org-faces)
620 (defface org-scheduled-previously
621 (org-compatible-face nil
622 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
623 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
624 (((class color) (min-colors 8) (background light)) (:foreground "red"))
625 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
626 (t (:bold t))))
627 "Face for items scheduled previously, and not yet done."
628 :group 'org-faces)
630 (defface org-upcoming-deadline
631 (org-compatible-face nil
632 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
633 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
634 (((class color) (min-colors 8) (background light)) (:foreground "red"))
635 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
636 (t (:bold t))))
637 "Face for items scheduled previously, and not yet done."
638 :group 'org-faces)
640 (defcustom org-agenda-deadline-faces
641 '((1.0 . org-warning)
642 (0.5 . org-upcoming-deadline)
643 (0.0 . default))
644 "Faces for showing deadlines in the agenda.
645 This is a list of cons cells. The cdr of each cell is a face to be used,
646 and it can also just be like '(:foreground \"yellow\").
647 Each car is a fraction of the head-warning time that must have passed for
648 this the face in the cdr to be used for display. The numbers must be
649 given in descending order. The head-warning time is normally taken
650 from `org-deadline-warning-days', but can also be specified in the deadline
651 timestamp itself, like this:
653 DEADLINE: <2007-08-13 Mon -8d>
655 You may use d for days, w for weeks, m for months and y for years. Months
656 and years will only be treated in an approximate fashion (30.4 days for a
657 month and 365.24 days for a year)."
658 :group 'org-faces
659 :group 'org-agenda-daily/weekly
660 :type '(repeat
661 (cons
662 (number :tag "Fraction of head-warning time passed")
663 (sexp :tag "Face"))))
665 (defface org-agenda-restriction-lock
666 (org-compatible-face nil
667 '((((class color) (min-colors 88) (background light)) (:background "yellow1"))
668 (((class color) (min-colors 88) (background dark)) (:background "skyblue4"))
669 (((class color) (min-colors 16) (background light)) (:background "yellow1"))
670 (((class color) (min-colors 16) (background dark)) (:background "skyblue4"))
671 (((class color) (min-colors 8)) (:background "cyan" :foreground "black"))
672 (t (:inverse-video t))))
673 "Face for showing the agenda restriction lock."
674 :group 'org-faces)
676 (defface org-time-grid ;; originally copied from font-lock-variable-name-face
677 (org-compatible-face nil
678 '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
679 (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
680 (((class color) (min-colors 8)) (:foreground "yellow" :weight light))))
681 "Face used for time grids."
682 :group 'org-faces)
684 (org-copy-face 'org-time-grid 'org-agenda-current-time
685 "Face used to show the current time in the time grid.")
687 (defface org-agenda-diary
688 (org-compatible-face 'default
689 nil)
690 "Face used for agenda entries that come from the Emacs diary."
691 :group 'org-faces)
693 (defconst org-level-faces
694 '(org-level-1 org-level-2 org-level-3 org-level-4
695 org-level-5 org-level-6 org-level-7 org-level-8
698 (defcustom org-n-level-faces (length org-level-faces)
699 "The number of different faces to be used for headlines.
700 Org-mode defines 8 different headline faces, so this can be at most 8.
701 If it is less than 8, the level-1 face gets re-used for level N+1 etc."
702 :type 'integer
703 :group 'org-faces)
705 (defcustom org-cycle-level-faces t
706 "Non-nil means level styles cycle after level `org-n-level-faces'.
707 Then so level org-n-level-faces+1 is styled like level 1.
708 If nil, then all levels >=org-n-level-faces are styled like
709 level org-n-level-faces"
710 :group 'org-appearance
711 :group 'org-faces
712 :type 'boolean)
714 (defface org-latex-and-export-specials
715 (let ((font (cond ((assq :inherit custom-face-attributes)
716 '(:inherit underline))
717 (t '(:underline t)))))
718 `((((class grayscale) (background light))
719 (:foreground "DimGray" ,@font))
720 (((class grayscale) (background dark))
721 (:foreground "LightGray" ,@font))
722 (((class color) (background light))
723 (:foreground "SaddleBrown"))
724 (((class color) (background dark))
725 (:foreground "burlywood"))
726 (t (,@font))))
727 "Face used to highlight math latex and other special exporter stuff."
728 :group 'org-faces)
730 (org-copy-face 'modeline 'org-mode-line-clock
731 "Face used for clock display in mode line.")
732 (org-copy-face 'modeline 'org-mode-line-clock-overrun
733 "Face used for clock display for overrun tasks in mode line."
734 :background "red")
736 (provide 'org-faces)
740 ;;; org-faces.el ends here