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