org-faces.el 31 KB

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