New faces for checkbox statistics

This commit is contained in:
Carsten Dominik 2009-06-11 16:19:07 +02:00
parent 74e8c78b93
commit 7b3d0d40f5
3 changed files with 23 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2009-06-11 Carsten Dominik <carsten.dominik@gmail.com>
* org-list.el (org-get-checkbox-statistics-face): Use the new
faces.
* org-faces.el (org-checkbox-statistics-todo)
(org-checkbox-statistics-done): New faces.
2009-06-09 Carsten Dominik <carsten.dominik@gmail.com>
* org-src.el (org-src-mode): Renamed from `org-exit-edit-mode'.

View File

@ -363,6 +363,16 @@ list of attributes, like (:foreground \"blue\" :weight bold :underline t)."
"Face for checkboxes"
:group 'org-faces)
(unless (facep 'org-checkbox-statistics-todo)
(copy-face 'org-todo 'org-checkbox-statistics-todo)
(set-face-doc-string 'org-checkbox-statistics-todo
"Face used for unfinished checkbox statistics."))
(unless (facep 'org-checkbox-statistics-done)
(copy-face 'org-done 'org-checkbox-statistics-done)
(set-face-doc-string 'org-checkbox-statistics-done
"Face used for finished checkbox statistics."))
(defcustom org-tag-faces nil
"Faces for specific tags.
This is a list of cons cells, with tags in the car and faces in the cdr.

View File

@ -484,11 +484,13 @@ the whole buffer."
The face will be `org-done' when all relevant boxes are checked. Otherwise
it will be `org-todo'."
(if (match-end 1)
(if (equal (match-string 1) "100%") 'org-done 'org-todo)
(if (equal (match-string 1) "100%")
'org-checkbox-statistics-done
'org-checkbox-statistics-todo)
(if (and (> (match-end 2) (match-beginning 2))
(equal (match-string 2) (match-string 3)))
'org-done
'org-todo)))
'org-checkbox-statistics-done
'org-checkbox-statistics-todo)))
(defun org-beginning-of-item ()
"Go to the beginning of the current hand-formatted item.