From: Karl Heuer Date: Sun, 27 Jun 1999 21:23:26 +0000 (+0000) Subject: (calendar-only-one-frame-setup): New function. X-Git-Tag: emacs-20.4~59 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=77a7efce7e9f14b7ef238c54d3390a63b8b79c9f;p=emacs.git (calendar-only-one-frame-setup): New function. --- diff --git a/lisp/calendar/cal-x.el b/lisp/calendar/cal-x.el index 1e6cf4b0dcf..7151671d722 100644 --- a/lisp/calendar/cal-x.el +++ b/lisp/calendar/cal-x.el @@ -96,6 +96,25 @@ Can be used to change frame parameters, such as font, color, location, etc.") fancy-diary-buffer)) 'diary)))))) +(defun calendar-only-one-frame-setup (&optional arg) + "Start calendar and display it in a dedicated frame." + (if (not window-system) + (calendar-basic-setup arg) + (if (frame-live-p calendar-frame) (delete-frame calendar-frame)) + (let ((special-display-buffer-names nil) + (view-diary-entries-initially nil)) + (save-window-excursion + (save-excursion + (setq calendar-frame + (make-frame calendar-frame-parameters)) + (run-hooks 'calendar-after-frame-setup-hooks) + (select-frame calendar-frame) + (if (eq 'icon (cdr (assoc 'visibility + (frame-parameters calendar-frame)))) + (iconify-or-deiconify-frame)) + (calendar-basic-setup arg) + (set-window-dedicated-p (selected-window) 'calendar)))))) + (defun calendar-two-frame-setup (&optional arg) "Start calendar and diary in separate, dedicated frames." (if (not window-system)