summaryrefslogtreecommitdiff
path: root/lisp/ldg-complete.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-complete.el
parent712665e5b4b748c554174a13d5a66f5cab1c97fd (diff)
parent2e78e61be7ba6aa73c56c157405e45ed30990b31 (diff)
downloadledger-896d1cc3ec22659f296efa03c962abe69e5dd6e1.tar.gz
ledger-896d1cc3ec22659f296efa03c962abe69e5dd6e1.tar.bz2
ledger-896d1cc3ec22659f296efa03c962abe69e5dd6e1.zip
Merge branch 'next' into ledger-mode-automatic-transactions
Diffstat (limited to 'lisp/ldg-complete.el')
-rw-r--r--lisp/ldg-complete.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/ldg-complete.el b/lisp/ldg-complete.el
index fe27e91d..f01e6e90 100644
--- a/lisp/ldg-complete.el
+++ b/lisp/ldg-complete.el
@@ -52,8 +52,7 @@
(save-excursion
(goto-char (point-min))
(while (re-search-forward
- (concat "^[0-9/.=-]+\\(\\s-+\\*\\)?\\(\\s-+(.*?)\\)?\\s-+"
- "\\(.+?\\)\\(\t\\|\n\\| [ \t]\\)") nil t) ;; matches first line
+ ledger-payee-any-status-regex nil t) ;; matches first line
(unless (and (>= origin (match-beginning 0))
(< origin (match-end 0)))
(setq payees-list (cons (match-string-no-properties 3)
@@ -70,7 +69,7 @@ Return tree structure"
(save-excursion
(goto-char (point-min))
(while (re-search-forward
- "^[ \t]+\\([*!]\\s-+\\)?[[(]?\\(.+?\\)\\(\t\\|\n\\| [ \t]\\)" nil t)
+ ledger-account-any-status-regex nil t)
(unless (and (>= origin (match-beginning 0))
(< origin (match-end 0)))
(setq account-elements
@@ -154,7 +153,7 @@ Does not use ledger xact"
(setq rest-of-name (match-string 3))
;; Start copying the postings
(forward-line)
- (while (looking-at ledger-post-account-regex)
+ (while (looking-at ledger-account-any-status-regex)
(setq xacts (cons (buffer-substring-no-properties
(line-beginning-position)
(line-end-position))