Function: calendar-exit

calendar-exit is an interactive and byte-compiled function defined in calendar.el.gz.

Signature

(calendar-exit &optional KILL)

Documentation

Get out of the calendar window and hide it and related buffers.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/calendar.el.gz
(defun calendar-exit (&optional kill)
  "Get out of the calendar window and hide it and related buffers."
  (interactive "P")
  (let ((diary-buffer (get-file-buffer diary-file))
        (calendar-buffers (calendar-buffer-list)))
    (when (or (not diary-buffer)
              (not (buffer-modified-p diary-buffer))
              (yes-or-no-p
               "Diary modified; do you really want to exit the calendar? "))
      (if (and calendar-setup (display-multi-frame-p))
          ;; FIXME: replace this cruft with the `quit-restore' window property
          (dolist (w (window-list-1 nil nil t))
            (if (and (memq (window-buffer w) calendar-buffers)
                     (window-dedicated-p w))
                (if (eq (window-deletable-p w) 'frame)
		    (if calendar-remove-frame-by-deleting
			(delete-frame (window-frame w))
		      (iconify-frame (window-frame w)))
		  (quit-window kill w))))
        (dolist (b calendar-buffers)
          (quit-windows-on b kill))))))