diff options
author | John Wiegley <johnw@newartisans.com> | 2010-04-12 03:49:44 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-04-12 03:49:44 -0400 |
commit | 2af1360042b12ebbc61bc05bc045e418a690f99e (patch) | |
tree | d2abadd5255fe782d425e2d8856f90ab38cf172d /lisp/ldg-post.el | |
parent | 7ca8149ec5c7fa88d98df83e6260210372223036 (diff) | |
download | ledger-2af1360042b12ebbc61bc05bc045e418a690f99e.tar.gz ledger-2af1360042b12ebbc61bc05bc045e418a690f99e.tar.bz2 ledger-2af1360042b12ebbc61bc05bc045e418a690f99e.zip |
Rewrote ldg-regex with a macro (for simplicity)
Diffstat (limited to 'lisp/ldg-post.el')
-rw-r--r-- | lisp/ldg-post.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/ldg-post.el b/lisp/ldg-post.el index 30edd035..c762e51b 100644 --- a/lisp/ldg-post.el +++ b/lisp/ldg-post.el @@ -50,7 +50,7 @@ to choose from." (account-len (length account)) (pos (point))) (goto-char (line-beginning-position)) - (when (re-search-forward ledger-regex-post-line (line-end-position) t) + (when (re-search-forward ledger-post-line-regexp (line-end-position) t) (let ((existing-len (length (match-string 3)))) (goto-char (match-beginning 3)) (delete-region (match-beginning 3) (match-end 3)) @@ -76,13 +76,13 @@ to choose from." (goto-char beg) (when (< end (line-end-position)) (goto-char (line-beginning-position)) - (if (looking-at ledger-regex-post-line) + (if (looking-at ledger-post-line-regexp) (ledger-post-align-amount))))) (defun ledger-post-edit-amount () (interactive) (goto-char (line-beginning-position)) - (when (re-search-forward ledger-regex-post-line (line-end-position) t) + (when (re-search-forward ledger-post-line-regexp (line-end-position) t) (goto-char (match-end 3)) (when (re-search-forward "[-.,0-9]+" (line-end-position) t) (let ((val (match-string 0))) @@ -96,16 +96,16 @@ to choose from." (defun ledger-post-prev-xact () (interactive) (backward-paragraph) - (when (re-search-backward ledger-regex-xact-line nil t) + (when (re-search-backward ledger-xact-line-regexp nil t) (goto-char (match-beginning 0)) - (re-search-forward ledger-regex-post-line) + (re-search-forward ledger-post-line-regexp) (goto-char (match-end 3)))) (defun ledger-post-next-xact () (interactive) - (when (re-search-forward ledger-regex-xact-line nil t) + (when (re-search-forward ledger-xact-line-regexp nil t) (goto-char (match-beginning 0)) - (re-search-forward ledger-regex-post-line) + (re-search-forward ledger-post-line-regexp) (goto-char (match-end 3)))) (defun ledger-post-setup () |