diff options
author | Craig Earls <enderw88@gmail.com> | 2014-09-08 20:42:01 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2014-09-08 20:42:01 -0700 |
commit | 64c541a3d80eca52e1793acb2429247ec2566157 (patch) | |
tree | 01129a5c53140f858dcbe35f47161c44080ebbc2 /lisp/ledger-state.el | |
parent | db09e0d2e6e32e14251f30dc33bb02e4bdd0fd1b (diff) | |
parent | ad87ab16e4c25caa4b52a2905778ae4a275d69f9 (diff) | |
download | fork-ledger-64c541a3d80eca52e1793acb2429247ec2566157.tar.gz fork-ledger-64c541a3d80eca52e1793acb2429247ec2566157.tar.bz2 fork-ledger-64c541a3d80eca52e1793acb2429247ec2566157.zip |
Merge branch 'new-fontification-scheme'
Diffstat (limited to 'lisp/ledger-state.el')
-rw-r--r-- | lisp/ledger-state.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/ledger-state.el b/lisp/ledger-state.el index 989e6d33..4705e604 100644 --- a/lisp/ledger-state.el +++ b/lisp/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 |