Commit | Line | Data |
---|---|---|
20908596 CD |
1 | ;;; org-faces.el --- Face definitions for Org-mode. |
2 | ||
b73f1974 | 3 | ;; Copyright (C) 2004-2012 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 | |
20908596 CD |
47 | (defgroup org-faces nil |
48 | "Faces in Org-mode." | |
49 | :tag "Org Faces" | |
ed21c5c8 | 50 | :group 'org-appearance) |
20908596 | 51 | |
3ab2c837 BG |
52 | (defface org-default |
53 | (org-compatible-face 'default nil) | |
54 | "Face used for default text." | |
55 | :group 'org-faces) | |
56 | ||
20908596 CD |
57 | (defface org-hide |
58 | '((((background light)) (:foreground "white")) | |
59 | (((background dark)) (:foreground "black"))) | |
60 | "Face used to hide leading stars in headlines. | |
4a9792e5 | 61 | The foreground color of this face should be equal to the background |
20908596 CD |
62 | color of the frame." |
63 | :group 'org-faces) | |
64 | ||
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) | |
75 | ||
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) | |
85 | ||
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) | |
97 | ||
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) | |
109 | ||
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) | |
117 | ||
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) | |
125 | ||
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) | |
133 | ||
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) | |
141 | ||
142 | (defface org-special-keyword ;; originally copied from font-lock-string-face | |
3ab2c837 | 143 | (org-compatible-face 'font-lock-keyword-face |
20908596 CD |
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) | |
149 | ||
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) | |
160 | ||
161 | (defface org-property-value nil | |
162 | "Face used for the value of a property." | |
163 | :group 'org-faces) | |
164 | ||
165 | (defface org-column | |
166 | (org-compatible-face nil | |
167 | '((((class color) (min-colors 16) (background light)) | |
b349f79f CD |
168 | (:background "grey90" :weight normal :slant normal :strike-through nil |
169 | :underline nil)) | |
20908596 | 170 | (((class color) (min-colors 16) (background dark)) |
b349f79f CD |
171 | (:background "grey30" :weight normal :slant normal :strike-through nil |
172 | :underline nil)) | |
20908596 | 173 | (((class color) (min-colors 8)) |
b349f79f CD |
174 | (:background "cyan" :foreground "black" |
175 | :weight normal :slant normal :strike-through nil | |
176 | :underline nil)) | |
20908596 | 177 | (t (:inverse-video t)))) |
b349f79f CD |
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. | |
181 | ||
182 | 1. The color of the reference face. This is normally the level fact that | |
ff4be292 | 183 | is used in the outline. In agenda-mode, it will be the face of the |
b349f79f CD |
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. | |
187 | ||
188 | 2. The `org-column' face. | |
189 | ||
190 | 3. The remaining properties of the reference face. | |
191 | ||
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'. | |
199 | ||
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." | |
20908596 CD |
203 | :group 'org-faces) |
204 | ||
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) | |
216 | ||
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))) | |
222 | ||
ce4fdcb9 CD |
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) | |
228 | ||
20908596 CD |
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) | |
238 | ||
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) | |
251 | ||
252 | (defface org-link | |
3ab2c837 BG |
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)))) | |
20908596 CD |
257 | "Face for links." |
258 | :group 'org-faces) | |
259 | ||
0bd48b37 CD |
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) | |
266 | ||
20908596 CD |
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) | |
273 | ||
274 | (defface org-target | |
275 | '((((class color) (background light)) (:underline t)) | |
276 | (((class color) (background dark)) (:underline t)) | |
277 | (t (:underline t))) | |
c8d0cf5c | 278 | "Face for link targets." |
20908596 CD |
279 | :group 'org-faces) |
280 | ||
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))) | |
c8d0cf5c | 285 | "Face for date/time stamps." |
20908596 CD |
286 | :group 'org-faces) |
287 | ||
2f885dca BG |
288 | (defface org-date-selected |
289 | (org-compatible-face nil | |
290 | '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold nil)) | |
291 | (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold nil)) | |
292 | (((class color) (min-colors 8) (background light)) (:foreground "red" :bold nil)) | |
293 | (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold nil)) | |
294 | (t (:inverse-video t)))) | |
295 | "Face for highlighting the calendar day when using `org-read-date'." | |
296 | :group 'org-faces) | |
297 | ||
20908596 CD |
298 | (defface org-sexp-date |
299 | '((((class color) (background light)) (:foreground "Purple")) | |
300 | (((class color) (background dark)) (:foreground "Cyan")) | |
301 | (t (:underline t))) | |
c8d0cf5c | 302 | "Face for diary-like sexp date specifications." |
20908596 CD |
303 | :group 'org-faces) |
304 | ||
305 | (defface org-tag | |
306 | '((t (:bold t))) | |
ff4be292 CD |
307 | "Default face for tags. |
308 | Note that the variable `org-tag-faces' can be used to overrule this face for | |
309 | specific tags." | |
20908596 CD |
310 | :group 'org-faces) |
311 | ||
312 | (defface org-todo ; font-lock-warning-face | |
313 | (org-compatible-face nil | |
314 | '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t)) | |
315 | (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t)) | |
316 | (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t)) | |
317 | (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t)) | |
318 | (t (:inverse-video t :bold t)))) | |
319 | "Face for TODO keywords." | |
320 | :group 'org-faces) | |
321 | ||
322 | (defface org-done ;; originally copied from font-lock-type-face | |
323 | (org-compatible-face nil | |
324 | '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen" :bold t)) | |
325 | (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen" :bold t)) | |
326 | (((class color) (min-colors 8)) (:foreground "green")) | |
327 | (t (:bold t)))) | |
328 | "Face used for todo keywords that indicate DONE items." | |
329 | :group 'org-faces) | |
330 | ||
c8d0cf5c CD |
331 | (defface org-agenda-done ;; originally copied from font-lock-type-face |
332 | (org-compatible-face nil | |
333 | '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen")) | |
334 | (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen")) | |
335 | (((class color) (min-colors 8)) (:foreground "green")) | |
336 | (t (:bold nil)))) | |
337 | "Face used in agenda, to indicate lines switched to DONE. | |
3ab2c837 | 338 | This face is used to de-emphasize items that where brightly colored in the |
c8d0cf5c CD |
339 | agenda because they were things to do, or overdue. The DONE state itself |
340 | is of course immediately visible, but for example a passed deadline is | |
341 | \(by default) very bright read. This face could be simply the default face | |
342 | of the frame, for example." | |
343 | :group 'org-faces) | |
344 | ||
20908596 CD |
345 | (defface org-headline-done ;; originally copied from font-lock-string-face |
346 | (org-compatible-face nil | |
347 | '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown")) | |
348 | (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon")) | |
349 | (((class color) (min-colors 8) (background light)) (:bold nil)))) | |
350 | "Face used to indicate that a headline is DONE. | |
351 | This face is only used if `org-fontify-done-headline' is set. If applies | |
352 | to the part of the headline after the DONE keyword." | |
353 | :group 'org-faces) | |
354 | ||
ed21c5c8 CD |
355 | (defcustom org-faces-easy-properties |
356 | '((todo . :foreground) (tag . :foreground) (priority . :foreground)) | |
357 | "The property changes by easy faces. | |
358 | This is an alist, the keys show the area of application, the values | |
359 | can be `:foreground' or `:background'. A color string for special | |
360 | keywords will then be interpreted as either foreground or background | |
361 | color." | |
362 | :group 'org-faces | |
363 | :group 'org-todo | |
372d7b21 | 364 | :version "24.1" |
ed21c5c8 CD |
365 | :type '(repeat |
366 | (cons (choice (const todo) (const tag) (const priority)) | |
367 | (choice (const :foreground) (const :background))))) | |
368 | ||
20908596 CD |
369 | (defcustom org-todo-keyword-faces nil |
370 | "Faces for specific TODO keywords. | |
371 | This is a list of cons cells, with TODO keywords in the car | |
ed21c5c8 CD |
372 | and faces in the cdr. The face can be a symbol, a color |
373 | as a string (in which case the rest is inherited from the `org-todo' face), | |
374 | or a property list of attributes, like | |
375 | (:foreground \"blue\" :weight bold :underline t). | |
376 | If it is a color string, the variable `org-faces-easy-properties' | |
377 | determines if it is a foreground or a background color." | |
20908596 CD |
378 | :group 'org-faces |
379 | :group 'org-todo | |
380 | :type '(repeat | |
381 | (cons | |
ed21c5c8 CD |
382 | (string :tag "Keyword") |
383 | (choice :tag "Face " | |
384 | (string :tag "Color") | |
385 | (sexp :tag "Face"))))) | |
20908596 | 386 | |
c8d0cf5c CD |
387 | (defcustom org-priority-faces nil |
388 | "Faces for specific Priorities. | |
389 | This is a list of cons cells, with priority character in the car | |
ed21c5c8 CD |
390 | and faces in the cdr. The face can be a symbol, a color as |
391 | as a string, or a property list of attributes, like | |
392 | (:foreground \"blue\" :weight bold :underline t). | |
393 | If it is a color string, the variable `org-faces-easy-properties' | |
394 | determines if it is a foreground or a background color." | |
c8d0cf5c CD |
395 | :group 'org-faces |
396 | :group 'org-todo | |
397 | :type '(repeat | |
398 | (cons | |
399 | (character :tag "Priority") | |
ed21c5c8 CD |
400 | (choice :tag "Face " |
401 | (string :tag "Color") | |
402 | (sexp :tag "Face"))))) | |
c8d0cf5c | 403 | |
ff4be292 CD |
404 | (defvar org-tags-special-faces-re nil) |
405 | (defun org-set-tag-faces (var value) | |
406 | (set var value) | |
407 | (if (not value) | |
408 | (setq org-tags-special-faces-re nil) | |
409 | (setq org-tags-special-faces-re | |
410 | (concat ":\\(" (mapconcat 'car value "\\|") "\\):")))) | |
411 | ||
c8d0cf5c CD |
412 | (defface org-checkbox |
413 | (org-compatible-face 'bold | |
414 | '((t (:bold t)))) | |
415 | "Face for checkboxes" | |
416 | :group 'org-faces) | |
417 | ||
c8d0cf5c | 418 | |
8d642074 | 419 | (org-copy-face 'org-todo 'org-checkbox-statistics-todo |
ed21c5c8 | 420 | "Face used for unfinished checkbox statistics.") |
8d642074 CD |
421 | |
422 | (org-copy-face 'org-done 'org-checkbox-statistics-done | |
ed21c5c8 | 423 | "Face used for finished checkbox statistics.") |
c8d0cf5c | 424 | |
ff4be292 CD |
425 | (defcustom org-tag-faces nil |
426 | "Faces for specific tags. | |
427 | This is a list of cons cells, with tags in the car and faces in the cdr. | |
ed21c5c8 CD |
428 | The face can be a symbol, a foreground color (in which case the rest is |
429 | inherited from the `org-tag' face) or a property list of attributes, | |
ff4be292 CD |
430 | like (:foreground \"blue\" :weight bold :underline t). |
431 | If you set this variable through customize, it will immediately be effective | |
432 | in new buffers and in modified lines. | |
433 | If you set it with Lisp, a restart of Emacs is required to activate the | |
434 | changes." | |
435 | :group 'org-faces | |
436 | :group 'org-tags | |
437 | :set 'org-set-tag-faces | |
438 | :type '(repeat | |
439 | (cons | |
ed21c5c8 CD |
440 | (string :tag "Tag ") |
441 | (choice :tag "Face" | |
442 | (string :tag "Foreground color") | |
443 | (sexp :tag "Face"))))) | |
ff4be292 | 444 | |
20908596 CD |
445 | (defface org-table ;; originally copied from font-lock-function-name-face |
446 | (org-compatible-face nil | |
447 | '((((class color) (min-colors 88) (background light)) (:foreground "Blue1")) | |
448 | (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue")) | |
449 | (((class color) (min-colors 16) (background light)) (:foreground "Blue")) | |
450 | (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue")) | |
451 | (((class color) (min-colors 8) (background light)) (:foreground "blue")) | |
452 | (((class color) (min-colors 8) (background dark))))) | |
453 | "Face used for tables." | |
454 | :group 'org-faces) | |
455 | ||
456 | (defface org-formula | |
457 | (org-compatible-face nil | |
458 | '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick")) | |
459 | (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1")) | |
460 | (((class color) (min-colors 8) (background light)) (:foreground "red")) | |
461 | (((class color) (min-colors 8) (background dark)) (:foreground "red")) | |
462 | (t (:bold t :italic t)))) | |
463 | "Face for formulas." | |
464 | :group 'org-faces) | |
465 | ||
466 | (defface org-code | |
c8d0cf5c | 467 | (org-compatible-face 'shadow |
20908596 CD |
468 | '((((class color grayscale) (min-colors 88) (background light)) |
469 | (:foreground "grey50")) | |
470 | (((class color grayscale) (min-colors 88) (background dark)) | |
471 | (:foreground "grey70")) | |
472 | (((class color) (min-colors 8) (background light)) | |
473 | (:foreground "green")) | |
474 | (((class color) (min-colors 8) (background dark)) | |
475 | (:foreground "yellow")))) | |
86fbb8ca | 476 | "Face for fixed-width text like code snippets." |
20908596 CD |
477 | :group 'org-faces |
478 | :version "22.1") | |
479 | ||
c8d0cf5c CD |
480 | (defface org-meta-line |
481 | (org-compatible-face 'font-lock-comment-face nil) | |
482 | "Face for meta lines startin with \"#+\"." | |
483 | :group 'org-faces | |
484 | :version "22.1") | |
485 | ||
ed21c5c8 CD |
486 | (defface org-document-title |
487 | '((((class color) (background light)) (:foreground "midnight blue" :weight bold :height 1.44)) | |
488 | (((class color) (background dark)) (:foreground "pale turquoise" :weight bold :height 1.44)) | |
489 | (t (:weight bold :height 1.44))) | |
490 | "Face for document title, i.e. that which follows the #+TITLE: keyword." | |
491 | :group 'org-faces) | |
492 | ||
493 | (defface org-document-info | |
494 | '((((class color) (background light)) (:foreground "midnight blue")) | |
495 | (((class color) (background dark)) (:foreground "pale turquoise")) | |
496 | (t nil)) | |
497 | "Face for document date, author and email; i.e. that which | |
498 | follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword." | |
499 | :group 'org-faces) | |
500 | ||
501 | (defface org-document-info-keyword | |
502 | (org-compatible-face 'shadow | |
503 | '((((class color grayscale) (min-colors 88) (background light)) | |
504 | (:foreground "grey50")) | |
505 | (((class color grayscale) (min-colors 88) (background dark)) | |
506 | (:foreground "grey70")) | |
507 | (((class color) (min-colors 8) (background light)) | |
508 | (:foreground "green")) | |
509 | (((class color) (min-colors 8) (background dark)) | |
510 | (:foreground "yellow")))) | |
511 | "Face for #+TITLE:, #+AUTHOR:, #+EMAIL: and #+DATE: keywords." | |
512 | :group 'org-faces) | |
513 | ||
c8d0cf5c CD |
514 | (defface org-block |
515 | (org-compatible-face 'shadow | |
516 | '((((class color grayscale) (min-colors 88) (background light)) | |
517 | (:foreground "grey50")) | |
518 | (((class color grayscale) (min-colors 88) (background dark)) | |
519 | (:foreground "grey70")) | |
520 | (((class color) (min-colors 8) (background light)) | |
521 | (:foreground "green")) | |
522 | (((class color) (min-colors 8) (background dark)) | |
523 | (:foreground "yellow")))) | |
524 | "Face text in #+begin ... #+end blocks." | |
525 | :group 'org-faces | |
526 | :version "22.1") | |
527 | ||
3ab2c837 BG |
528 | (defface org-block-background '((t ())) |
529 | "Face used for the source block background.") | |
530 | ||
531 | (org-copy-face 'org-meta-line 'org-block-begin-line | |
532 | "Face used for the line delimiting the begin of source blocks.") | |
533 | ||
534 | (org-copy-face 'org-meta-line 'org-block-end-line | |
535 | "Face used for the line delimiting the end of source blocks.") | |
536 | ||
20908596 | 537 | (defface org-verbatim |
c8d0cf5c | 538 | (org-compatible-face 'shadow |
20908596 CD |
539 | '((((class color grayscale) (min-colors 88) (background light)) |
540 | (:foreground "grey50" :underline t)) | |
541 | (((class color grayscale) (min-colors 88) (background dark)) | |
542 | (:foreground "grey70" :underline t)) | |
543 | (((class color) (min-colors 8) (background light)) | |
544 | (:foreground "green" :underline t)) | |
545 | (((class color) (min-colors 8) (background dark)) | |
546 | (:foreground "yellow" :underline t)))) | |
547 | "Face for fixed-with text like code snippets." | |
548 | :group 'org-faces | |
549 | :version "22.1") | |
550 | ||
5dec9555 CD |
551 | (org-copy-face 'org-block 'org-quote |
552 | "Face for #+BEGIN_QUOTE ... #+END_QUOTE blocks.") | |
553 | (org-copy-face 'org-block 'org-verse | |
554 | "Face for #+BEGIN_VERSE ... #+END_VERSE blocks.") | |
555 | ||
ed21c5c8 CD |
556 | (defcustom org-fontify-quote-and-verse-blocks nil |
557 | "Non-nil means, add a special face to #+begin_quote and #+begin_verse block. | |
558 | When nil, format these as normal Org. This is the default, because the | |
559 | content of these blocks will still be treated as Org syntax." | |
560 | :group 'org-faces | |
372d7b21 | 561 | :version "24.1" |
ed21c5c8 CD |
562 | :type 'boolean) |
563 | ||
0bd48b37 CD |
564 | (defface org-clock-overlay ;; copied from secondary-selection |
565 | (org-compatible-face nil | |
566 | '((((class color) (min-colors 88) (background light)) | |
d6685abc | 567 | (:background "yellow1")) |
0bd48b37 | 568 | (((class color) (min-colors 88) (background dark)) |
d6685abc | 569 | (:background "SkyBlue4")) |
0bd48b37 | 570 | (((class color) (min-colors 16) (background light)) |
d6685abc | 571 | (:background "yellow")) |
0bd48b37 | 572 | (((class color) (min-colors 16) (background dark)) |
d6685abc | 573 | (:background "SkyBlue4")) |
0bd48b37 | 574 | (((class color) (min-colors 8)) |
d6685abc | 575 | (:background "cyan" :foreground "black")) |
1e4f816a | 576 | (t (:inverse-video t)))) |
0bd48b37 CD |
577 | "Basic face for displaying the secondary selection." |
578 | :group 'org-faces) | |
579 | ||
20908596 CD |
580 | (defface org-agenda-structure ;; originally copied from font-lock-function-name-face |
581 | (org-compatible-face nil | |
582 | '((((class color) (min-colors 88) (background light)) (:foreground "Blue1")) | |
583 | (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue")) | |
584 | (((class color) (min-colors 16) (background light)) (:foreground "Blue")) | |
585 | (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue")) | |
586 | (((class color) (min-colors 8)) (:foreground "blue" :bold t)) | |
587 | (t (:bold t)))) | |
588 | "Face used in agenda for captions and dates." | |
589 | :group 'org-faces) | |
590 | ||
8d642074 | 591 | (org-copy-face 'org-agenda-structure 'org-agenda-date |
ed21c5c8 | 592 | "Face used in agenda for normal days.") |
20908596 | 593 | |
8d642074 | 594 | (org-copy-face 'org-agenda-date 'org-agenda-date-today |
ed21c5c8 CD |
595 | "Face used in agenda for today." |
596 | :weight 'bold :italic 't) | |
c8d0cf5c | 597 | |
8d642074 | 598 | (org-copy-face 'secondary-selection 'org-agenda-clocking |
ed21c5c8 | 599 | "Face marking the current clock item in the agenda.") |
54a0dee5 | 600 | |
8d642074 | 601 | (org-copy-face 'org-agenda-date 'org-agenda-date-weekend |
ed21c5c8 | 602 | "Face used in agenda for weekend days. |
20908596 | 603 | See the variable `org-agenda-weekend-days' for a definition of which days |
8d642074 CD |
604 | belong to the weekend." |
605 | :weight 'bold) | |
20908596 | 606 | |
621f83e4 CD |
607 | (defface org-scheduled |
608 | (org-compatible-face nil | |
609 | '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen")) | |
610 | (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen")) | |
611 | (((class color) (min-colors 8)) (:foreground "green")) | |
612 | (t (:bold t :italic t)))) | |
613 | "Face for items scheduled for a certain day." | |
614 | :group 'org-faces) | |
615 | ||
20908596 CD |
616 | (defface org-scheduled-today |
617 | (org-compatible-face nil | |
618 | '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen")) | |
619 | (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen")) | |
620 | (((class color) (min-colors 8)) (:foreground "green")) | |
621 | (t (:bold t :italic t)))) | |
622 | "Face for items scheduled for a certain day." | |
623 | :group 'org-faces) | |
624 | ||
d6685abc CD |
625 | (defface org-agenda-dimmed-todo-face |
626 | '((((background light)) (:foreground "grey50")) | |
627 | (((background dark)) (:foreground "grey50"))) | |
86fbb8ca | 628 | "Face used to dim blocked tasks in the agenda." |
d6685abc | 629 | :group 'org-faces) |
621f83e4 | 630 | |
20908596 CD |
631 | (defface org-scheduled-previously |
632 | (org-compatible-face nil | |
633 | '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick")) | |
634 | (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1")) | |
635 | (((class color) (min-colors 8) (background light)) (:foreground "red")) | |
636 | (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t)) | |
637 | (t (:bold t)))) | |
638 | "Face for items scheduled previously, and not yet done." | |
639 | :group 'org-faces) | |
640 | ||
641 | (defface org-upcoming-deadline | |
642 | (org-compatible-face nil | |
643 | '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick")) | |
644 | (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1")) | |
645 | (((class color) (min-colors 8) (background light)) (:foreground "red")) | |
646 | (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t)) | |
647 | (t (:bold t)))) | |
648 | "Face for items scheduled previously, and not yet done." | |
649 | :group 'org-faces) | |
650 | ||
651 | (defcustom org-agenda-deadline-faces | |
652 | '((1.0 . org-warning) | |
653 | (0.5 . org-upcoming-deadline) | |
654 | (0.0 . default)) | |
655 | "Faces for showing deadlines in the agenda. | |
656 | This is a list of cons cells. The cdr of each cell is a face to be used, | |
657 | and it can also just be like '(:foreground \"yellow\"). | |
658 | Each car is a fraction of the head-warning time that must have passed for | |
659 | this the face in the cdr to be used for display. The numbers must be | |
660 | given in descending order. The head-warning time is normally taken | |
661 | from `org-deadline-warning-days', but can also be specified in the deadline | |
662 | timestamp itself, like this: | |
663 | ||
664 | DEADLINE: <2007-08-13 Mon -8d> | |
665 | ||
666 | You may use d for days, w for weeks, m for months and y for years. Months | |
667 | and years will only be treated in an approximate fashion (30.4 days for a | |
668 | month and 365.24 days for a year)." | |
669 | :group 'org-faces | |
670 | :group 'org-agenda-daily/weekly | |
671 | :type '(repeat | |
672 | (cons | |
673 | (number :tag "Fraction of head-warning time passed") | |
674 | (sexp :tag "Face")))) | |
675 | ||
676 | (defface org-agenda-restriction-lock | |
677 | (org-compatible-face nil | |
678 | '((((class color) (min-colors 88) (background light)) (:background "yellow1")) | |
679 | (((class color) (min-colors 88) (background dark)) (:background "skyblue4")) | |
680 | (((class color) (min-colors 16) (background light)) (:background "yellow1")) | |
681 | (((class color) (min-colors 16) (background dark)) (:background "skyblue4")) | |
682 | (((class color) (min-colors 8)) (:background "cyan" :foreground "black")) | |
683 | (t (:inverse-video t)))) | |
684 | "Face for showing the agenda restriction lock." | |
685 | :group 'org-faces) | |
686 | ||
e66ba1df BG |
687 | (defface org-agenda-filter-tags |
688 | (org-compatible-face 'modeline | |
689 | nil) | |
690 | "Face for tag(s) in the mode-line when filtering the agenda." | |
691 | :group 'org-faces) | |
692 | ||
693 | (defface org-agenda-filter-category | |
694 | (org-compatible-face 'modeline | |
695 | nil) | |
696 | "Face for tag(s) in the mode-line when filtering the agenda." | |
697 | :group 'org-faces) | |
698 | ||
20908596 CD |
699 | (defface org-time-grid ;; originally copied from font-lock-variable-name-face |
700 | (org-compatible-face nil | |
701 | '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod")) | |
702 | (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod")) | |
703 | (((class color) (min-colors 8)) (:foreground "yellow" :weight light)))) | |
704 | "Face used for time grids." | |
705 | :group 'org-faces) | |
706 | ||
3ab2c837 BG |
707 | (org-copy-face 'org-time-grid 'org-agenda-current-time |
708 | "Face used to show the current time in the time grid.") | |
709 | ||
ed21c5c8 CD |
710 | (defface org-agenda-diary |
711 | (org-compatible-face 'default | |
712 | nil) | |
713 | "Face used for agenda entries that come from the Emacs diary." | |
714 | :group 'org-faces) | |
715 | ||
e66ba1df BG |
716 | (defface org-agenda-calendar-event |
717 | (org-compatible-face 'default | |
718 | nil) | |
719 | "Face used to show events and appointments in the agenda." | |
720 | :group 'org-faces) | |
721 | ||
722 | (defface org-agenda-calendar-sexp | |
723 | (org-compatible-face 'default | |
724 | nil) | |
725 | "Face used to show events computed from a S-expression." | |
726 | :group 'org-faces) | |
727 | ||
20908596 CD |
728 | (defconst org-level-faces |
729 | '(org-level-1 org-level-2 org-level-3 org-level-4 | |
730 | org-level-5 org-level-6 org-level-7 org-level-8 | |
731 | )) | |
732 | ||
733 | (defcustom org-n-level-faces (length org-level-faces) | |
734 | "The number of different faces to be used for headlines. | |
735 | Org-mode defines 8 different headline faces, so this can be at most 8. | |
736 | If it is less than 8, the level-1 face gets re-used for level N+1 etc." | |
c8d0cf5c | 737 | :type 'integer |
20908596 CD |
738 | :group 'org-faces) |
739 | ||
acedf35c CD |
740 | (defcustom org-cycle-level-faces t |
741 | "Non-nil means level styles cycle after level `org-n-level-faces'. | |
742 | Then so level org-n-level-faces+1 is styled like level 1. | |
743 | If nil, then all levels >=org-n-level-faces are styled like | |
744 | level org-n-level-faces" | |
745 | :group 'org-appearance | |
746 | :group 'org-faces | |
372d7b21 | 747 | :version "24.1" |
acedf35c CD |
748 | :type 'boolean) |
749 | ||
20908596 CD |
750 | (defface org-latex-and-export-specials |
751 | (let ((font (cond ((assq :inherit custom-face-attributes) | |
752 | '(:inherit underline)) | |
753 | (t '(:underline t))))) | |
754 | `((((class grayscale) (background light)) | |
755 | (:foreground "DimGray" ,@font)) | |
756 | (((class grayscale) (background dark)) | |
757 | (:foreground "LightGray" ,@font)) | |
758 | (((class color) (background light)) | |
759 | (:foreground "SaddleBrown")) | |
760 | (((class color) (background dark)) | |
761 | (:foreground "burlywood")) | |
762 | (t (,@font)))) | |
763 | "Face used to highlight math latex and other special exporter stuff." | |
764 | :group 'org-faces) | |
765 | ||
8d642074 | 766 | (org-copy-face 'modeline 'org-mode-line-clock |
ed21c5c8 CD |
767 | "Face used for clock display in mode line.") |
768 | (org-copy-face 'modeline 'org-mode-line-clock-overrun | |
769 | "Face used for clock display for overrun tasks in mode line." | |
770 | :background "red") | |
c8d0cf5c | 771 | |
20908596 CD |
772 | (provide 'org-faces) |
773 | ||
774 | ;;; org-faces.el ends here |