Function: org-agenda--quit
org-agenda--quit is a byte-compiled function defined in
org-agenda.el.gz.
Signature
(org-agenda--quit &optional BURY)
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-agenda.el.gz
(defun org-agenda--quit (&optional bury)
(if org-agenda-columns-active
(org-columns-quit)
(let ((wconf org-agenda-pre-window-conf)
(buf (current-buffer))
(org-agenda-last-indirect-window
(and (eq org-indirect-buffer-display 'other-window)
org-agenda-last-indirect-buffer
(get-buffer-window org-agenda-last-indirect-buffer))))
(cond
((eq org-agenda-window-setup 'other-frame)
(delete-frame))
((eq org-agenda-window-setup 'other-tab)
(if (fboundp 'tab-bar-close-tab)
(tab-bar-close-tab)
(user-error "Your version of Emacs does not have tab bar mode support")))
((and org-agenda-restore-windows-after-quit
wconf)
;; Maybe restore the pre-agenda window configuration. Reset
;; `org-agenda-pre-window-conf' before running
;; `set-window-configuration', which loses the current buffer.
(setq org-agenda-pre-window-conf nil)
(set-window-configuration wconf))
(t
(when org-agenda-last-indirect-window
(delete-window org-agenda-last-indirect-window))
(and (not (eq org-agenda-window-setup 'current-window))
(not (one-window-p))
(delete-window))))
(if bury
;; Set the agenda buffer as the current buffer instead of
;; passing it as an argument to `bury-buffer' so that
;; `bury-buffer' removes it from the window.
(with-current-buffer buf
(bury-buffer))
(kill-buffer buf)
(setq org-agenda-archives-mode nil
org-agenda-buffer nil)))))