summaryrefslogtreecommitdiff
path: root/lisp/ldg-fonts.el
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2013-04-04 12:35:43 -0700
committerCraig Earls <enderw88@gmail.com>2013-04-04 12:35:43 -0700
commit896d1cc3ec22659f296efa03c962abe69e5dd6e1 (patch)
treeb6b51ee7e068d90e3394fb89802f306c3cdacc61 /lisp/ldg-fonts.el
parent712665e5b4b748c554174a13d5a66f5cab1c97fd (diff)
parent2e78e61be7ba6aa73c56c157405e45ed30990b31 (diff)
downloadfork-ledger-896d1cc3ec22659f296efa03c962abe69e5dd6e1.tar.gz
fork-ledger-896d1cc3ec22659f296efa03c962abe69e5dd6e1.tar.bz2
fork-ledger-896d1cc3ec22659f296efa03c962abe69e5dd6e1.zip
Merge branch 'next' into ledger-mode-automatic-transactions
Diffstat (limited to 'lisp/ldg-fonts.el')
-rw-r--r--lisp/ldg-fonts.el55
1 files changed, 39 insertions, 16 deletions
diff --git a/lisp/ldg-fonts.el b/lisp/ldg-fonts.el
index 3a7d1e0a..d83e7f9b 100644
--- a/lisp/ldg-fonts.el
+++ b/lisp/ldg-fonts.el
@@ -26,18 +26,20 @@
;;; Code:
+(require 'ldg-regex)
+
(defgroup ledger-faces nil "Ledger mode highlighting" :group 'ledger)
-(defface ledger-font-uncleared-face
+(defface ledger-font-payee-uncleared-face
`((t :foreground "#dc322f" :weight bold ))
"Default face for Ledger"
:group 'ledger-faces)
-(defface ledger-font-cleared-face
+(defface ledger-font-payee-cleared-face
`((t :foreground "#657b83" :weight normal ))
"Default face for cleared (*) transactions"
:group 'ledger-faces)
-(defface ledger-font-highlight-face
+(defface ledger-font-xact-highlight-face
`((t :background "#eee8d5"))
"Default face for transaction under point"
:group 'ledger-faces)
@@ -48,7 +50,7 @@
:group 'ledger-faces)
(defface ledger-font-other-face
- `((t :foreground "yellow" ))
+ `((t :foreground "#657b83" :weight bold))
"Default face for other transactions"
:group 'ledger-faces)
@@ -57,8 +59,18 @@
"Face for Ledger accounts"
:group 'ledger-faces)
+(defface ledger-font-posting-account-cleared-face
+ `((t :foreground "#657b83" ))
+ "Face for Ledger accounts"
+ :group 'ledger-faces)
+
+(defface ledger-font-posting-account-pending-face
+ `((t :foreground "#cb4b16" ))
+ "Face for Ledger accounts"
+ :group 'ledger-faces)
+
(defface ledger-font-posting-amount-face
- `((t :foreground "yellow" ))
+ `((t :foreground "#cb4b16" ))
"Face for Ledger amounts"
:group 'ledger-faces)
@@ -99,19 +111,30 @@
(defvar ledger-font-lock-keywords
- '(("^[0-9]+[-/.=][-/.=0-9]+\\s-\\!\\s-+\\(([^)]+)\\s-+\\)?\\([^*].+?\\)\\(\\( ;\\| ;\\|$\\)\\)" 2 'ledger-font-pending-face)
- ("^[0-9]+[-/.=][-/.=0-9]+\\s-\\*\\s-+\\(([^)]+)\\s-+\\)?\\([^*].+?\\)\\(\\( ;\\| ;\\|$\\)\\)" 2 'ledger-font-cleared-face)
- ("^[0-9]+[-/.=][-/.=0-9]+\\s-+\\(([^)]+)\\s-+\\)?\\([^*].+?\\)\\(\\( ;\\| ;\\|$\\)\\)" 2 'ledger-font-uncleared-face)
- ("^\\s-+\\([*]\\s-*\\)?\\(\\([[(]\\)?[^*:
- ]+?:\\([^]);
- ]\\|\\s-\\)+?\\([])]\\)?\\)\\( \\| \\|$\\)"
- 2 'ledger-font-posting-account-face) ; works
- ("\\( \\| \\|^\\)\\(;.*\\)" 2 'ledger-font-comment-face) ; works
- ("^\\([~=].+\\)" 1 ledger-font-other-face)
- ("^\\([A-Za-z]+ .+\\)" 1 ledger-font-other-face))
+ `( ;; (,ledger-other-entries-regex 1
+ ;; ledger-font-other-face)
+ (,ledger-comment-regex 2
+ 'ledger-font-comment-face)
+ (,ledger-payee-pending-regex 2
+ 'ledger-font-payee-pending-face) ; Works
+ (,ledger-payee-cleared-regex 2
+ 'ledger-font-payee-cleared-face) ; Works
+ (,ledger-payee-uncleared-regex 2
+ 'ledger-font-payee-uncleared-face) ; Works
+ (,ledger-account-cleared-regex 2
+ 'ledger-font-posting-account-cleared-face) ; Works
+ (,ledger-account-pending-regex 2
+ 'ledger-font-posting-account-pending-face) ; Works
+ (,ledger-account-any-status-regex 2
+ 'ledger-font-posting-account-face)) ; Works
"Expressions to highlight in Ledger mode.")
+
-
+;; (defvar ledger-font-lock-keywords
+;; `( (,ledger-other-entries-regex 1
+;; ledger-font-other-face))
+;; "Expressions to highlight in Ledger mode.")
+
(provide 'ldg-fonts)
;;; ldg-fonts.el ends here