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