summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2013-06-27 21:36:22 -0700
committerCraig Earls <enderw88@gmail.com>2013-06-27 21:36:22 -0700
commit52dd81ca9e64f0b3a413156f8cc1d57e2cf162c6 (patch)
tree14bd7cde6a348551825eeef9b360123e4c932d39 /lisp
parent26d7197f6429332af0f363bb708bf99517533515 (diff)
downloadfork-ledger-52dd81ca9e64f0b3a413156f8cc1d57e2cf162c6.tar.gz
fork-ledger-52dd81ca9e64f0b3a413156f8cc1d57e2cf162c6.tar.bz2
fork-ledger-52dd81ca9e64f0b3a413156f8cc1d57e2cf162c6.zip
Added buffer cleanup and tweaked the reconcile quit routines.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ldg-mode.el2
-rw-r--r--lisp/ldg-reconcile.el8
2 files changed, 4 insertions, 6 deletions
diff --git a/lisp/ldg-mode.el b/lisp/ldg-mode.el
index 42571a17..fe12b105 100644
--- a/lisp/ldg-mode.el
+++ b/lisp/ldg-mode.el
@@ -164,7 +164,7 @@ Can indent, complete or align depending on context."
(define-key map [(control ?c) (control ?y)] 'ledger-set-year)
(define-key map [(control ?c) (control ?p)] 'ledger-display-balance-at-point)
(define-key map [(control ?c) (control ?l)] 'ledger-display-ledger-stats)
- (define-key map [(control ?c) (control ?q)] 'ledger-mode-clean-buffer)
+ (define-key map [(control ?c) (control ?q)] 'ledger-post-align-xact)
(define-key map [tab] 'ledger-magic-tab)
(define-key map [(control tab)] 'ledger-post-align-xact)
diff --git a/lisp/ldg-reconcile.el b/lisp/ldg-reconcile.el
index 24168061..ae5142b7 100644
--- a/lisp/ldg-reconcile.el
+++ b/lisp/ldg-reconcile.el
@@ -203,7 +203,7 @@ Return the number of uncleared xacts found."
(target-buffer (if where
(ledger-reconcile-get-buffer where)
nil))
- (cur-buf (get-buffer ledger-recon-buffer-name)))
+ (cur-win (get-buffer-window (get-buffer ledger-recon-buffer-name))))
(when target-buffer
(switch-to-buffer-other-window target-buffer)
(ledger-goto-line (cdr where))
@@ -211,10 +211,8 @@ Return the number of uncleared xacts found."
(recenter)
(ledger-highlight-xact-under-point)
(forward-char -1)
- (if come-back
- (select-window
- (get-buffer-window
- (get-buffer ledger-recon-buffer-name))))))))
+ (if (and come-back cur-win)
+ (select-window cur-win))))))
(defun ledger-reconcile-save ()
"Save the ledger buffer."