]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix cal-x.el to create an empty fancy-diary-buffer, if needed.
authorEdward M. Reingold <reingold@emr.cs.iit.edu>
Fri, 2 Jun 1995 14:45:21 +0000 (14:45 +0000)
committerEdward M. Reingold <reingold@emr.cs.iit.edu>
Fri, 2 Jun 1995 14:45:21 +0000 (14:45 +0000)
lisp/calendar/cal-x.el

index 61ccc32faa1243e47075a7e73404afff59e6adce..d3e25e83063b87023166d3dff21d0d62d0b2bad8 100644 (file)
@@ -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