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