Function: diary-simple-display
diary-simple-display is a byte-compiled function defined in
diary-lib.el.gz.
Signature
(diary-simple-display)
Documentation
Display the diary buffer if there are any relevant entries or holidays.
Entries that do not apply are made invisible. Holidays are shown
in the mode line. This is an option for diary-display-function.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/diary-lib.el.gz
(defun diary-simple-display ()
"Display the diary buffer if there are any relevant entries or holidays.
Entries that do not apply are made invisible. Holidays are shown
in the mode line. This is an option for `diary-display-function'."
;; If selected window is dedicated (to the calendar), need a new one
;; to display the diary.
(let* ((pop-up-frames (or pop-up-frames (window-dedicated-p)))
(dbuff (find-buffer-visiting diary-file))
(empty (diary-display-no-entries)))
;; This may be too wide, but when simple diary is used there is
;; nowhere else for the holidays to go. Also, it is documented in
;; diary-show-holidays-flag that the holidays go in the mode-line.
;; FIXME however if there are no diary entries a separate buffer
;; is displayed - this is inconsistent.
(with-current-buffer dbuff
(calendar-set-mode-line (format "Diary for %s" (cdr empty))))
(unless (car empty) ; no entries
(with-current-buffer dbuff
(let ((window (display-buffer (current-buffer))))
;; d-s-p is passed from diary-list-entries.
(set-window-point window diary-saved-point)
(set-window-start window (point-min)))))))