]> code.delx.au - gnu-emacs/blob - lisp/calendar/cal-menu.el
(ps-print-preprint): Special handling if
[gnu-emacs] / lisp / calendar / cal-menu.el
1 ;;; cal-menu.el --- calendar functions for menu bar and popup menu support
2
3 ;; Copyright (C) 1994, 1995 Free Software Foundation, Inc.
4
5 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
6 ;; Lara Rios <lrios@coewl.cen.uiuc.edu>
7 ;; Keywords: calendar
8 ;; Human-Keywords: calendar, popup menus, menu bar
9
10 ;; This file is part of GNU Emacs.
11
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; any later version.
16
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
21
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 ;; Boston, MA 02111-1307, USA.
26
27 ;;; Commentary:
28
29 ;; This collection of functions implements menu bar and popup menu support for
30 ;; calendar.el.
31
32 ;; Comments, corrections, and improvements should be sent to
33 ;; Edward M. Reingold Department of Computer Science
34 ;; (217) 333-6733 University of Illinois at Urbana-Champaign
35 ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
36 ;; Urbana, Illinois 61801
37
38 ;;; Code:
39
40 (define-key calendar-mode-map [menu-bar edit] 'undefined)
41 (define-key calendar-mode-map [menu-bar search] 'undefined)
42
43 (define-key calendar-mode-map [down-mouse-2] 'calendar-mouse-2-date-menu)
44 (define-key calendar-mode-map [mouse-2] 'ignore)
45
46 (defvar calendar-mouse-3-map (make-sparse-keymap "Calendar"))
47 (define-key calendar-mode-map [down-mouse-3] calendar-mouse-3-map)
48 (define-key calendar-mode-map [C-down-mouse-3] calendar-mouse-3-map)
49
50 (define-key calendar-mode-map [menu-bar moon]
51 (cons "Moon" (make-sparse-keymap "Moon")))
52
53 (define-key calendar-mode-map [menu-bar moon moon]
54 '("Lunar Phases" . calendar-phases-of-moon))
55
56 (define-key calendar-mode-map [menu-bar diary]
57 (cons "Diary" (make-sparse-keymap "Diary")))
58
59 (define-key calendar-mode-map [menu-bar diary heb]
60 '("Insert Hebrew" . calendar-mouse-insert-hebrew-diary-entry))
61 (define-key calendar-mode-map [menu-bar diary isl]
62 '("Insert Islamic" . calendar-mouse-insert-islamic-diary-entry))
63 (define-key calendar-mode-map [menu-bar diary cyc]
64 '("Insert Cyclic" . insert-cyclic-diary-entry))
65 (define-key calendar-mode-map [menu-bar diary blk]
66 '("Insert Block" . insert-block-diary-entry))
67 (define-key calendar-mode-map [menu-bar diary ann]
68 '("Insert Anniversary" . insert-anniversary-diary-entry))
69 (define-key calendar-mode-map [menu-bar diary yr]
70 '("Insert Yearly" . insert-yearly-diary-entry))
71 (define-key calendar-mode-map [menu-bar diary mon]
72 '("Insert Monthly" . insert-monthly-diary-entry))
73 (define-key calendar-mode-map [menu-bar diary wk]
74 '("Insert Weekly" . insert-weekly-diary-entry))
75 (define-key calendar-mode-map [menu-bar diary ent]
76 '("Insert Daily". insert-diary-entry))
77 (define-key calendar-mode-map [menu-bar diary all]
78 '("Show All" . show-all-diary-entries))
79 (define-key calendar-mode-map [menu-bar diary mark]
80 '("Mark All" . mark-diary-entries))
81 (define-key calendar-mode-map [menu-bar diary view]
82 '("Cursor Date" . view-diary-entries))
83 (define-key calendar-mode-map [menu-bar diary view]
84 '("Other File" . view-other-diary-entries))
85
86 (define-key calendar-mode-map [menu-bar holidays]
87 (cons "Holidays" (make-sparse-keymap "Holidays")))
88
89 (define-key calendar-mode-map [menu-bar holidays unmark]
90 '("Unmark" . calendar-unmark))
91 (define-key calendar-mode-map [menu-bar holidays mark]
92 '("Mark" . mark-calendar-holidays))
93 (define-key calendar-mode-map [menu-bar holidays 3-mon]
94 '("3 Months" . list-calendar-holidays))
95 (define-key calendar-mode-map [menu-bar holidays 1-day]
96 '("One Day" . calendar-cursor-holidays))
97
98 (define-key calendar-mode-map [menu-bar goto]
99 (cons "Goto" (make-sparse-keymap "Goto")))
100
101 (define-key calendar-mode-map [menu-bar goto french]
102 '("French Date" . calendar-goto-french-date))
103 (define-key calendar-mode-map [menu-bar goto mayan]
104 (cons "Mayan Date" (make-sparse-keymap "Mayan")))
105 (define-key calendar-mode-map [menu-bar goto ethiopic]
106 '("Ethiopic Date" . calendar-goto-ethiopic-date))
107 (define-key calendar-mode-map [menu-bar goto coptic]
108 '("Coptic Date" . calendar-goto-coptic-date))
109 (define-key calendar-mode-map [menu-bar goto chinese]
110 '("Chinese Date" . calendar-goto-chinese-date))
111 (define-key calendar-mode-map [menu-bar goto julian]
112 '("Julian Date" . calendar-goto-julian-date))
113 (define-key calendar-mode-map [menu-bar goto islamic]
114 '("Islamic Date" . calendar-goto-islamic-date))
115 (define-key calendar-mode-map [menu-bar goto persian]
116 '("Persian Date" . calendar-goto-persian-date))
117 (define-key calendar-mode-map [menu-bar goto hebrew]
118 '("Hebrew Date" . calendar-goto-hebrew-date))
119 (define-key calendar-mode-map [menu-bar goto astro]
120 '("Astronomical Date" . calendar-goto-astro-day-number))
121 (define-key calendar-mode-map [menu-bar goto iso]
122 '("ISO Date" . calendar-goto-iso-date))
123 (define-key calendar-mode-map [menu-bar goto gregorian]
124 '("Other Date" . calendar-goto-date))
125 (define-key calendar-mode-map [menu-bar goto end-of-year]
126 '("End of Year" . calendar-end-of-year))
127 (define-key calendar-mode-map [menu-bar goto beginning-of-year]
128 '("Beginning of Year" . calendar-beginning-of-year))
129 (define-key calendar-mode-map [menu-bar goto end-of-month]
130 '("End of Month" . calendar-end-of-month))
131 (define-key calendar-mode-map [menu-bar goto beginning-of-month]
132 '("Beginning of Month" . calendar-beginning-of-month))
133 (define-key calendar-mode-map [menu-bar goto end-of-week]
134 '("End of Week" . calendar-end-of-week))
135 (define-key calendar-mode-map [menu-bar goto beginning-of-week]
136 '("Beginning of Week" . calendar-beginning-of-week))
137 (define-key calendar-mode-map [menu-bar goto today]
138 '("Today" . calendar-goto-today))
139
140
141 (define-key calendar-mode-map [menu-bar goto mayan prev-rnd]
142 '("Previous Round" . calendar-previous-calendar-round-date))
143 (define-key calendar-mode-map [menu-bar goto mayan nxt-rnd]
144 '("Next Round" . calendar-next-calendar-round-date))
145 (define-key calendar-mode-map [menu-bar goto mayan prev-haab]
146 '("Previous Haab" . calendar-previous-haab-date))
147 (define-key calendar-mode-map [menu-bar goto mayan next-haab]
148 '("Next Haab" . calendar-next-haab-date))
149 (define-key calendar-mode-map [menu-bar goto mayan prev-tzol]
150 '("Previous Tzolkin" . calendar-previous-tzolkin-date))
151 (define-key calendar-mode-map [menu-bar goto mayan next-tzol]
152 '("Next Tzolkin" . calendar-next-tzolkin-date))
153
154 (define-key calendar-mode-map [menu-bar scroll]
155 (cons "Scroll" (make-sparse-keymap "Scroll")))
156
157 (define-key calendar-mode-map [menu-bar scroll bk-12]
158 '("Backward 1 Year" . "4\ev"))
159 (define-key calendar-mode-map [menu-bar scroll bk-3]
160 '("Backward 3 Months" . scroll-calendar-right-three-months))
161 (define-key calendar-mode-map [menu-bar scroll bk-1]
162 '("Backward 1 Month" . scroll-calendar-right))
163 (define-key calendar-mode-map [menu-bar scroll fwd-12]
164 '("Forward 1 Year" . "4\C-v"))
165 (define-key calendar-mode-map [menu-bar scroll fwd-3]
166 '("Forward 3 Months" . scroll-calendar-left-three-months))
167 (define-key calendar-mode-map [menu-bar scroll fwd-1]
168 '("Forward 1 Month" . scroll-calendar-left))
169
170 (put 'calendar-forward-day 'menu-enable '(calendar-cursor-to-date))
171 (put 'calendar-backward-day 'menu-enable '(calendar-cursor-to-date))
172 (put 'calendar-forward-week 'menu-enable '(calendar-cursor-to-date))
173 (put 'calendar-backward-week 'menu-enable '(calendar-cursor-to-date))
174 (put 'calendar-forward-month 'menu-enable '(calendar-cursor-to-date))
175 (put 'calendar-backward-month 'menu-enable '(calendar-cursor-to-date))
176 (put 'calendar-forward-year 'menu-enable '(calendar-cursor-to-date))
177 (put 'calendar-backward-year 'menu-enable '(calendar-cursor-to-date))
178 (put 'calendar-beginning-of-year 'menu-enable '(calendar-cursor-to-date))
179 (put 'calendar-end-of-year 'menu-enable '(calendar-cursor-to-date))
180 (put 'calendar-beginning-of-month 'menu-enable '(calendar-cursor-to-date))
181 (put 'calendar-end-of-month 'menu-enable '(calendar-cursor-to-date))
182 (put 'calendar-end-of-week 'menu-enable '(calendar-cursor-to-date))
183 (put 'calendar-beginning-of-week 'menu-enable '(calendar-cursor-to-date))
184 (put 'calendar-mouse-print-dates 'menu-enable '(calendar-event-to-date))
185 (put 'calendar-sunrise-sunset 'menu-enable '(calendar-event-to-date))
186 (put 'calendar-cursor-holidays 'menu-enable '(calendar-cursor-to-date))
187 (put 'view-diary-entries 'menu-enable '(calendar-cursor-to-date))
188 (put 'view-other-diary-entries 'menu-enable '(calendar-cursor-to-date))
189 (put 'calendar-mouse-insert-hebrew-diary-entry
190 'menu-enable
191 '(calendar-cursor-to-date))
192 (put 'calendar-mouse-insert-islamic-diary-entry
193 'menu-enable
194 '(calendar-cursor-to-date))
195 (put 'insert-cyclic-diary-entry 'menu-enable '(calendar-cursor-to-date))
196 (put 'insert-block-diary-entry 'menu-enable '(calendar-cursor-to-date))
197 (put 'insert-anniversary-diary-entry 'menu-enable '(calendar-cursor-to-date))
198 (put 'insert-yearly-diary-entry 'menu-enable '(calendar-cursor-to-date))
199 (put 'insert-monthly-diary-entry 'menu-enable '(calendar-cursor-to-date))
200 (put 'insert-weekly-diary-entry 'menu-enable '(calendar-cursor-to-date))
201 (put 'cal-tex-cursor-day 'menu-enable '(calendar-cursor-to-date))
202 (put 'cal-tex-cursor-week 'menu-enable '(calendar-cursor-to-date))
203 (put 'cal-tex-cursor-week2 'menu-enable '(calendar-cursor-to-date))
204 (put 'cal-tex-cursor-week-iso 'menu-enable '(calendar-cursor-to-date))
205 (put 'cal-tex-cursor-week-monday 'menu-enable '(calendar-cursor-to-date))
206 (put 'cal-tex-cursor-filofax-2week
207 'menu-enable '(calendar-cursor-to-date))
208 (put 'cal-tex-cursor-filofax-week 'menu-enable '(calendar-cursor-to-date))
209 (put 'cal-tex-cursor-month 'menu-enable '(calendar-cursor-to-date))
210 (put 'cal-tex-cursor-month-landscape 'menu-enable '(calendar-cursor-to-date))
211 (put 'cal-tex-cursor-year 'menu-enable '(calendar-cursor-to-date))
212 (put 'cal-tex-cursor-filofax-year 'menu-enable '(calendar-cursor-to-date))
213 (put 'cal-tex-cursor-year-landscape 'menu-enable '(calendar-cursor-to-date))
214
215 (defun calendar-event-to-date (&optional error)
216 "Date of last event.
217 If event is not on a specific date, signals an error if optional parameter
218 ERROR is t, otherwise just returns nil."
219 (save-excursion
220 (set-buffer (window-buffer (posn-window (event-start last-input-event))))
221 (goto-char (posn-point (event-start last-input-event)))
222 (calendar-cursor-to-date error)))
223
224 (defun calendar-mouse-insert-hebrew-diary-entry (event)
225 "Pop up menu to insert a Hebrew-date diary entry."
226 (interactive "e")
227 (let ((hebrew-selection
228 (x-popup-menu
229 event
230 (list "Hebrew insert menu"
231 (list (calendar-hebrew-date-string (calendar-cursor-to-date))
232 '("One time" . insert-hebrew-diary-entry)
233 '("Monthly" . insert-monthly-hebrew-diary-entry)
234 '("Yearly" . insert-yearly-hebrew-diary-entry))))))
235 (and hebrew-selection (call-interactively hebrew-selection))))
236
237 (defun calendar-mouse-insert-islamic-diary-entry (event)
238 "Pop up menu to insert an Islamic-date diary entry."
239 (interactive "e")
240 (let ((islamic-selection
241 (x-popup-menu
242 event
243 (list "Islamic insert menu"
244 (list (calendar-islamic-date-string (calendar-cursor-to-date))
245 '("One time" . insert-islamic-diary-entry)
246 '("Monthly" . insert-monthly-islamic-diary-entry)
247 '("Yearly" . insert-yearly-islamic-diary-entry))))))
248 (and islamic-selection (call-interactively islamic-selection))))
249
250 (defun calendar-mouse-sunrise/sunset ()
251 "Show sunrise/sunset times for mouse-selected date."
252 (interactive)
253 (save-excursion
254 (calendar-mouse-goto-date (calendar-event-to-date))
255 (calendar-sunrise-sunset)))
256
257 (defun calendar-mouse-holidays ()
258 "Show holidays for mouse-selected date."
259 (interactive)
260 (save-excursion
261 (calendar-mouse-goto-date (calendar-event-to-date))
262 (calendar-cursor-holidays)))
263
264 (defun calendar-mouse-view-diary-entries ()
265 "View diary entries on mouse-selected date."
266 (interactive)
267 (save-excursion
268 (calendar-mouse-goto-date (calendar-event-to-date))
269 (view-diary-entries 1)))
270
271 (defun calendar-mouse-view-other-diary-entries ()
272 "View diary entries from alternative file on mouse-selected date."
273 (interactive)
274 (save-excursion
275 (calendar-mouse-goto-date (calendar-event-to-date))
276 (call-interactively 'view-other-diary-entries)))
277
278 (defun calendar-mouse-insert-diary-entry ()
279 "Insert diary entry for mouse-selected date."
280 (interactive)
281 (save-excursion
282 (calendar-mouse-goto-date (calendar-event-to-date))
283 (insert-diary-entry nil)))
284
285 (defun calendar-mouse-set-mark ()
286 "Mark the date under the cursor."
287 (interactive)
288 (save-excursion
289 (calendar-mouse-goto-date (calendar-event-to-date))
290 (calendar-set-mark nil)))
291
292 (defun cal-tex-mouse-day ()
293 "Make a buffer with LaTeX commands for the day mouse is on."
294 (interactive)
295 (save-excursion
296 (calendar-mouse-goto-date (calendar-event-to-date))
297 (cal-tex-cursor-day nil)))
298
299 (defun cal-tex-mouse-week ()
300 "One page calendar for week indicated by cursor.
301 Holidays are included if `cal-tex-holidays' is t."
302 (interactive)
303 (save-excursion
304 (calendar-mouse-goto-date (calendar-event-to-date))
305 (cal-tex-cursor-week nil)))
306
307 (defun cal-tex-mouse-week2 ()
308 "Make a buffer with LaTeX commands for the week cursor is on.
309 The printed output will be on two pages."
310 (interactive)
311 (save-excursion
312 (calendar-mouse-goto-date (calendar-event-to-date))
313 (cal-tex-cursor-week2 nil)))
314
315 (defun cal-tex-mouse-week-iso ()
316 "One page calendar for week indicated by cursor.
317 Holidays are included if `cal-tex-holidays' is t."
318 (interactive)
319 (save-excursion
320 (calendar-mouse-goto-date (calendar-event-to-date))
321 (cal-tex-cursor-week-iso nil)))
322
323 (defun cal-tex-mouse-week-monday ()
324 "One page calendar for week indicated by cursor."
325 (interactive)
326 (save-excursion
327 (calendar-mouse-goto-date (calendar-event-to-date))
328 (cal-tex-cursor-week-monday nil)))
329
330 (defun cal-tex-mouse-filofax-2week ()
331 "One page Filofax calendar for week indicated by cursor."
332 (interactive)
333 (save-excursion
334 (calendar-mouse-goto-date (calendar-event-to-date))
335 (cal-tex-cursor-filofax-2week nil)))
336
337 (defun cal-tex-mouse-filofax-week ()
338 "Two page Filofax calendar for week indicated by cursor."
339 (interactive)
340 (save-excursion
341 (calendar-mouse-goto-date (calendar-event-to-date))
342 (cal-tex-cursor-filofax-week nil)))
343
344 (defun cal-tex-mouse-month ()
345 "Make a buffer with LaTeX commands for the month cursor is on.
346 Calendar is condensed onto one page."
347 (interactive)
348 (save-excursion
349 (calendar-mouse-goto-date (calendar-event-to-date))
350 (cal-tex-cursor-month nil)))
351
352 (defun cal-tex-mouse-month-landscape ()
353 "Make a buffer with LaTeX commands for the month cursor is on.
354 The output is in landscape format, one month to a page."
355 (interactive)
356 (save-excursion
357 (calendar-mouse-goto-date (calendar-event-to-date))
358 (cal-tex-cursor-month-landscape nil)))
359
360 (defun cal-tex-mouse-year ()
361 "Make a buffer with LaTeX commands for the year cursor is on."
362 (interactive)
363 (save-excursion
364 (calendar-mouse-goto-date (calendar-event-to-date))
365 (cal-tex-cursor-year nil)))
366
367 (defun cal-tex-mouse-filofax-year ()
368 "Make a buffer with LaTeX commands for Filofax calendar of year cursor is on."
369 (interactive)
370 (save-excursion
371 (calendar-mouse-goto-date (calendar-event-to-date))
372 (cal-tex-cursor-filofax-year nil)))
373
374 (defun cal-tex-mouse-year-landscape ()
375 "Make a buffer with LaTeX commands for the year cursor is on."
376 (interactive)
377 (save-excursion
378 (calendar-mouse-goto-date (calendar-event-to-date))
379 (cal-tex-cursor-year-landscape nil)))
380
381 (defun calendar-mouse-print-dates ()
382 "Pop up menu of equivalent dates to mouse selected date."
383 (interactive)
384 (let ((date (calendar-event-to-date))
385 (selection
386 (x-popup-menu
387 event
388 (list
389 (concat (calendar-date-string date) " (Gregorian)")
390 (append
391 (list
392 (concat (calendar-date-string date) " (Gregorian)")
393 (list (calendar-day-of-year-string date))
394 (list (format "ISO date: %s" (calendar-iso-date-string date)))
395 (list (format "Julian date: %s"
396 (calendar-julian-date-string date)))
397 (list
398 (format "Astronomical (Julian) day number (at noon UTC): %s.0"
399 (calendar-astro-date-string date)))
400 (list (format "Hebrew date (before sunset): %s"
401 (calendar-hebrew-date-string date)))
402 (list (format "Persian date: %s"
403 (calendar-persian-date-string date))))
404 (let ((i (calendar-islamic-date-string date)))
405 (if (not (string-equal i ""))
406 (list (list (format "Islamic date (before sunset): %s" i)))))
407 (list
408 (list (format "Chinese date: %s"
409 (calendar-chinese-date-string date))))
410 ; (list '("Chinese date (select to echo Chinese date)"
411 ; . calendar-mouse-chinese-date))
412 (let ((c (calendar-coptic-date-string date)))
413 (if (not (string-equal c ""))
414 (list (list (format "Coptic date: %s" c)))))
415 (let ((e (calendar-ethiopic-date-string date)))
416 (if (not (string-equal e ""))
417 (list (list (format "Ethiopic date: %s" e)))))
418 (let ((f (calendar-french-date-string date)))
419 (if (not (string-equal f ""))
420 (list (list (format "French Revolutionary date: %s" f)))))
421 (list
422 (list
423 (format "Mayan date: %s"
424 (calendar-mayan-date-string date)))))))))
425 (and selection (call-interactively selection))))
426
427 (defun calendar-mouse-chinese-date ()
428 "Show Chinese equivalent for mouse-selected date."
429 (interactive)
430 (save-excursion
431 (calendar-mouse-goto-date (calendar-event-to-date))
432 (calendar-print-chinese-date)))
433
434 (defun calendar-mouse-goto-date (date)
435 (set-buffer (window-buffer (posn-window (event-start last-input-event))))
436 (calendar-goto-date date))
437
438 (defun calendar-mouse-2-date-menu (event)
439 "Pop up menu for Mouse-2 for selected date in the calendar window."
440 (interactive "e")
441 (let* ((date (calendar-event-to-date t))
442 (selection
443 (x-popup-menu
444 event
445 (list (calendar-date-string date t nil)
446 (list
447 ""
448 '("Holidays" . calendar-mouse-holidays)
449 '("Mark date" . calendar-mouse-set-mark)
450 '("Sunrise/sunset" . calendar-mouse-sunrise/sunset)
451 '("Other calendars" . calendar-mouse-print-dates)
452 '("Prepare LaTeX buffer" . calendar-mouse-cal-tex-menu)
453 '("Diary entries" . calendar-mouse-view-diary-entries)
454 '("Insert diary entry" . calendar-mouse-insert-diary-entry)
455 '("Other diary file entries"
456 . calendar-mouse-view-other-diary-entries)
457 )))))
458 (and selection (call-interactively selection))))
459
460 (defun calendar-mouse-cal-tex-menu (event)
461 "Pop up submenu for Mouse-2 for cal-tex commands for selected date in the calendar window."
462 (interactive "e")
463 (let* ((selection
464 (x-popup-menu
465 event
466 (list (calendar-date-string date t nil)
467 (list
468 ""
469 '("Daily (1 page)" . cal-tex-mouse-day)
470 '("Weekly (1 page)" . cal-tex-mouse-week)
471 '("Weekly (2 pages)" . cal-tex-mouse-week2)
472 '("Weekly (other style; 1 page)" . cal-tex-mouse-week-iso)
473 '("Weekly (yet another style; 1 page)" .
474 cal-tex-mouse-week-monday)
475 '("Monthly" . cal-tex-mouse-month)
476 '("Monthly (landscape)" . cal-tex-mouse-month-landscape)
477 '("Yearly" . cal-tex-mouse-year)
478 '("Yearly (landscape)" . cal-tex-mouse-year-landscape)
479 '("Filofax styles" . cal-tex-mouse-filofax)
480 )))))
481 (and selection (call-interactively selection))))
482
483 (defun cal-tex-mouse-filofax (event)
484 "Pop up sub-submenu for Mouse-2 for Filofax cal-tex commands for selected date."
485 (interactive "e")
486 (let* ((selection
487 (x-popup-menu
488 event
489 (list (calendar-date-string date t nil)
490 (list
491 ""
492 '("Filofax Weekly (2-weeks-at-a-glance)" .
493 cal-tex-mouse-filofax-2week)
494 '("Filofax Weekly (week-at-a-glance)" .
495 cal-tex-mouse-filofax-week)
496 '("Filofax Yearly" . cal-tex-mouse-filofax-year)
497 )))))
498 (and selection (call-interactively selection))))
499
500 (define-key calendar-mouse-3-map [exit-calendar]
501 '("Exit calendar" . exit-calendar))
502 (define-key calendar-mouse-3-map [show-diary]
503 '("Show diary" . show-all-diary-entries))
504 (define-key calendar-mouse-3-map [lunar-phases]
505 '("Lunar phases" . calendar-phases-of-moon))
506 (define-key calendar-mouse-3-map [unmark]
507 '("Unmark" . calendar-unmark))
508 (define-key calendar-mouse-3-map [mark-holidays]
509 '("Mark holidays" . mark-calendar-holidays))
510 (define-key calendar-mouse-3-map [list-holidays]
511 '("List holidays" . list-calendar-holidays))
512 (define-key calendar-mouse-3-map [mark-diary-entries]
513 '("Mark diary entries" . mark-diary-entries))
514 (define-key calendar-mouse-3-map [scroll-backward]
515 '("Scroll backward" . scroll-calendar-right-three-months))
516 (define-key calendar-mouse-3-map [scroll-forward]
517 '("Scroll forward" . scroll-calendar-left-three-months))
518
519 (run-hooks 'cal-menu-load-hook)
520
521 (provide 'cal-menu)
522
523 ;;; cal-menu.el ends here