Mercurial > emacs
annotate lisp/calendar/cal-x.el @ 93164:849abb573acb
(vc-bzr-state): Return 'removed for removed files and
'unregistered for unregistered files.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Sun, 23 Mar 2008 20:50:52 +0000 |
parents | 531ac371602f |
children | bb7e96e383ab |
rev | line source |
---|---|
14269
af156af979be
Fix doc strings at top of file.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
14169
diff
changeset
|
1 ;;; cal-x.el --- calendar windows in dedicated frames in X |
10088 | 2 |
92623
fce91e69b8d6
(calendar-frame-parameters, calendar-and-diary-frame-parameters): Fix
Glenn Morris <rgm@gnu.org>
parents:
92605
diff
changeset
|
3 ;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, |
fce91e69b8d6
(calendar-frame-parameters, calendar-and-diary-frame-parameters): Fix
Glenn Morris <rgm@gnu.org>
parents:
92605
diff
changeset
|
4 ;; 2008 Free Software Foundation, Inc. |
10088 | 5 |
6 ;; Author: Michael Kifer <kifer@cs.sunysb.edu> | |
92857 | 7 ;; Edward M. Reingold <reingold@cs.uiuc.edu> |
65919
5c09efcfc1d9
Update maintainer email address.
Glenn Morris <rgm@gnu.org>
parents:
64085
diff
changeset
|
8 ;; Maintainer: Glenn Morris <rgm@gnu.org> |
10088 | 9 ;; Keywords: calendar |
14269
af156af979be
Fix doc strings at top of file.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
14169
diff
changeset
|
10 ;; Human-Keywords: calendar, dedicated frames, X Window System |
10088 | 11 |
12 ;; This file is part of GNU Emacs. | |
13 | |
14 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
15 ;; it under the terms of the GNU General Public License as published by | |
78216
93e11478c954
Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents:
77279
diff
changeset
|
16 ;; the Free Software Foundation; either version 3, or (at your option) |
10088 | 17 ;; any later version. |
18 | |
19 ;; GNU Emacs is distributed in the hope that it will be useful, | |
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
22 ;; GNU General Public License for more details. | |
23 | |
24 ;; You should have received a copy of the GNU General Public License | |
14169 | 25 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
64085 | 26 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
27 ;; Boston, MA 02110-1301, USA. | |
10088 | 28 |
29 ;;; Commentary: | |
30 | |
14269
af156af979be
Fix doc strings at top of file.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
14169
diff
changeset
|
31 ;; This collection of functions implements dedicated frames in X for |
10088 | 32 ;; calendar.el. |
33 | |
34 ;;; Code: | |
35 | |
13441 | 36 (require 'calendar) |
37 | |
92605
5fb3b5d72071
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92593
diff
changeset
|
38 (defcustom diary-frame-parameters |
23552
905aab3037e8
Add title parameters to frames.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22262
diff
changeset
|
39 '((name . "Diary") (title . "Diary") (height . 10) (width . 80) |
905aab3037e8
Add title parameters to frames.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22262
diff
changeset
|
40 (unsplittable . t) (minibuffer . nil)) |
10088 | 41 "Parameters of the diary frame, if the diary is in its own frame. |
93028
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
42 Location and color should be set in .Xdefaults." ; why? |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
43 :type 'alist |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
44 :options '((name string) (title string) (height integer) (width integer) |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
45 (unsplittable boolean) (minibuffer boolean) |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
46 (vertical-scroll-bars boolean)) |
92605
5fb3b5d72071
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92593
diff
changeset
|
47 :group 'calendar) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
37431
diff
changeset
|
48 |
92623
fce91e69b8d6
(calendar-frame-parameters, calendar-and-diary-frame-parameters): Fix
Glenn Morris <rgm@gnu.org>
parents:
92605
diff
changeset
|
49 (defcustom calendar-frame-parameters |
93028
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
50 '((name . "Calendar") (title . "Calendar") (height . 10) (width . 80) |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
51 (unsplittable . t) (minibuffer . nil) (vertical-scroll-bars . nil)) |
10088 | 52 "Parameters of the calendar frame, if the calendar is in a separate frame. |
92605
5fb3b5d72071
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92593
diff
changeset
|
53 Location and color should be set in .Xdefaults." |
93028
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
54 :type 'alist |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
55 :options '((name string) (title string) (height integer) (width integer) |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
56 (unsplittable boolean) (minibuffer boolean) |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
57 (vertical-scroll-bars boolean)) |
92605
5fb3b5d72071
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92593
diff
changeset
|
58 :group 'calendar) |
10088 | 59 |
92623
fce91e69b8d6
(calendar-frame-parameters, calendar-and-diary-frame-parameters): Fix
Glenn Morris <rgm@gnu.org>
parents:
92605
diff
changeset
|
60 (defcustom calendar-and-diary-frame-parameters |
23552
905aab3037e8
Add title parameters to frames.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22262
diff
changeset
|
61 '((name . "Calendar") (title . "Calendar") (height . 28) (width . 80) |
905aab3037e8
Add title parameters to frames.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22262
diff
changeset
|
62 (minibuffer . nil)) |
10088 | 63 "Parameters of the frame that displays both the calendar and the diary. |
92605
5fb3b5d72071
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92593
diff
changeset
|
64 Location and color should be set in .Xdefaults." |
93028
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
65 :type 'alist |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
66 :options '((name string) (title string) (height integer) (width integer) |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
67 (unsplittable boolean) (minibuffer boolean) |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
68 (vertical-scroll-bars boolean)) |
92605
5fb3b5d72071
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92593
diff
changeset
|
69 :group 'calendar) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
37431
diff
changeset
|
70 |
92605
5fb3b5d72071
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92593
diff
changeset
|
71 (defcustom calendar-after-frame-setup-hooks nil |
10088 | 72 "Hooks to be run just after setting up a calendar frame. |
92605
5fb3b5d72071
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92593
diff
changeset
|
73 Can be used to change frame parameters, such as font, color, location, etc." |
5fb3b5d72071
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92593
diff
changeset
|
74 :type 'hook |
5fb3b5d72071
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92593
diff
changeset
|
75 :group 'calendar-hooks) |
5fb3b5d72071
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92593
diff
changeset
|
76 |
5fb3b5d72071
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92593
diff
changeset
|
77 ;;; End of user options. |
5fb3b5d72071
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92593
diff
changeset
|
78 |
5fb3b5d72071
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92593
diff
changeset
|
79 (defvar calendar-frame nil |
93028
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
80 "Frame in which the calendar was last displayed.") |
92605
5fb3b5d72071
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92593
diff
changeset
|
81 |
5fb3b5d72071
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92593
diff
changeset
|
82 (defvar diary-frame nil |
93028
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
83 "Frame in which the diary was last displayed.") |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
84 |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
85 (defun calendar-frame-1 (frame) |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
86 "Subroutine used by `calendar-one-frame-setup' etc." |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
87 (run-hooks 'calendar-after-frame-setup-hooks) |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
88 (select-frame frame) |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
89 (if (eq 'icon (cdr (assoc 'visibility (frame-parameters frame)))) |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
90 (iconify-or-deiconify-frame))) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
37431
diff
changeset
|
91 |
86492
62e8353f2872
(make-fancy-diary-buffer): Declare as function.
Glenn Morris <rgm@gnu.org>
parents:
82140
diff
changeset
|
92 ;; calendar-basic-setup is called first, and will autoload diary-lib. |
62e8353f2872
(make-fancy-diary-buffer): Declare as function.
Glenn Morris <rgm@gnu.org>
parents:
82140
diff
changeset
|
93 (declare-function make-fancy-diary-buffer "diary-lib" nil) |
62e8353f2872
(make-fancy-diary-buffer): Declare as function.
Glenn Morris <rgm@gnu.org>
parents:
82140
diff
changeset
|
94 |
93028
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
95 (defun calendar-dedicate-diary () |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
96 "Dedicate the window associated with the diary buffer." |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
97 (set-window-dedicated-p |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
98 (display-buffer |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
99 (if (not (memq 'fancy-diary-display diary-display-hook)) |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
100 (get-file-buffer diary-file) |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
101 (or (buffer-live-p fancy-diary-buffer) |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
102 (make-fancy-diary-buffer)) |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
103 fancy-diary-buffer)) |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
104 t)) |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
105 |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
106 ;;; FIXME ../../src/emacs -Q --eval "(setq calendar-setup 'calendar-only)" -f calendar |
92839
2daf404f568f
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92821
diff
changeset
|
107 ;;;###cal-autoload |
93028
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
108 (defun calendar-one-frame-setup (&optional arg only) |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
109 "Start calendar and display it in a dedicated frame. |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
110 Also show the diary in that frame, unless ONLY is non-nil. The optional |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
111 argument ARG is passed to `calendar-basic-setup'. If the display |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
112 is not capable of multiple frames, `calendar-basic-setup' is all |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
113 that is used." |
37431
bd1a8b1c88d7
(calendar-two-frame-setup, calendar-only-one-frame-setup)
Eli Zaretskii <eliz@gnu.org>
parents:
24890
diff
changeset
|
114 (if (not (display-multi-frame-p)) |
10088 | 115 (calendar-basic-setup arg) |
116 (if (frame-live-p calendar-frame) (delete-frame calendar-frame)) | |
93028
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
117 (unless only |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
118 (if (frame-live-p diary-frame) (delete-frame diary-frame))) |
10088 | 119 (let ((special-display-buffer-names nil) |
93028
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
120 (view-diary-entries-initially (not only))) |
10088 | 121 (save-window-excursion |
122 (save-excursion | |
93028
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
123 (calendar-frame-1 |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
124 (setq calendar-frame |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
125 (make-frame (if only |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
126 calendar-frame-parameters |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
127 calendar-and-diary-frame-parameters)))) |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
128 (calendar-basic-setup arg) ; FIXME move? |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
129 ;; FIXME display-buffer? |
61142
1b5d0d3282a7
Update copyright and maintainer.
Glenn Morris <rgm@gnu.org>
parents:
53558
diff
changeset
|
130 (set-window-dedicated-p (selected-window) t) |
93028
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
131 (unless only (calendar-dedicate-diary))))))) |
12060
b163768a998f
Fix cal-x.el to create an empty fancy-diary-buffer, if needed.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12049
diff
changeset
|
132 |
92839
2daf404f568f
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92821
diff
changeset
|
133 ;;;###cal-autoload |
24890
5f37b93c8538
(calendar-only-one-frame-setup): New function.
Karl Heuer <kwzh@gnu.org>
parents:
24860
diff
changeset
|
134 (defun calendar-only-one-frame-setup (&optional arg) |
53558 | 135 "Start calendar and display it in a dedicated frame. |
93028
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
136 The optional argument ARG is passed to `calendar-basic-setup'. |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
137 If the display is not capable of multiple frames, `calendar-basic-setup' |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
138 is all that is used." |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
139 (calendar-one-frame-setup arg t)) |
24890
5f37b93c8538
(calendar-only-one-frame-setup): New function.
Karl Heuer <kwzh@gnu.org>
parents:
24860
diff
changeset
|
140 |
92839
2daf404f568f
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92821
diff
changeset
|
141 ;;;###cal-autoload |
10088 | 142 (defun calendar-two-frame-setup (&optional arg) |
53558 | 143 "Start calendar and diary in separate, dedicated frames. |
93028
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
144 The optional argument ARG is passed to `calendar-basic-setup'. |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
145 If the display is not capable of multiple frames, `calendar-basic-setup' |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
146 is all that is used." |
37431
bd1a8b1c88d7
(calendar-two-frame-setup, calendar-only-one-frame-setup)
Eli Zaretskii <eliz@gnu.org>
parents:
24890
diff
changeset
|
147 (if (not (display-multi-frame-p)) |
10088 | 148 (calendar-basic-setup arg) |
149 (if (frame-live-p calendar-frame) (delete-frame calendar-frame)) | |
150 (if (frame-live-p diary-frame) (delete-frame diary-frame)) | |
151 (let ((pop-up-windows nil) | |
152 (view-diary-entries-initially nil) | |
153 (special-display-buffer-names nil)) | |
154 (save-window-excursion | |
93028
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
155 ;; FIXME why does this do things in a slightly different order |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
156 ;; to calendar-one-frame-setup? |
10088 | 157 (save-excursion (calendar-basic-setup arg)) |
93028
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
158 (calendar-frame-1 |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
159 (setq calendar-frame (make-frame calendar-frame-parameters))) |
10088 | 160 (display-buffer calendar-buffer) |
61142
1b5d0d3282a7
Update copyright and maintainer.
Glenn Morris <rgm@gnu.org>
parents:
53558
diff
changeset
|
161 (set-window-dedicated-p (selected-window) t) |
93028
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
162 (calendar-frame-1 |
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
163 (setq diary-frame (make-frame diary-frame-parameters))) |
10088 | 164 (save-excursion (diary)) |
93028
531ac371602f
(diary-frame-parameters, calendar-frame-parameters)
Glenn Morris <rgm@gnu.org>
parents:
92857
diff
changeset
|
165 (calendar-dedicate-diary))))) |
10088 | 166 |
24860
069cad4a56ef
(special-display-buffer-names):
Karl Heuer <kwzh@gnu.org>
parents:
23552
diff
changeset
|
167 ;; Formerly (get-file-buffer diary-file) was added to the list here, |
069cad4a56ef
(special-display-buffer-names):
Karl Heuer <kwzh@gnu.org>
parents:
23552
diff
changeset
|
168 ;; but that isn't clean, and the value could even be nil. |
92821
d2480af27611
(calendar-only-one-frame-setup, calendar-two-frame-setup): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
92623
diff
changeset
|
169 ;; FIXME is this really our business? |
10088 | 170 (setq special-display-buffer-names |
171 (append special-display-buffer-names | |
92821
d2480af27611
(calendar-only-one-frame-setup, calendar-two-frame-setup): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
92623
diff
changeset
|
172 (list cal-hebrew-yahrzeit-buffer |
d2480af27611
(calendar-only-one-frame-setup, calendar-two-frame-setup): Doc fixes.
Glenn Morris <rgm@gnu.org>
parents:
92623
diff
changeset
|
173 lunar-phases-buffer holiday-buffer fancy-diary-buffer |
22262
ac47a12e523c
Fix list of "special" buffers.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
15114
diff
changeset
|
174 other-calendars-buffer calendar-buffer))) |
10088 | 175 |
176 (run-hooks 'cal-x-load-hook) | |
177 | |
178 (provide 'cal-x) | |
179 | |
82116
f8b17fd6cf74
Trivial comment style change.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
180 ;; arch-tag: c6dbddca-ae84-442d-87fc-244b76e38e17 |
10088 | 181 ;;; cal-x.el ends here |