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