diff options
author | Craig Earls <enderw88@gmail.com> | 2014-08-24 18:37:24 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2014-08-24 18:37:24 -0700 |
commit | 2703b886ebc4d7ba089a54cef8239c94858bd9d8 (patch) | |
tree | 2959119c2990ed6feb8ba4237d0bbaa3f929f324 /ledger-state.el | |
parent | afdd8ed55e152cd27a818f0fd2c2d629b82a9e8d (diff) |
Set up fontification independent of font-lock.
Basic functionality in place. need to test further and expand detail fortification.
Diffstat (limited to 'ledger-state.el')
-rw-r--r-- | ledger-state.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ledger-state.el b/ledger-state.el index 989e6d3..4705e60 100644 --- a/ledger-state.el +++ b/ledger-state.el @@ -65,6 +65,14 @@ ((eql state-char ?\;) 'comment) (t nil))) + +(defun ledger-state-from-string (state-string) + "Get state from STATE-CHAR." + (cond ((string= state-string "!") 'pending) + ((string= state-string "*") 'cleared) + ((string= state-string ";") 'comment) + (t nil))) + (defun ledger-toggle-current-posting (&optional style) "Toggle the cleared status of the transaction under point. Optional argument STYLE may be `pending' or `cleared', depending |