org-faces.el 32 KB

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