diff options
author | Craig Earls <enderw88@gmail.com> | 2013-02-27 17:51:03 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2013-02-27 17:51:03 -0700 |
commit | b5548661dcb69ed6c1e1723e52284978835fa1a1 (patch) | |
tree | 3ae8bd1a450fc3cc58919b4327426d513ffa0add /lisp | |
parent | 6bc701fc692323b2a9636249c0be4773807a78d8 (diff) | |
download | ledger-b5548661dcb69ed6c1e1723e52284978835fa1a1.tar.gz ledger-b5548661dcb69ed6c1e1723e52284978835fa1a1.tar.bz2 ledger-b5548661dcb69ed6c1e1723e52284978835fa1a1.zip |
Fixed data regexs so that dashes are properly handled in dates
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ldg-state.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/ldg-state.el b/lisp/ldg-state.el index beecb591..b2247afe 100644 --- a/lisp/ldg-state.el +++ b/lisp/ldg-state.el @@ -44,7 +44,7 @@ (save-excursion (when (or (looking-at "^[0-9]") (re-search-backward "^[0-9]" nil t)) - (skip-chars-forward "0-9./=") + (skip-chars-forward "0-9./=\\-") (skip-syntax-forward " ") (cond ((looking-at "!\\s-*") 'pending) ((looking-at "\\*\\s-*") 'cleared) @@ -97,7 +97,7 @@ dropped." (save-excursion ;; this excursion checks state of entire ;; transaction and unclears if marked (goto-char (car bounds)) ;; beginning of xact - (skip-chars-forward "0-9./= \t") ;; skip the date + (skip-chars-forward "0-9./=\\- \t") ;; skip the date (setq cur-status (and (member (char-after) '(?\* ?\!)) (ledger-state-from-char (char-after)))) ;;if cur-status if !, or * then delete the marker @@ -193,7 +193,7 @@ dropped." (insert (make-string width ? )))))) (forward-line)) (goto-char (car bounds)) - (skip-chars-forward "0-9./= \t") + (skip-chars-forward "0-9./=\\- \t") (insert (ledger-char-from-state state) " ") (setq new-status state) (if (re-search-forward "\\(\t\\| [ \t]\\)" @@ -233,7 +233,7 @@ dropped." (save-excursion (when (or (looking-at "^[0-9]") (re-search-backward "^[0-9]" nil t)) - (skip-chars-forward "0-9./=") + (skip-chars-forward "0-9./=\\-") (delete-horizontal-space) (if (or (eq (ledger-state-from-char (char-after)) 'pending) (eq (ledger-state-from-char (char-after)) 'cleared)) |