]> code.delx.au - gnu-emacs/blobdiff - lisp/calendar/cal-x.el
mouse-drag-line changes for mouse-1 in header-line
[gnu-emacs] / lisp / calendar / cal-x.el
index 522b4c5f79021fc0a1c762cb7de1a0fce45c3f28..4a13602ec0f9b34ac51b7a1226029731d148f137 100644 (file)
@@ -1,13 +1,13 @@
 ;;; 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.
 
@@ -90,21 +90,25 @@ Runs `calendar-after-frame-setup-hook', selects frame, iconifies if needed."
       (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
@@ -151,29 +155,23 @@ If PROMPT is non-nil, prompt for the month and year to use."
 (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.")
@@ -184,5 +182,4 @@ See `calendar-frame-setup' for more information."
 
 (provide 'cal-x)
 
-;; arch-tag: c6dbddca-ae84-442d-87fc-244b76e38e17
 ;;; cal-x.el ends here