diff options
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 |