org-faces.el 30 KB

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