diff options
-rw-r--r-- | lisp/ledger-mode.el | 1 | ||||
-rw-r--r-- | lisp/ledger-report.el | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lisp/ledger-mode.el b/lisp/ledger-mode.el index 014d2d7b..5338427a 100644 --- a/lisp/ledger-mode.el +++ b/lisp/ledger-mode.el @@ -337,6 +337,7 @@ With a prefix argument, remove the effective date. " (set (make-local-variable 'pcomplete-command-completion-function) 'ledger-complete-at-point) (add-hook 'completion-at-point-functions 'pcomplete-completions-at-point nil t) + (add-hook 'after-save-hook 'ledger-report-redo) ;(add-hook 'after-save-hook) (add-hook 'post-command-hook 'ledger-highlight-xact-under-point nil t) diff --git a/lisp/ledger-report.el b/lisp/ledger-report.el index 9916c085..3c51fc10 100644 --- a/lisp/ledger-report.el +++ b/lisp/ledger-report.el @@ -361,7 +361,8 @@ Optional EDIT the command." "Redo the report in the current ledger report buffer." (interactive) - (if (get-buffer ledger-report-buffer-name) + (if (and (get-buffer ledger-buf) + (get-buffer ledger-report-buffer-name)) (progn (pop-to-buffer (get-buffer ledger-report-buffer-name)) (shrink-window-if-larger-than-buffer) |