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