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