;;; cal-x.el --- calendar windows in dedicated frames
-;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1995, 2001-2013 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.sunysb.edu>
;; Edward M. Reingold <reingold@cs.uiuc.edu>
;; Maintainer: Glenn Morris <rgm@gnu.org>
;; Keywords: calendar
;; Human-Keywords: calendar, dedicated frames
+;; Package: calendar
;; This file is part of GNU Emacs.
(iconify-or-deiconify-frame)))
;; c-d-d is only called after (diary) has been run.
-(defvar diary-display-hook)
+(defvar diary-display-function)
(defun calendar-dedicate-diary ()
"Display and dedicate the window associated with the diary buffer."
(set-window-dedicated-p
(display-buffer
- (if (not (or (memq 'diary-fancy-display diary-display-hook)
- (memq 'fancy-diary-display diary-display-hook)))
- (get-file-buffer diary-file)
- ;; If there are no diary entries, there won't be a fancy-diary
- ;; to dedicate, so make a basic one.
- (or (get-buffer diary-fancy-buffer)
- (calendar-in-read-only-buffer diary-fancy-buffer
- (calendar-set-mode-line "Diary Entries")))
- diary-fancy-buffer))
+ (if (if (listp diary-display-function)
+ (or (memq 'diary-fancy-display diary-display-function)
+ (memq 'fancy-diary-display diary-display-function))
+ (memq diary-display-function '(diary-fancy-display
+ fancy-diary-display)))
+ (progn
+ ;; If there are no diary entries, there won't be a fancy-diary
+ ;; to dedicate, so make a basic one.
+ (or (get-buffer diary-fancy-buffer)
+ (calendar-in-read-only-buffer diary-fancy-buffer
+ (calendar-set-mode-line "Diary Entries")))
+ diary-fancy-buffer)
+ (get-file-buffer diary-file)))
t))
;;;###cal-autoload
(defun calendar-one-frame-setup (&optional prompt)
"Display calendar and diary in a single dedicated frame.
See `calendar-frame-setup' for more information."
+ (declare (obsolete calendar-frame-setup "23.1"))
(calendar-frame-setup 'one-frame prompt))
-(make-obsolete 'calendar-one-frame-setup 'calendar-frame-setup "23.1")
-
-
;;;###cal-autoload
(defun calendar-only-one-frame-setup (&optional prompt)
"Display calendar in a dedicated frame.
See `calendar-frame-setup' for more information."
+ (declare (obsolete calendar-frame-setup "23.1"))
(calendar-frame-setup 'calendar-only prompt))
-(make-obsolete 'calendar-only-one-frame-setup 'calendar-frame-setup "23.1")
-
-
;;;###cal-autoload
(defun calendar-two-frame-setup (&optional prompt)
"Display calendar and diary in separate, dedicated frames.
See `calendar-frame-setup' for more information."
+ (declare (obsolete calendar-frame-setup "23.1"))
(calendar-frame-setup 'two-frames prompt))
-(make-obsolete 'calendar-two-frame-setup 'calendar-frame-setup "23.1")
-
-
;; Undocumented and probably useless.
(defvar cal-x-load-hook nil
"Hook run on loading of the `cal-x' package.")
(provide 'cal-x)
-;; arch-tag: c6dbddca-ae84-442d-87fc-244b76e38e17
;;; cal-x.el ends here