From 69efea6c543bb128422633239e7618f0d0eda6cf Mon Sep 17 00:00:00 2001 From: RĂ©mi Vanicat Date: Sat, 9 Feb 2013 19:29:04 +0100 Subject: Take care to not delete some random buffer when exiting reconcile --- lisp/ldg-reconcile.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/ldg-reconcile.el b/lisp/ldg-reconcile.el index e0ba1ea7..b475ebb7 100644 --- a/lisp/ldg-reconcile.el +++ b/lisp/ldg-reconcile.el @@ -172,14 +172,15 @@ (defun ledger-reconcile-quit () (interactive) - (let ((buf ledger-buf)) + (let ((buf ledger-buf) + (reconcile-buf (current-buffer))) (with-current-buffer ledger-buf (remove-hook 'after-save-hook 'ledger-reconcile-refresh-after-save t)) ;Make sure you delete the window before you delete the buffer, ;otherwise, madness ensues - (delete-window (get-buffer-window (current-buffer))) - (kill-buffer (current-buffer)) + (delete-window (get-buffer-window reconcile-buf)) + (kill-buffer (reconcile-buf)) (if ledger-fold-on-reconcile (ledger-occur-quit-buffer buf)))) -- cgit v1.2.3