org-agenda: Track last indirect buffer
commit460f31efa03ceb18c8177dd1da76ae9d8650e0aa
authorKyle Meyer <kyle@kyleam.com>
Mon, 5 Jan 2015 03:18:40 +0000 (4 22:18 -0500)
committerNicolas Goaziou <mail@nicolasgoaziou.fr>
Mon, 5 Jan 2015 11:49:41 +0000 (5 12:49 +0100)
treeb323786be6bd84b5330e4fa70c5187067bb7ab51
parent70f965535b07c03a40792237de3a970d1cb57551
org-agenda: Track last indirect buffer

* lisp/org-agenda.el (org-agenda-tree-to-indirect-buffer): Record last
  indirect buffer for agenda.
* lisp/org-agenda.el (org-agenda-quit): Delete window for
  org-agenda-last-indirect-buffer, not org-last-indirect-buffer.

Introduce a new variable, org-agenda-last-indirect-buffer, that is
specific for the agenda (and perhaps a particular agenda buffer, if
org-agenda-sticky is set).  This prevents org-agenda-quit from deleting
a window if it is displaying a buffer that was created through a
org-tree-to-indirect-buffer call outside of
org-agenda-tree-to-indirect-buffer.

Make org-agenda-Quit check for indirect buffer windows, like
org-agenda-quit does.
lisp/org-agenda.el