diff options
author | Rémi Vanicat <vanicat@debian.org> | 2013-02-08 18:35:14 +0100 |
---|---|---|
committer | Rémi Vanicat <vanicat@debian.org> | 2013-02-08 21:17:08 +0100 |
commit | e304cdfdbbd081e36925135f90b9ec052e8478ce (patch) | |
tree | 26ea138ffdf7bf08ade2eba60fec0c2322b7a9e4 /lisp/ldg-reconcile.el | |
parent | 0b63dc0f84236b30e771a7c3b9867cfc5a3965be (diff) | |
download | fork-ledger-e304cdfdbbd081e36925135f90b9ec052e8478ce.tar.gz fork-ledger-e304cdfdbbd081e36925135f90b9ec052e8478ce.tar.bz2 fork-ledger-e304cdfdbbd081e36925135f90b9ec052e8478ce.zip |
After reconciling, save all buffer that need to be saved.
Diffstat (limited to 'lisp/ldg-reconcile.el')
-rw-r--r-- | lisp/ldg-reconcile.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ldg-reconcile.el b/lisp/ldg-reconcile.el index 2bdd6026..ee87b1b8 100644 --- a/lisp/ldg-reconcile.el +++ b/lisp/ldg-reconcile.el @@ -22,6 +22,7 @@ ;; Reconcile mode (defvar ledger-buf nil) +(defvar ledger-bufs nil) (defvar ledger-acct nil) (defcustom ledger-recon-buffer-name "*Reconcile*" "Name to use for reconciliation window" @@ -135,8 +136,9 @@ (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))) (set-buffer-modified-p nil) (ledger-display-balance)) @@ -199,12 +201,14 @@ (unless (looking-at "(") (error (buffer-string))) (read (current-buffer)))))) + (setq ledger-bufs ()) (if (> (length items) 0) (dolist (item items) (let ((index 1)) (dolist (xact (nthcdr 5 item)) (let ((beg (point)) (where (ledger-marker-where-xact-is item))) + (add-to-list 'ledger-bufs (car where)) (insert (format "%s %-4s %-30s %-30s %15s\n" (format-time-string "%Y/%m/%d" (nth 2 item)) (if (nth 3 item) |