summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ldg-fonts.el15
-rw-r--r--lisp/ldg-reconcile.el17
2 files changed, 26 insertions, 6 deletions
diff --git a/lisp/ldg-fonts.el b/lisp/ldg-fonts.el
index 9f98a9fd..2b7717c6 100644
--- a/lisp/ldg-fonts.el
+++ b/lisp/ldg-fonts.el
@@ -56,6 +56,21 @@
"Face for Ledger comments"
:group 'ledger-faces)
+(defface ledger-font-reconciler-uncleared-face
+ `((t :foreground "green" :weight normal ))
+ "Default face for uncleared transactions in the reconcile window"
+ :group 'ledger-faces)
+
+(defface ledger-font-reconciler-cleared-face
+ `((t :foreground "grey70" :weight normal ))
+ "Default face for cleared (*) transactions in the reconcile window"
+ :group 'ledger-faces)
+
+(defface ledger-font-reconciler-pending-face
+ `((t :foreground "yellow" :weight normal ))
+ "Default face for pending (!) transactions in the reconcile window"
+ :group 'ledger-faces)
+
(defvar ledger-font-lock-keywords
'(("^[0-9]+[-/.=][-/.=0-9]+\\s-\\!\\s-+\\(([^)]+)\\s-+\\)?\\([^*].+?\\)\\(\\( ;\\| ;\\|$\\)\\)" 2 'ledger-font-pending-face)
diff --git a/lisp/ldg-reconcile.el b/lisp/ldg-reconcile.el
index aaccfb07..02d0662a 100644
--- a/lisp/ldg-reconcile.el
+++ b/lisp/ldg-reconcile.el
@@ -55,13 +55,17 @@
(with-current-buffer ledger-buf
(goto-char (cdr where))
(setq cleared (ledger-toggle-current-entry)))
+ ;remove the existing face and add the new face
+ (remove-text-properties (line-beginning-position)
+ (line-end-position)
+ (list 'face))
(if cleared
(add-text-properties (line-beginning-position)
(line-end-position)
- (list 'face 'bold))
- (remove-text-properties (line-beginning-position)
- (line-end-position)
- (list 'face))))
+ (list 'face 'ledger-font-reconciler-cleared-face ))
+ (add-text-properties (line-beginning-position)
+ (line-end-position)
+ (list 'face 'ledger-font-reconciler-uncleared-face ))))
(forward-line)
(ledger-display-balance)))
@@ -172,10 +176,11 @@
(nth 4 item) (nth 1 xact) (nth 2 xact)))
(if (nth 3 xact)
(set-text-properties beg (1- (point))
- (list 'face 'bold
+ (list 'face 'ledger-font-reconciler-cleared-face
'where where))
(set-text-properties beg (1- (point))
- (list 'where where))))
+ (list 'face 'ledger-font-reconciler-uncleared-face
+ 'where where))))
(setq index (1+ index)))))
(goto-char (point-min))
(set-buffer-modified-p nil)