summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2013-02-09 17:47:09 -0700
committerCraig Earls <enderw88@gmail.com>2013-02-09 17:47:09 -0700
commit114be62d248723bfae12e383b168f364857d8793 (patch)
tree500f923112acc26d84f0694fa0d434ae2338c83d /lisp
parent2b55ef7dab335f2ae914912d8e541f6228f57f19 (diff)
downloadfork-ledger-114be62d248723bfae12e383b168f364857d8793.tar.gz
fork-ledger-114be62d248723bfae12e383b168f364857d8793.tar.bz2
fork-ledger-114be62d248723bfae12e383b168f364857d8793.zip
Correct error that prevented clearing postings if ledger--clear-whole-entires was nil
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ldg-reconcile.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/ldg-reconcile.el b/lisp/ldg-reconcile.el
index e0ba1ea7..e5048a8c 100644
--- a/lisp/ldg-reconcile.el
+++ b/lisp/ldg-reconcile.el
@@ -81,12 +81,10 @@
(account ledger-acct)
(inhibit-read-only t)
cleared)
-; (when (is-stdin (car where))
-; (with-current-buffer ledger-buf
(when (ledger-reconcile-get-buffer where)
(with-current-buffer (ledger-reconcile-get-buffer where)
(goto-char (cdr where))
- (setq cleared (ledger-toggle-current-entry)))
+ (setq cleared (ledger-toggle-current)))
;remove the existing face and add the new face
(remove-text-properties (line-beginning-position)
(line-end-position)
@@ -146,6 +144,7 @@
(set-buffer-modified-p t)))))
(defun ledger-reconcile-visit (&optional come-back)
+ (interactive)
(progn
(beginning-of-line)
(let* ((where (get-text-property (1+ (point)) 'where))
@@ -162,8 +161,6 @@
(defun ledger-reconcile-save ()
(interactive)
-; (with-current-buffer ledger-buf
-; (save-buffer))
(dolist (buf (cons ledger-buf ledger-bufs))
(with-current-buffer buf
(save-buffer)))
@@ -194,7 +191,9 @@
(cons
buf
(save-excursion
- (goto-line (nth 1 emacs-xact))
+ (if ledger-clear-whole-entries
+ (goto-line (nth 1 emacs-xact))
+ (goto-line (nth 0 (nth 5 emacs-xact))))
(point-marker))))))
(defun ledger-do-reconcile ()
@@ -262,8 +261,9 @@
'previous-line
'mouse-set-point
'ledger-reconcile-toggle))
- (save-excursion
- (ledger-reconcile-visit t))))
+ (if ledger-buffer-tracks-reconcile-buffer
+ (save-excursion
+ (ledger-reconcile-visit t)))))
(defun ledger-reconcile (account)
(interactive "sAccount to reconcile: ")