diff options
author | Max Mikhanosha <max@openchat.com> | 2012-04-21 08:31:37 -0400 |
---|---|---|
committer | Max Mikhanosha <max@openchat.com> | 2012-04-21 08:32:12 -0400 |
commit | 9e4cacc8032babcd7b9b6000aec26d066c1cc339 (patch) | |
tree | db1eae6103c6282d6e64e7da9e4b60bb09592b4c | |
parent | 4d97b47fe5b6a1ea67cdb386db1699ea6f980fe1 (diff) | |
download | org-mode-9e4cacc8032babcd7b9b6000aec26d066c1cc339.tar.gz |
Fix q key in sticky agenda not honoring org-agenda-restore-windows-after-quit
* lisp/org-agenda.el (org-agenda-quit): copy the code for optionally
restoring window configuration after burying the sticky agenda
buffer.
-rw-r--r-- | lisp/org-agenda.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 293f18e..b35829c 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -6372,8 +6372,13 @@ If ERROR is non-nil, throw an error, otherwise just return nil." (not (one-window-p)) (delete-window))) (with-current-buffer buf - (bury-buffer))) - (org-agenda-Quit)))) + (bury-buffer) + ;; Maybe restore the pre-agenda window configuration. + (and org-agenda-restore-windows-after-quit + (not (eq org-agenda-window-setup 'other-frame)) + org-pre-agenda-window-conf + (set-window-configuration org-pre-agenda-window-conf)))))) + (org-agenda-Quit)))) (defun org-agenda-exit () "Exit agenda by removing the window or the buffer. |