org-faces.el 30 KB

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