org-faces.el 29 KB

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