summaryrefslogtreecommitdiff
path: root/lisp/ldg-complete.el
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2013-04-02 23:13:23 -0700
committerCraig Earls <enderw88@gmail.com>2013-04-02 23:13:23 -0700
commit519e57ca1fac01ea057bea8263c6cb06a8ac4e7e (patch)
tree83529f38b2fb22b4ac5e29c3cc4c4c6047be5309 /lisp/ldg-complete.el
parent86d0fd87c49e20b0f5262e7ae48234986584b750 (diff)
downloadledger-519e57ca1fac01ea057bea8263c6cb06a8ac4e7e.tar.gz
ledger-519e57ca1fac01ea057bea8263c6cb06a8ac4e7e.tar.bz2
ledger-519e57ca1fac01ea057bea8263c6cb06a8ac4e7e.zip
Consolidated all major regexes into ldg-regex. Only major exception are the regex in ledger context at point.
Diffstat (limited to 'lisp/ldg-complete.el')
-rw-r--r--lisp/ldg-complete.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/ldg-complete.el b/lisp/ldg-complete.el
index fe27e91d..3462c0bb 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-xact-payee-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-complete-account-regex nil t)
(unless (and (>= origin (match-beginning 0))
(< origin (match-end 0)))
(setq account-elements