From 0f12fdabce436da82c60d31ae63bc731bc54d6a8 Mon Sep 17 00:00:00 2001 From: "Edward M. Reingold" Date: Fri, 2 Jun 1995 14:45:21 +0000 Subject: [PATCH] Fix cal-x.el to create an empty fancy-diary-buffer, if needed. --- lisp/calendar/cal-x.el | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/lisp/calendar/cal-x.el b/lisp/calendar/cal-x.el index 61ccc32faa1..d3e25e83063 100644 --- a/lisp/calendar/cal-x.el +++ b/lisp/calendar/cal-x.el @@ -103,11 +103,13 @@ Can be used to change frame parameters, such as font, color, location, etc.") (set-window-dedicated-p (selected-window) 'calendar) (set-window-dedicated-p (display-buffer - (if (memq 'fancy-diary-display diary-display-hook) - fancy-diary-buffer - (get-file-buffer diary-file))) + (if (not (memq 'fancy-diary-display diary-display-hook)) + (get-file-buffer diary-file) + (if (not (bufferp (get-buffer fancy-diary-buffer))) + (make-fancy-diary-buffer)) + fancy-diary-buffer)) 'diary)))))) - + (defun calendar-two-frame-setup (&optional arg) "Start calendar and diary in separate, dedicated frames." (if (not window-system) @@ -136,9 +138,11 @@ Can be used to change frame parameters, such as font, color, location, etc.") (save-excursion (diary)) (set-window-dedicated-p (display-buffer - (if (memq 'fancy-diary-display diary-display-hook) - fancy-diary-buffer - (get-file-buffer diary-file))) + (if (not (memq 'fancy-diary-display diary-display-hook)) + (get-file-buffer diary-file) + (if (not (bufferp (get-buffer fancy-diary-buffer))) + (make-fancy-diary-buffer)) + fancy-diary-buffer)) 'diary))))) (setq special-display-buffer-names -- 2.39.2