diff options
Diffstat (limited to 'lisp/ldg-reconcile.el')
-rw-r--r-- | lisp/ldg-reconcile.el | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/lisp/ldg-reconcile.el b/lisp/ldg-reconcile.el index 3be882f4..baeadc33 100644 --- a/lisp/ldg-reconcile.el +++ b/lisp/ldg-reconcile.el @@ -5,41 +5,41 @@ (defun ledger-display-balance () (let ((buffer ledger-buf) - (account ledger-acct)) + (account ledger-acct)) (with-temp-buffer (let ((exit-code (ledger-run-ledger buffer "-C" "balance" account))) - (if (/= 0 exit-code) - (message "Error determining cleared balance") - (goto-char (1- (point-max))) - (goto-char (line-beginning-position)) - (delete-horizontal-space) - (message "Cleared balance = %s" - (buffer-substring-no-properties (point) - (line-end-position)))))))) + (if (/= 0 exit-code) + (message "Error determining cleared balance") + (goto-char (1- (point-max))) + (goto-char (line-beginning-position)) + (delete-horizontal-space) + (message "Cleared balance = %s" + (buffer-substring-no-properties (point) + (line-end-position)))))))) (defun ledger-reconcile-toggle () (interactive) (let ((where (get-text-property (point) 'where)) - (account ledger-acct) - (inhibit-read-only t) - cleared) + (account ledger-acct) + (inhibit-read-only t) + cleared) (when (or (equal (car where) "<stdin>") (equal (car where) "/dev/stdin")) (with-current-buffer ledger-buf - (goto-char (cdr where)) - (setq cleared (ledger-toggle-current 'pending))) + (goto-char (cdr where)) + (setq cleared (ledger-toggle-current 'pending))) (if cleared - (add-text-properties (line-beginning-position) - (line-end-position) - (list 'face 'bold)) - (remove-text-properties (line-beginning-position) - (line-end-position) - (list 'face)))) + (add-text-properties (line-beginning-position) + (line-end-position) + (list 'face 'bold)) + (remove-text-properties (line-beginning-position) + (line-end-position) + (list 'face)))) (forward-line))) (defun ledger-reconcile-refresh () (interactive) (let ((inhibit-read-only t) - (line (count-lines (point-min) (point)))) + (line (count-lines (point-min) (point)))) (erase-buffer) (ledger-do-reconcile) (set-buffer-modified-p t) @@ -49,9 +49,9 @@ (defun ledger-reconcile-refresh-after-save () (let ((buf (get-buffer "*Reconcile*"))) (if buf - (with-current-buffer buf - (ledger-reconcile-refresh) - (set-buffer-modified-p nil))))) + (with-current-buffer buf + (ledger-reconcile-refresh) + (set-buffer-modified-p nil))))) (defun ledger-reconcile-add () (interactive) @@ -64,12 +64,12 @@ (let ((where (get-text-property (point) 'where))) (when (or (equal (car where) "<stdin>") (equal (car where) "/dev/stdin")) (with-current-buffer ledger-buf - (goto-char (cdr where)) - (ledger-delete-current-entry)) + (goto-char (cdr where)) + (ledger-delete-current-entry)) (let ((inhibit-read-only t)) - (goto-char (line-beginning-position)) - (delete-region (point) (1+ (line-end-position))) - (set-buffer-modified-p t))))) + (goto-char (line-beginning-position)) + (delete-region (point) (1+ (line-end-position))) + (set-buffer-modified-p t))))) (defun ledger-reconcile-visit () (interactive) @@ -95,12 +95,12 @@ (goto-char (point-min)) (while (not (eobp)) (let ((where (get-text-property (point) 'where)) - (face (get-text-property (point) 'face))) - (if (and (eq face 'bold) - (or (equal (car where) "<stdin>") (equal (car where) "/dev/stdin"))) - (with-current-buffer ledger-buf - (goto-char (cdr where)) - (ledger-toggle-current 'cleared)))) + (face (get-text-property (point) 'face))) + (if (and (eq face 'bold) + (or (equal (car where) "<stdin>") (equal (car where) "/dev/stdin"))) + (with-current-buffer ledger-buf + (goto-char (cdr where)) + (ledger-toggle-current 'cleared)))) (forward-line 1))) (ledger-reconcile-save)) @@ -110,12 +110,12 @@ (defun ledger-reconcile (account) (interactive "sAccount to reconcile: ") (let ((buf (current-buffer)) - (rbuf (get-buffer "*Reconcile*"))) + (rbuf (get-buffer "*Reconcile*"))) (if rbuf - (kill-buffer rbuf)) + (kill-buffer rbuf)) (add-hook 'after-save-hook 'ledger-reconcile-refresh-after-save) (with-current-buffer - (pop-to-buffer (get-buffer-create "*Reconcile*")) + (pop-to-buffer (get-buffer-create "*Reconcile*")) (ledger-reconcile-mode) (set (make-local-variable 'ledger-buf) buf) (set (make-local-variable 'ledger-acct) account) |