Function: diary-live-p
diary-live-p is an autoloaded and byte-compiled function defined in
diary-lib.el.gz.
Signature
(diary-live-p)
Documentation
Return non-nil if the diary is being displayed.
The actual return value is a diary buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/diary-lib.el.gz
:version "23.3") ; frame-width -> window-width
;; The first version of this also checked for diary-selective-display
;; in the non-fancy case. This was an attempt to distinguish between
;; displaying the diary and just visiting the diary file. However,
;; when using fancy diary, calling diary when there are no entries to
;; display does not create the fancy buffer, nor does it set
;; diary-selective-display in the diary buffer. This means some
;; customizations will not take effect, eg:
;; https://lists.gnu.org/r/emacs-pretest-bug/2007-03/msg00466.html
;; So the check for diary-selective-display was dropped. This means the
;; diary will be displayed if one customizes a diary variable while
;; just visiting the diary-file. This is i) unlikely, and ii) no great loss.
;;;###cal-autoload
(defun diary-live-p ()
"Return non-nil if the diary is being displayed.
The actual return value is a diary buffer."
(or (get-buffer diary-fancy-buffer)
(and diary-file (find-buffer-visiting diary-file))))