瀏覽代碼

Conditionally delete windows in agenda quit

Before this patch, org-agenda-quit would delete the agenda window if
the frame had more than one window.  This patch changes that behavior
slightly so that if org-agenda-window-setup is 'current-window, the
agenda window won't be deleted.
Peter Jones 16 年之前
父節點
當前提交
8b38105040
共有 2 個文件被更改,包括 6 次插入1 次删除
  1. 3 0
      lisp/ChangeLog
  2. 3 1
      lisp/org-agenda.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-03-01  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-agenda.el (org-agenda-quit): Delete window only when the
+	frame-setup was not `current-window'.
+
 	* org.el (org-tag-persistent-alist): New option.
 	(org-startup-options): Add keyword `noptag'.
 	(org-fast-todo-selection): Handle :newline correctly.

+ 3 - 1
lisp/org-agenda.el

@@ -4455,7 +4455,9 @@ If ERROR is non-nil, throw an error, otherwise just return nil."
   (if org-agenda-columns-active
       (org-columns-quit)
     (let ((buf (current-buffer)))
-      (if (not (one-window-p)) (delete-window))
+      (and (not (eq org-agenda-window-setup 'current-window)) 
+           (not (one-window-p))
+           (delete-window))
       (kill-buffer buf)
       (org-agenda-reset-markers)
       (org-columns-remove-overlays)