From: Edward M. Reingold Date: Fri, 2 Jun 1995 14:45:21 +0000 (+0000) Subject: Fix cal-x.el to create an empty fancy-diary-buffer, if needed. X-Git-Tag: emacs-19.34~3798 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0f12fdabce436da82c60d31ae63bc731bc54d6a8;p=emacs.git Fix cal-x.el to create an empty fancy-diary-buffer, if needed. --- 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