diff options
author | Craig Earls <enderw88@gmail.com> | 2014-09-13 17:11:40 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2014-09-13 17:11:40 -0700 |
commit | 84dc532b0688431d0964736f6a5d7b3804b5e903 (patch) | |
tree | cf9ecfedd64df4be947fabeb4d6872256810df5f /lisp/ledger-xact.el | |
parent | 20dd0b706a2536d16b3719667351cb8ff3ce009f (diff) | |
download | fork-ledger-84dc532b0688431d0964736f6a5d7b3804b5e903.tar.gz fork-ledger-84dc532b0688431d0964736f6a5d7b3804b5e903.tar.bz2 fork-ledger-84dc532b0688431d0964736f6a5d7b3804b5e903.zip |
everything appears to work with no empty lines between xacts.
Diffstat (limited to 'lisp/ledger-xact.el')
-rw-r--r-- | lisp/ledger-xact.el | 38 |
1 files changed, 3 insertions, 35 deletions
diff --git a/lisp/ledger-xact.el b/lisp/ledger-xact.el index 277788e6..f38bec74 100644 --- a/lisp/ledger-xact.el +++ b/lisp/ledger-xact.el @@ -45,14 +45,8 @@ Requires empty line separating xacts." (interactive "d") (save-excursion (goto-char pos) - (list (progn - (backward-paragraph) - (if (/= (point) (point-min)) - (forward-line)) - (line-beginning-position)) - (progn - (forward-paragraph) - (line-beginning-position))))) + (list (ledger-beginning-record-function) + (ledger-end-record-function)))) (defun ledger-highlight-xact-under-point () "Move the highlight overlay to the current transaction." @@ -154,7 +148,7 @@ MOMENT is an encoded date" (string-to-number (match-string 2 date))))) (ledger-xact-find-slot encoded-date) (insert transaction "\n") - (backward-paragraph 2) + (ledger-beginning-record-function) (re-search-forward ledger-iso-date-regexp) (replace-match date) (ledger-next-amount) @@ -224,32 +218,6 @@ beginning with whitespace" (ledger-xact-start-xact-or-directive-p))) (forward-line)))) -(defun ledger-xact-prev-xact () - "Move point to the previous transaction." - (interactive) - (backward-paragraph) - (when (re-search-backward ledger-xact-line-regexp nil t) - (goto-char (match-beginning 0)) - (re-search-forward ledger-post-line-regexp) - (goto-char (match-end ledger-regex-post-line-group-account)))) - -;; (defun ledger-post-next-xact () -;; "Move point to the next transaction." -;; (interactive) -;; (when (re-search-forward ledger-xact-line-regexp nil t) -;; (goto-char (match-beginning 0)) -;; (re-search-forward ledger-post-line-regexp) -;; (goto-char (match-end ledger-regex-post-line-group-account)))) - -;; (defun ledger-xact-next-xact () -;; (interactive) -;; (beginning-of-line) -;; (if (looking-at ledger-xact-start-regex) -;; (forward-line)) -;; (re-search-forward ledger-xact-start-regex) -;; (forward-line -1)) - - (provide 'ledger-xact) ;;; ledger-xact.el ends here |