annotate lisp/calendar/cal-x.el @ 83080:d4d5e54871ff

Trivial cleanups to get rid of GCC warnings. src/fontset.c (Fset_fontset_font): Removed unused variables. src/fringe.c (Ffringe_bitmaps_at_pos): Ditto. src/xdisp.c (Flookup_image_map, note_mode_line_or_margin_highlight): Ditto. src/xterm.c (x_detect_focus_change, x_calc_absolute_position): Ditto. src/intervals.h (compare_string_intervals): New declaration. src/intervals.h (NULL_INTERVAL_P): Shut up GCC warnings by casting the left side of the comma expression to void. src/lisp.h (CHECK): Ditto. src/keyboard.c (modify_event_symbol): Shut up GCC warning about format template type mismatch. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-120
author Karoly Lorentey <lorentey@elte.hu>
date Fri, 19 Mar 2004 23:19:04 +0000
parents 2c8dcca3af26
children 1b5d0d3282a7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
2
13046
eafe26212f32 Moved stuff to calendar.el, as per RSM's request.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12060
diff changeset
3 ;; Copyright (C) 1994, 1995 Free Software Foundation, Inc.
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
4
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
5 ;; Author: Michael Kifer <kifer@cs.sunysb.edu>
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
6 ;; Edward M. Reingold <reingold@cs.uiuc.edu>
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
7 ;; Keywords: calendar
14269
af156af979be Fix doc strings at top of file.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 14169
diff changeset
8 ;; Human-Keywords: calendar, dedicated frames, X Window System
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
9
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
10 ;; This file is part of GNU Emacs.
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
11
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
15 ;; any later version.
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
16
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
17 ;; GNU Emacs is distributed in the hope that it will be useful,
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
20 ;; GNU General Public License for more details.
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
21
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13441
diff changeset
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13441
diff changeset
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13441
diff changeset
25 ;; Boston, MA 02111-1307, USA.
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
26
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
27 ;;; Commentary:
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
28
14269
af156af979be Fix doc strings at top of file.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 14169
diff changeset
29 ;; This collection of functions implements dedicated frames in X for
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
30 ;; calendar.el.
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
31
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
32 ;; Comments, corrections, and improvements should be sent to
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
33 ;; Edward M. Reingold Department of Computer Science
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
34 ;; (217) 333-6733 University of Illinois at Urbana-Champaign
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
35 ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
36 ;; Urbana, Illinois 61801
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
37
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
38 ;;; Code:
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
39
13441
3d2e58f4385f Require calendar.
Richard M. Stallman <rms@gnu.org>
parents: 13046
diff changeset
40 (require 'calendar)
3d2e58f4385f Require calendar.
Richard M. Stallman <rms@gnu.org>
parents: 13046
diff changeset
41
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
42 (defvar calendar-frame nil "Frame in which to display the calendar.")
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
43
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
44 (defvar diary-frame nil "Frame in which to display the diary.")
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 37431
diff changeset
45
15114
2151ff2428aa (diary-frame-parameters, calendar-frame-parameters)
Richard M. Stallman <rms@gnu.org>
parents: 14269
diff changeset
46 ;; This should not specify the font. That's up to the user.
2151ff2428aa (diary-frame-parameters, calendar-frame-parameters)
Richard M. Stallman <rms@gnu.org>
parents: 14269
diff changeset
47 ;; Certainly it should not specify auto-lower and auto-raise
2151ff2428aa (diary-frame-parameters, calendar-frame-parameters)
Richard M. Stallman <rms@gnu.org>
parents: 14269
diff changeset
48 ;; since most users won't like that.
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
49 (defvar diary-frame-parameters
23552
905aab3037e8 Add title parameters to frames.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22262
diff changeset
50 '((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
51 (unsplittable . t) (minibuffer . nil))
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
52 "Parameters of the diary frame, if the diary is in its own frame.
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
53 Location and color should be set in .Xdefaults.")
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 37431
diff changeset
54
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
55 (defvar calendar-frame-parameters
23552
905aab3037e8 Add title parameters to frames.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22262
diff changeset
56 '((name . "Calendar") (title . "Calendar") (minibuffer . nil)
905aab3037e8 Add title parameters to frames.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22262
diff changeset
57 (height . 10) (width . 80) (unsplittable . t) (vertical-scroll-bars . nil))
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
58 "Parameters of the calendar frame, if the calendar is in a separate frame.
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
59 Location and color should be set in .Xdefaults.")
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
60
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
61 (defvar calendar-and-diary-frame-parameters
23552
905aab3037e8 Add title parameters to frames.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22262
diff changeset
62 '((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
63 (minibuffer . nil))
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
64 "Parameters of the frame that displays both the calendar and the diary.
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
65 Location and color should be set in .Xdefaults.")
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 37431
diff changeset
66
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
67 (defvar calendar-after-frame-setup-hooks nil
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
68 "Hooks to be run just after setting up a calendar frame.
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
69 Can be used to change frame parameters, such as font, color, location, etc.")
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 37431
diff changeset
70
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
71 (defun calendar-one-frame-setup (&optional arg)
53558
2c8dcca3af26 (calendar-one-frame-setup)
Glenn Morris <rgm@gnu.org>
parents: 52401
diff changeset
72 "Start calendar and display it in a dedicated frame together with the diary.
2c8dcca3af26 (calendar-one-frame-setup)
Glenn Morris <rgm@gnu.org>
parents: 52401
diff changeset
73 This function requires a display capable of multiple frames, else
2c8dcca3af26 (calendar-one-frame-setup)
Glenn Morris <rgm@gnu.org>
parents: 52401
diff changeset
74 `calendar-basic-setup' is used instead."
37431
bd1a8b1c88d7 (calendar-two-frame-setup, calendar-only-one-frame-setup)
Eli Zaretskii <eliz@gnu.org>
parents: 24890
diff changeset
75 (if (not (display-multi-frame-p))
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
76 (calendar-basic-setup arg)
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
77 (if (frame-live-p calendar-frame) (delete-frame calendar-frame))
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
78 (if (frame-live-p diary-frame) (delete-frame diary-frame))
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
79 (let ((special-display-buffer-names nil)
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
80 (view-diary-entries-initially t))
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
81 (save-window-excursion
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
82 (save-excursion
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
83 (setq calendar-frame
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
84 (make-frame calendar-and-diary-frame-parameters))
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
85 (run-hooks 'calendar-after-frame-setup-hooks)
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
86 (select-frame calendar-frame)
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
87 (if (eq 'icon (cdr (assoc 'visibility
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
88 (frame-parameters calendar-frame))))
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
89 (iconify-or-deiconify-frame))
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
90 (calendar-basic-setup arg)
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
91 (set-window-dedicated-p (selected-window) 'calendar)
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
92 (set-window-dedicated-p
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
93 (display-buffer
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
94 (if (not (memq 'fancy-diary-display diary-display-hook))
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
95 (get-file-buffer diary-file)
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
96 (if (not (bufferp (get-buffer fancy-diary-buffer)))
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
97 (make-fancy-diary-buffer))
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
98 fancy-diary-buffer))
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
99 '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
100
24890
5f37b93c8538 (calendar-only-one-frame-setup): New function.
Karl Heuer <kwzh@gnu.org>
parents: 24860
diff changeset
101 (defun calendar-only-one-frame-setup (&optional arg)
53558
2c8dcca3af26 (calendar-one-frame-setup)
Glenn Morris <rgm@gnu.org>
parents: 52401
diff changeset
102 "Start calendar and display it in a dedicated frame.
2c8dcca3af26 (calendar-one-frame-setup)
Glenn Morris <rgm@gnu.org>
parents: 52401
diff changeset
103 This function requires a display capable of multiple frames, else
2c8dcca3af26 (calendar-one-frame-setup)
Glenn Morris <rgm@gnu.org>
parents: 52401
diff changeset
104 `calendar-basic-setup' is used instead."
37431
bd1a8b1c88d7 (calendar-two-frame-setup, calendar-only-one-frame-setup)
Eli Zaretskii <eliz@gnu.org>
parents: 24890
diff changeset
105 (if (not (display-multi-frame-p))
24890
5f37b93c8538 (calendar-only-one-frame-setup): New function.
Karl Heuer <kwzh@gnu.org>
parents: 24860
diff changeset
106 (calendar-basic-setup arg)
5f37b93c8538 (calendar-only-one-frame-setup): New function.
Karl Heuer <kwzh@gnu.org>
parents: 24860
diff changeset
107 (if (frame-live-p calendar-frame) (delete-frame calendar-frame))
5f37b93c8538 (calendar-only-one-frame-setup): New function.
Karl Heuer <kwzh@gnu.org>
parents: 24860
diff changeset
108 (let ((special-display-buffer-names nil)
5f37b93c8538 (calendar-only-one-frame-setup): New function.
Karl Heuer <kwzh@gnu.org>
parents: 24860
diff changeset
109 (view-diary-entries-initially nil))
5f37b93c8538 (calendar-only-one-frame-setup): New function.
Karl Heuer <kwzh@gnu.org>
parents: 24860
diff changeset
110 (save-window-excursion
5f37b93c8538 (calendar-only-one-frame-setup): New function.
Karl Heuer <kwzh@gnu.org>
parents: 24860
diff changeset
111 (save-excursion
5f37b93c8538 (calendar-only-one-frame-setup): New function.
Karl Heuer <kwzh@gnu.org>
parents: 24860
diff changeset
112 (setq calendar-frame
5f37b93c8538 (calendar-only-one-frame-setup): New function.
Karl Heuer <kwzh@gnu.org>
parents: 24860
diff changeset
113 (make-frame calendar-frame-parameters))
5f37b93c8538 (calendar-only-one-frame-setup): New function.
Karl Heuer <kwzh@gnu.org>
parents: 24860
diff changeset
114 (run-hooks 'calendar-after-frame-setup-hooks)
5f37b93c8538 (calendar-only-one-frame-setup): New function.
Karl Heuer <kwzh@gnu.org>
parents: 24860
diff changeset
115 (select-frame calendar-frame)
5f37b93c8538 (calendar-only-one-frame-setup): New function.
Karl Heuer <kwzh@gnu.org>
parents: 24860
diff changeset
116 (if (eq 'icon (cdr (assoc 'visibility
5f37b93c8538 (calendar-only-one-frame-setup): New function.
Karl Heuer <kwzh@gnu.org>
parents: 24860
diff changeset
117 (frame-parameters calendar-frame))))
5f37b93c8538 (calendar-only-one-frame-setup): New function.
Karl Heuer <kwzh@gnu.org>
parents: 24860
diff changeset
118 (iconify-or-deiconify-frame))
5f37b93c8538 (calendar-only-one-frame-setup): New function.
Karl Heuer <kwzh@gnu.org>
parents: 24860
diff changeset
119 (calendar-basic-setup arg)
5f37b93c8538 (calendar-only-one-frame-setup): New function.
Karl Heuer <kwzh@gnu.org>
parents: 24860
diff changeset
120 (set-window-dedicated-p (selected-window) 'calendar))))))
5f37b93c8538 (calendar-only-one-frame-setup): New function.
Karl Heuer <kwzh@gnu.org>
parents: 24860
diff changeset
121
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
122 (defun calendar-two-frame-setup (&optional arg)
53558
2c8dcca3af26 (calendar-one-frame-setup)
Glenn Morris <rgm@gnu.org>
parents: 52401
diff changeset
123 "Start calendar and diary in separate, dedicated frames.
2c8dcca3af26 (calendar-one-frame-setup)
Glenn Morris <rgm@gnu.org>
parents: 52401
diff changeset
124 This function requires a display capable of multiple frames, else
2c8dcca3af26 (calendar-one-frame-setup)
Glenn Morris <rgm@gnu.org>
parents: 52401
diff changeset
125 `calendar-basic-setup' is used instead."
37431
bd1a8b1c88d7 (calendar-two-frame-setup, calendar-only-one-frame-setup)
Eli Zaretskii <eliz@gnu.org>
parents: 24890
diff changeset
126 (if (not (display-multi-frame-p))
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
127 (calendar-basic-setup arg)
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
128 (if (frame-live-p calendar-frame) (delete-frame calendar-frame))
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
129 (if (frame-live-p diary-frame) (delete-frame diary-frame))
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
130 (let ((pop-up-windows nil)
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
131 (view-diary-entries-initially nil)
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
132 (special-display-buffer-names nil))
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
133 (save-window-excursion
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
134 (save-excursion (calendar-basic-setup arg))
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
135 (setq calendar-frame (make-frame calendar-frame-parameters))
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
136 (run-hooks 'calendar-after-frame-setup-hooks)
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
137 (select-frame calendar-frame)
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
138 (if (eq 'icon (cdr (assoc 'visibility
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
139 (frame-parameters calendar-frame))))
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
140 (iconify-or-deiconify-frame))
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
141 (display-buffer calendar-buffer)
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
142 (set-window-dedicated-p (selected-window) 'calendar)
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
143 (setq diary-frame (make-frame diary-frame-parameters))
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
144 (run-hooks 'calendar-after-frame-setup-hooks)
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
145 (select-frame diary-frame)
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
146 (if (eq 'icon (cdr (assoc 'visibility
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
147 (frame-parameters diary-frame))))
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
148 (iconify-or-deiconify-frame))
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
149 (save-excursion (diary))
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
150 (set-window-dedicated-p
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
151 (display-buffer
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
152 (if (not (memq 'fancy-diary-display diary-display-hook))
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
153 (get-file-buffer diary-file)
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
154 (if (not (bufferp (get-buffer fancy-diary-buffer)))
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
155 (make-fancy-diary-buffer))
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
156 fancy-diary-buffer))
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
157 'diary)))))
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
158
24860
069cad4a56ef (special-display-buffer-names):
Karl Heuer <kwzh@gnu.org>
parents: 23552
diff changeset
159 ;; 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
160 ;; but that isn't clean, and the value could even be nil.
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
161 (setq special-display-buffer-names
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
162 (append special-display-buffer-names
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
163 (list "*Yahrzeits*" lunar-phases-buffer holiday-buffer
24860
069cad4a56ef (special-display-buffer-names):
Karl Heuer <kwzh@gnu.org>
parents: 23552
diff changeset
164 fancy-diary-buffer
22262
ac47a12e523c Fix list of "special" buffers.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 15114
diff changeset
165 other-calendars-buffer calendar-buffer)))
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
166
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
167 (run-hooks 'cal-x-load-hook)
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
168
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
169 (provide 'cal-x)
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
170
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49598
diff changeset
171 ;;; arch-tag: c6dbddca-ae84-442d-87fc-244b76e38e17
10088
283559c9d0ad Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
172 ;;; cal-x.el ends here