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