annotate lisp/calendar/cal-menu.el @ 66185:21f14d2723e6

* bookmark.el (bookmark-insert-location, bookmark-bmenu-list) (bookmark-bmenu-hide-filenames): Add follow-link property.
author Romain Francoise <romain@orebokech.com>
date Tue, 18 Oct 2005 11:05:11 +0000
parents 5c09efcfc1d9
children ed95f221960d 5e2d3828e89f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 ;;; cal-menu.el --- calendar functions for menu bar and popup menu support
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2
60980
794bc6a34084 Update copyright.
Glenn Morris <rgm@gnu.org>
parents: 57325
diff changeset
3 ;; Copyright (C) 1994, 1995, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6 ;; Lara Rios <lrios@coewl.cen.uiuc.edu>
65919
5c09efcfc1d9 Update maintainer email address.
Glenn Morris <rgm@gnu.org>
parents: 65876
diff changeset
7 ;; Maintainer: Glenn Morris <rgm@gnu.org>
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8 ;; Keywords: calendar
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9 ;; Human-Keywords: calendar, popup menus, menu bar
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
11 ;; This file is part of GNU Emacs.
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12
6736
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
13 ;; GNU Emacs is free software; you can redistribute it and/or modify
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
14 ;; it under the terms of the GNU General Public License as published by
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
15 ;; the Free Software Foundation; either version 2, or (at your option)
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
16 ;; any later version.
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
17
6736
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
18 ;; GNU Emacs is distributed in the hope that it will be useful,
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
21 ;; GNU General Public License for more details.
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
22
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
23 ;; You should have received a copy of the GNU General Public License
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13876
diff changeset
24 ;; along with GNU Emacs; see the file COPYING. If not, write to the
64085
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62577
diff changeset
25 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62577
diff changeset
26 ;; Boston, MA 02110-1301, USA.
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28 ;;; Commentary:
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30 ;; This collection of functions implements menu bar and popup menu support for
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31 ;; calendar.el.
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33 ;; Comments, corrections, and improvements should be sent to
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
34 ;; Edward M. Reingold Department of Computer Science
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
35 ;; (217) 333-6733 University of Illinois at Urbana-Champaign
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
36 ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
37 ;; Urbana, Illinois 61801
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
38
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
39 ;;; Code:
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
40
65145
ac895e21e622 (date): Add defvar.
Juanma Barranquero <lekktu@gmail.com>
parents: 64085
diff changeset
41 (defvar date)
52116
3132ffb5a7ab (displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents: 50465
diff changeset
42 (defvar displayed-month)
3132ffb5a7ab (displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents: 50465
diff changeset
43 (defvar displayed-year)
65145
ac895e21e622 (date): Add defvar.
Juanma Barranquero <lekktu@gmail.com>
parents: 64085
diff changeset
44 (defvar event)
52116
3132ffb5a7ab (displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents: 50465
diff changeset
45
19950
947c67a81ec6 Require calendar only when compiling.
Richard M. Stallman <rms@gnu.org>
parents: 19892
diff changeset
46 (eval-when-compile (require 'calendar))
19892
b3d4cde6e4c3 Require calendar.el.
Richard M. Stallman <rms@gnu.org>
parents: 17667
diff changeset
47
9999
8187800943e7 Get rid of edit menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9766
diff changeset
48 (define-key calendar-mode-map [menu-bar edit] 'undefined)
13689
a04244ec8530 Repair function names from rms error in modifying!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13285
diff changeset
49 (define-key calendar-mode-map [menu-bar search] 'undefined)
9999
8187800943e7 Get rid of edit menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9766
diff changeset
50
7478
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
51 (define-key calendar-mode-map [down-mouse-2] 'calendar-mouse-2-date-menu)
7713
44a712d8ba03 (calendar-mode-map): Define mouse-2 as ignore.
Richard M. Stallman <rms@gnu.org>
parents: 7576
diff changeset
52 (define-key calendar-mode-map [mouse-2] 'ignore)
7478
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
53
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
54 (defvar calendar-mouse-3-map (make-sparse-keymap "Calendar"))
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
55 (define-key calendar-mode-map [down-mouse-3] calendar-mouse-3-map)
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
56
7887
a5e6f7045bc0 (calendar-mode-map): Change moon menu bar to pop up a menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7886
diff changeset
57 (define-key calendar-mode-map [menu-bar moon]
a5e6f7045bc0 (calendar-mode-map): Change moon menu bar to pop up a menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7886
diff changeset
58 (cons "Moon" (make-sparse-keymap "Moon")))
a5e6f7045bc0 (calendar-mode-map): Change moon menu bar to pop up a menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7886
diff changeset
59
a5e6f7045bc0 (calendar-mode-map): Change moon menu bar to pop up a menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7886
diff changeset
60 (define-key calendar-mode-map [menu-bar moon moon]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
61 '("Lunar Phases" . calendar-phases-of-moon))
7887
a5e6f7045bc0 (calendar-mode-map): Change moon menu bar to pop up a menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7886
diff changeset
62
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
63 (define-key calendar-mode-map [menu-bar diary]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
64 (cons "Diary" (make-sparse-keymap "Diary")))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
65
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
66 (define-key calendar-mode-map [menu-bar diary heb]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
67 '("Insert Hebrew" . calendar-mouse-insert-hebrew-diary-entry))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
68 (define-key calendar-mode-map [menu-bar diary isl]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
69 '("Insert Islamic" . calendar-mouse-insert-islamic-diary-entry))
55431
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
70 (define-key calendar-mode-map [menu-bar diary baha]
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
71 '("Insert Baha'i" . calendar-mouse-insert-bahai-diary-entry))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
72 (define-key calendar-mode-map [menu-bar diary cyc]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
73 '("Insert Cyclic" . insert-cyclic-diary-entry))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
74 (define-key calendar-mode-map [menu-bar diary blk]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
75 '("Insert Block" . insert-block-diary-entry))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
76 (define-key calendar-mode-map [menu-bar diary ann]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
77 '("Insert Anniversary" . insert-anniversary-diary-entry))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
78 (define-key calendar-mode-map [menu-bar diary yr]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
79 '("Insert Yearly" . insert-yearly-diary-entry))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
80 (define-key calendar-mode-map [menu-bar diary mon]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
81 '("Insert Monthly" . insert-monthly-diary-entry))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
82 (define-key calendar-mode-map [menu-bar diary wk]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
83 '("Insert Weekly" . insert-weekly-diary-entry))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
84 (define-key calendar-mode-map [menu-bar diary ent]
43195
b5177d0b2c9f (calendar-mode-map): Change the menu item's name to "Insert Diary Entry".
Eli Zaretskii <eliz@gnu.org>
parents: 39524
diff changeset
85 '("Insert Diary Entry" . insert-diary-entry))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
86 (define-key calendar-mode-map [menu-bar diary all]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
87 '("Show All" . show-all-diary-entries))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
88 (define-key calendar-mode-map [menu-bar diary mark]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
89 '("Mark All" . mark-diary-entries))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
90 (define-key calendar-mode-map [menu-bar diary view]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
91 '("Cursor Date" . view-diary-entries))
9766
71c37f31a02d Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9734
diff changeset
92 (define-key calendar-mode-map [menu-bar diary view]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
93 '("Other File" . view-other-diary-entries))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
94
22035
887dbe664b45 (calendar-mode-map): Rename `holidays' menu to `Holidays'.
Richard M. Stallman <rms@gnu.org>
parents: 22031
diff changeset
95 (define-key calendar-mode-map [menu-bar Holidays]
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
96 (cons "Holidays" (make-sparse-keymap "Holidays")))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
97
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
98 (define-key calendar-mode-map [menu-bar goto]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
99 (cons "Goto" (make-sparse-keymap "Goto")))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
100
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
101 (define-key calendar-mode-map [menu-bar goto french]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
102 '("French Date" . calendar-goto-french-date))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
103 (define-key calendar-mode-map [menu-bar goto mayan]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
104 (cons "Mayan Date" (make-sparse-keymap "Mayan")))
13047
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
105 (define-key calendar-mode-map [menu-bar goto ethiopic]
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
106 '("Ethiopic Date" . calendar-goto-ethiopic-date))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
107 (define-key calendar-mode-map [menu-bar goto coptic]
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
108 '("Coptic Date" . calendar-goto-coptic-date))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
109 (define-key calendar-mode-map [menu-bar goto chinese]
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
110 '("Chinese Date" . calendar-goto-chinese-date))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
111 (define-key calendar-mode-map [menu-bar goto julian]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
112 '("Julian Date" . calendar-goto-julian-date))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
113 (define-key calendar-mode-map [menu-bar goto islamic]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
114 '("Islamic Date" . calendar-goto-islamic-date))
14915
5a4b28f19b75 Add references to Persian calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 14169
diff changeset
115 (define-key calendar-mode-map [menu-bar goto persian]
55431
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
116 '("Baha'i Date" . calendar-goto-bahai-date))
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
117 (define-key calendar-mode-map [menu-bar goto persian]
14915
5a4b28f19b75 Add references to Persian calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 14169
diff changeset
118 '("Persian Date" . calendar-goto-persian-date))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
119 (define-key calendar-mode-map [menu-bar goto hebrew]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
120 '("Hebrew Date" . calendar-goto-hebrew-date))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
121 (define-key calendar-mode-map [menu-bar goto astro]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
122 '("Astronomical Date" . calendar-goto-astro-day-number))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
123 (define-key calendar-mode-map [menu-bar goto iso]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
124 '("ISO Date" . calendar-goto-iso-date))
57325
670acab99124 Update copyright and maintainer.
Glenn Morris <rgm@gnu.org>
parents: 55431
diff changeset
125 (define-key calendar-mode-map [menu-bar goto iso-week]
670acab99124 Update copyright and maintainer.
Glenn Morris <rgm@gnu.org>
parents: 55431
diff changeset
126 '("ISO Week" . calendar-goto-iso-week))
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
127 (define-key calendar-mode-map [menu-bar goto day-of-year]
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
128 '("Day of Year" . calendar-goto-day-of-year))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
129 (define-key calendar-mode-map [menu-bar goto gregorian]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
130 '("Other Date" . calendar-goto-date))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
131 (define-key calendar-mode-map [menu-bar goto end-of-year]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
132 '("End of Year" . calendar-end-of-year))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
133 (define-key calendar-mode-map [menu-bar goto beginning-of-year]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
134 '("Beginning of Year" . calendar-beginning-of-year))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
135 (define-key calendar-mode-map [menu-bar goto end-of-month]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
136 '("End of Month" . calendar-end-of-month))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
137 (define-key calendar-mode-map [menu-bar goto beginning-of-month]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
138 '("Beginning of Month" . calendar-beginning-of-month))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
139 (define-key calendar-mode-map [menu-bar goto end-of-week]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
140 '("End of Week" . calendar-end-of-week))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
141 (define-key calendar-mode-map [menu-bar goto beginning-of-week]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
142 '("Beginning of Week" . calendar-beginning-of-week))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
143 (define-key calendar-mode-map [menu-bar goto today]
8308
9c9cbb121c37 Change reference from renamed calendar-current-month to calendar-goto-today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7887
diff changeset
144 '("Today" . calendar-goto-today))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
145
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
146
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
147 (define-key calendar-mode-map [menu-bar goto mayan prev-rnd]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
148 '("Previous Round" . calendar-previous-calendar-round-date))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
149 (define-key calendar-mode-map [menu-bar goto mayan nxt-rnd]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
150 '("Next Round" . calendar-next-calendar-round-date))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
151 (define-key calendar-mode-map [menu-bar goto mayan prev-haab]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
152 '("Previous Haab" . calendar-previous-haab-date))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
153 (define-key calendar-mode-map [menu-bar goto mayan next-haab]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
154 '("Next Haab" . calendar-next-haab-date))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
155 (define-key calendar-mode-map [menu-bar goto mayan prev-tzol]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
156 '("Previous Tzolkin" . calendar-previous-tzolkin-date))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
157 (define-key calendar-mode-map [menu-bar goto mayan next-tzol]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
158 '("Next Tzolkin" . calendar-next-tzolkin-date))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
159
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
160 (define-key calendar-mode-map [menu-bar scroll]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
161 (cons "Scroll" (make-sparse-keymap "Scroll")))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
162
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
163 (define-key calendar-mode-map [menu-bar scroll bk-12]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
164 '("Backward 1 Year" . "4\ev"))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
165 (define-key calendar-mode-map [menu-bar scroll bk-3]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
166 '("Backward 3 Months" . scroll-calendar-right-three-months))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
167 (define-key calendar-mode-map [menu-bar scroll bk-1]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
168 '("Backward 1 Month" . scroll-calendar-right))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
169 (define-key calendar-mode-map [menu-bar scroll fwd-12]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
170 '("Forward 1 Year" . "4\C-v"))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
171 (define-key calendar-mode-map [menu-bar scroll fwd-3]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
172 '("Forward 3 Months" . scroll-calendar-left-three-months))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
173 (define-key calendar-mode-map [menu-bar scroll fwd-1]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
174 '("Forward 1 Month" . scroll-calendar-left))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
175
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
176 (defun calendar-flatten (list)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
177 "Flatten LIST eliminating sublists structure; result is a list of atoms.
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
178 This is the same as the preorder list of leaves in a rooted forest."
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
179 (if (atom list)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
180 (list list)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
181 (if (cdr list)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
182 (append (calendar-flatten (car list)) (calendar-flatten (cdr list)))
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
183 (calendar-flatten (car list)))))
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
184
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
185 (defun cal-menu-x-popup-menu (position menu)
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
186 "Like `x-popup-menu', but prints an error message if popup menus are
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
187 not available."
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
188 (if (display-popup-menus-p)
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
189 (x-popup-menu position menu)
45058
5413ef3a62a3 (cal-menu-x-popup-menu): Fix argument of error call.
Pavel Janík <Pavel@Janik.cz>
parents: 43195
diff changeset
190 (error "Popup menus are not available on this system")))
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
191
17667
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
192 (defun cal-menu-list-holidays-year ()
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
193 "Display a list of the holidays of the selected date's year."
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
194 (interactive)
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
195 (let ((year (extract-calendar-year (calendar-cursor-to-date))))
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
196 (list-holidays year year)))
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
197
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
198 (defun cal-menu-list-holidays-following-year ()
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
199 "Display a list of the holidays of the following year."
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
200 (interactive)
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
201 (let ((year (1+ (extract-calendar-year (calendar-cursor-to-date)))))
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
202 (list-holidays year year)))
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
203
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
204 (defun cal-menu-list-holidays-previous-year ()
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
205 "Display a list of the holidays of the previous year."
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
206 (interactive)
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
207 (let ((year (1- (extract-calendar-year (calendar-cursor-to-date)))))
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
208 (list-holidays year year)))
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
209
22027
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
210 (defun cal-menu-update ()
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
211 ;; Update the holiday part of calendar menu bar for the current display.
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
212 (condition-case nil
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
213 (if (eq major-mode 'calendar-mode)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
214 (let ((l))
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
215 (calendar-for-loop;; Show 11 years--5 before, 5 after year of
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
216 ;; middle month
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
217 i from (- displayed-year 5) to (+ displayed-year 5) do
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
218 (setq l (cons (vector (format "For Year %s" i)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
219 (list (list 'lambda 'nil '(interactive)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
220 (list 'list-holidays i i)))
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
221 t)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
222 l)))
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
223 (setq l (cons ["Mark Holidays" mark-calendar-holidays t]
22036
342138eae82d Add separators to Holidays menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22035
diff changeset
224 (cons ["Unmark Calendar" calendar-unmark t]
62577
ffc19ed45d7f (cal-menu-update): Add separator as a string so that tmm doesn't create
Eli Zaretskii <eliz@gnu.org>
parents: 60980
diff changeset
225 (cons "--" l))))
50465
6fc90e779714 (cal-menu-update): Use easy-menu-create-menu rather than easy-menu-change.
Richard M. Stallman <rms@gnu.org>
parents: 45058
diff changeset
226 (define-key calendar-mode-map [menu-bar Holidays]
6fc90e779714 (cal-menu-update): Use easy-menu-create-menu rather than easy-menu-change.
Richard M. Stallman <rms@gnu.org>
parents: 45058
diff changeset
227 (cons "Holidays" (easy-menu-create-menu "Holidays" (nreverse l))))
22365
042d83ae4200 Fix menu separators.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22036
diff changeset
228 (define-key calendar-mode-map [menu-bar Holidays separator]
22036
342138eae82d Add separators to Holidays menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22035
diff changeset
229 '("--"))
22035
887dbe664b45 (calendar-mode-map): Rename `holidays' menu to `Holidays'.
Richard M. Stallman <rms@gnu.org>
parents: 22031
diff changeset
230 (define-key calendar-mode-map [menu-bar Holidays today]
22031
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
231 `(,(format "For Today (%s)"
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
232 (calendar-date-string (calendar-current-date) t t))
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
233 . cal-menu-today-holidays))
22027
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
234 (let ((title
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
235 (let ((m1 displayed-month)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
236 (y1 displayed-year)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
237 (m2 displayed-month)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
238 (y2 displayed-year))
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
239 (increment-calendar-month m1 y1 -1)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
240 (increment-calendar-month m2 y2 1)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
241 (if (= y1 y2)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
242 (format "%s-%s, %d"
52116
3132ffb5a7ab (displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents: 50465
diff changeset
243 (calendar-month-name m1 'abbrev)
3132ffb5a7ab (displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents: 50465
diff changeset
244 (calendar-month-name m2 'abbrev)
22027
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
245 y2)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
246 (format "%s, %d-%s, %d"
52116
3132ffb5a7ab (displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents: 50465
diff changeset
247 (calendar-month-name m1 'abbrev)
22027
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
248 y1
52116
3132ffb5a7ab (displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents: 50465
diff changeset
249 (calendar-month-name m2 'abbrev)
22027
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
250 y2)))))
22035
887dbe664b45 (calendar-mode-map): Rename `holidays' menu to `Holidays'.
Richard M. Stallman <rms@gnu.org>
parents: 22031
diff changeset
251 (define-key calendar-mode-map [menu-bar Holidays 3-month]
887dbe664b45 (calendar-mode-map): Rename `holidays' menu to `Holidays'.
Richard M. Stallman <rms@gnu.org>
parents: 22031
diff changeset
252 `(,(format "For Window (%s)" title)
22027
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
253 . list-calendar-holidays)))
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
254 (let ((date (calendar-cursor-to-date)))
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
255 (if date
22035
887dbe664b45 (calendar-mode-map): Rename `holidays' menu to `Holidays'.
Richard M. Stallman <rms@gnu.org>
parents: 22031
diff changeset
256 (define-key calendar-mode-map [menu-bar Holidays 1-day]
23593
594ed104120c (cal-menu-update): Fix menu wording.
Karl Heuer <kwzh@gnu.org>
parents: 22414
diff changeset
257 `(,(format "For Cursor Date (%s)"
22027
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
258 (calendar-date-string date t t))
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
259 . calendar-cursor-holidays))))))
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
260 ;; Try to avoid entering infinite beep mode in case of errors.
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
261 (error (ding))))
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
262
7442
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
263 (defun calendar-event-to-date (&optional error)
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
264 "Date of last event.
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
265 If event is not on a specific date, signals an error if optional parameter
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
266 ERROR is t, otherwise just returns nil."
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
267 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
268 (set-buffer (window-buffer (posn-window (event-start last-input-event))))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
269 (goto-char (posn-point (event-start last-input-event)))
7442
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
270 (calendar-cursor-to-date error)))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
271
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
272 (defun calendar-mouse-insert-hebrew-diary-entry (event)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
273 "Pop up menu to insert a Hebrew-date diary entry."
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
274 (interactive "e")
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
275 (let ((hebrew-selection
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
276 (cal-menu-x-popup-menu
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
277 event
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
278 (list "Hebrew insert menu"
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
279 (list (calendar-hebrew-date-string (calendar-cursor-to-date))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
280 '("One time" . insert-hebrew-diary-entry)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
281 '("Monthly" . insert-monthly-hebrew-diary-entry)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
282 '("Yearly" . insert-yearly-hebrew-diary-entry))))))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
283 (and hebrew-selection (call-interactively hebrew-selection))))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
284
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
285 (defun calendar-mouse-insert-islamic-diary-entry (event)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
286 "Pop up menu to insert an Islamic-date diary entry."
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
287 (interactive "e")
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
288 (let ((islamic-selection
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
289 (cal-menu-x-popup-menu
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
290 event
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
291 (list "Islamic insert menu"
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
292 (list (calendar-islamic-date-string (calendar-cursor-to-date))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
293 '("One time" . insert-islamic-diary-entry)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
294 '("Monthly" . insert-monthly-islamic-diary-entry)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
295 '("Yearly" . insert-yearly-islamic-diary-entry))))))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
296 (and islamic-selection (call-interactively islamic-selection))))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
297
55431
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
298 (defun calendar-mouse-insert-bahai-diary-entry (event)
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
299 "Pop up menu to insert an Baha'i-date diary entry."
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
300 (interactive "e")
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
301 (let ((bahai-selection
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
302 (x-popup-menu
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
303 event
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
304 (list "Baha'i insert menu"
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
305 (list (calendar-bahai-date-string (calendar-cursor-to-date))
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
306 '("One time" . insert-bahai-diary-entry)
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
307 '("Monthly" . insert-monthly-bahai-diary-entry)
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
308 '("Yearly" . insert-yearly-bahai-diary-entry))))))
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
309 (and bahai-selection (call-interactively bahai-selection))))
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
310
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
311 (defun calendar-mouse-sunrise/sunset ()
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
312 "Show sunrise/sunset times for mouse-selected date."
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
313 (interactive)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
314 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
315 (calendar-mouse-goto-date (calendar-event-to-date))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
316 (calendar-sunrise-sunset)))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
317
22031
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
318 (defun cal-menu-today-holidays ()
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
319 "Show holidays for today's date."
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
320 (interactive)
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
321 (save-excursion
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
322 (calendar-cursor-to-date (calendar-current-date))
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
323 (calendar-cursor-holidays)))
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
324
65510
24f7082aa7af Don't require easymenu, since we don't use it.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65145
diff changeset
325 (autoload 'check-calendar-holidays "holidays")
24f7082aa7af Don't require easymenu, since we don't use it.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65145
diff changeset
326 (autoload 'diary-list-entries "diary-lib")
24f7082aa7af Don't require easymenu, since we don't use it.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65145
diff changeset
327
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
328 (defun calendar-mouse-holidays ()
22413
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
329 "Pop up menu of holidays for mouse selected date."
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
330 (interactive)
22413
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
331 (let* ((date (calendar-event-to-date))
65510
24f7082aa7af Don't require easymenu, since we don't use it.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65145
diff changeset
332 (l (mapcar 'list (check-calendar-holidays date)))
22413
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
333 (selection
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
334 (cal-menu-x-popup-menu
22413
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
335 event
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
336 (list
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
337 (format "Holidays for %s" (calendar-date-string date))
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
338 (append
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
339 (list (format "Holidays for %s" (calendar-date-string date)))
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
340 (if l l '("None")))))))
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
341 (and selection (call-interactively selection))))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
342
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
343 (defun calendar-mouse-view-diary-entries (&optional date diary)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
344 "Pop up menu of diary entries for mouse-selected date.
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
345 Use optional DATE and alternative file DIARY.
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
346
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
347 Any holidays are shown if `holidays-in-diary-buffer' is t."
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
348 (interactive)
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
349 (let* ((date (if date date (calendar-event-to-date)))
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
350 (diary-file (if diary diary diary-file))
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
351 (diary-list-include-blanks nil)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
352 (diary-display-hook 'ignore)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
353 (diary-entries
65510
24f7082aa7af Don't require easymenu, since we don't use it.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65145
diff changeset
354 (mapcar (lambda (x) (split-string (car (cdr x)) "\^M\\|\n"))
65876
33868a8b76d1 (calendar-mouse-view-diary-entries): Use the new arg to diary-list-entries.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65510
diff changeset
355 (diary-list-entries date 1 'list-only)))
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
356 (holidays (if holidays-in-diary-buffer
65510
24f7082aa7af Don't require easymenu, since we don't use it.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65145
diff changeset
357 (check-calendar-holidays date)))
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
358 (title (concat "Diary entries "
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
359 (if diary (format "from %s " diary) "")
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
360 "for "
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
361 (calendar-date-string date)))
22413
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
362 (selection
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
363 (cal-menu-x-popup-menu
22413
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
364 event
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
365 (list title
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
366 (append
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
367 (list title)
65510
24f7082aa7af Don't require easymenu, since we don't use it.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65145
diff changeset
368 (mapcar (lambda (x) (list (concat " " x))) holidays)
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
369 (if holidays
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
370 (list "--shadow-etched-in" "--shadow-etched-in"))
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
371 (if diary-entries
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
372 (mapcar 'list (calendar-flatten diary-entries))
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
373 '("None")))))))
22413
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
374 (and selection (call-interactively selection))))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
375
9766
71c37f31a02d Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9734
diff changeset
376 (defun calendar-mouse-view-other-diary-entries ()
22413
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
377 "Pop up menu of diary entries from alternative file on mouse-selected date."
9766
71c37f31a02d Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9734
diff changeset
378 (interactive)
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
379 (calendar-mouse-view-diary-entries
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
380 (calendar-event-to-date)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
381 (read-file-name "Enter diary file name: " default-directory nil t)))
9766
71c37f31a02d Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9734
diff changeset
382
9710
b5fb08fb2cb3 Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 8308
diff changeset
383 (defun calendar-mouse-insert-diary-entry ()
b5fb08fb2cb3 Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 8308
diff changeset
384 "Insert diary entry for mouse-selected date."
b5fb08fb2cb3 Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 8308
diff changeset
385 (interactive)
b5fb08fb2cb3 Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 8308
diff changeset
386 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
387 (calendar-mouse-goto-date (calendar-event-to-date))
9710
b5fb08fb2cb3 Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 8308
diff changeset
388 (insert-diary-entry nil)))
b5fb08fb2cb3 Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 8308
diff changeset
389
7412
f067e1a5ceb4 (calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7403
diff changeset
390 (defun calendar-mouse-set-mark ()
f067e1a5ceb4 (calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7403
diff changeset
391 "Mark the date under the cursor."
f067e1a5ceb4 (calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7403
diff changeset
392 (interactive)
f067e1a5ceb4 (calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7403
diff changeset
393 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
394 (calendar-mouse-goto-date (calendar-event-to-date))
7412
f067e1a5ceb4 (calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7403
diff changeset
395 (calendar-set-mark nil)))
f067e1a5ceb4 (calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7403
diff changeset
396
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
397 (defun cal-tex-mouse-day ()
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
398 "Make a buffer with LaTeX commands for the day mouse is on."
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
399 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
400 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
401 (calendar-mouse-goto-date (calendar-event-to-date))
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
402 (cal-tex-cursor-day nil)))
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
403
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
404 (defun cal-tex-mouse-week ()
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
405 "One page calendar for week indicated by cursor.
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
406 Holidays are included if `cal-tex-holidays' is t."
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
407 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
408 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
409 (calendar-mouse-goto-date (calendar-event-to-date))
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
410 (cal-tex-cursor-week nil)))
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
411
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
412 (defun cal-tex-mouse-week2 ()
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
413 "Make a buffer with LaTeX commands for the week cursor is on.
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
414 The printed output will be on two pages."
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
415 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
416 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
417 (calendar-mouse-goto-date (calendar-event-to-date))
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
418 (cal-tex-cursor-week2 nil)))
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
419
13689
a04244ec8530 Repair function names from rms error in modifying!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13285
diff changeset
420 (defun cal-tex-mouse-week-iso ()
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
421 "One page calendar for week indicated by cursor.
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
422 Holidays are included if `cal-tex-holidays' is t."
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
423 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
424 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
425 (calendar-mouse-goto-date (calendar-event-to-date))
13689
a04244ec8530 Repair function names from rms error in modifying!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13285
diff changeset
426 (cal-tex-cursor-week-iso nil)))
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
427
13689
a04244ec8530 Repair function names from rms error in modifying!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13285
diff changeset
428 (defun cal-tex-mouse-week-monday ()
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
429 "One page calendar for week indicated by cursor."
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
430 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
431 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
432 (calendar-mouse-goto-date (calendar-event-to-date))
13689
a04244ec8530 Repair function names from rms error in modifying!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13285
diff changeset
433 (cal-tex-cursor-week-monday nil)))
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
434
19975
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
435 (defun cal-tex-mouse-filofax-daily ()
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
436 "Day-per-page Filofax calendar for week indicated by cursor."
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
437 (interactive)
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
438 (save-excursion
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
439 (calendar-mouse-goto-date (calendar-event-to-date))
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
440 (cal-tex-cursor-filofax-daily nil)))
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
441
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
442 (defun cal-tex-mouse-filofax-2week ()
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
443 "One page Filofax calendar for week indicated by cursor."
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
444 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
445 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
446 (calendar-mouse-goto-date (calendar-event-to-date))
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
447 (cal-tex-cursor-filofax-2week nil)))
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
448
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
449 (defun cal-tex-mouse-filofax-week ()
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
450 "Two page Filofax calendar for week indicated by cursor."
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
451 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
452 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
453 (calendar-mouse-goto-date (calendar-event-to-date))
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
454 (cal-tex-cursor-filofax-week nil)))
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
455
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
456 (defun cal-tex-mouse-month ()
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
457 "Make a buffer with LaTeX commands for the month cursor is on.
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
458 Calendar is condensed onto one page."
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
459 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
460 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
461 (calendar-mouse-goto-date (calendar-event-to-date))
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
462 (cal-tex-cursor-month nil)))
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
463
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
464 (defun cal-tex-mouse-month-landscape ()
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
465 "Make a buffer with LaTeX commands for the month cursor is on.
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
466 The output is in landscape format, one month to a page."
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
467 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
468 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
469 (calendar-mouse-goto-date (calendar-event-to-date))
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
470 (cal-tex-cursor-month-landscape nil)))
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
471
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
472 (defun cal-tex-mouse-year ()
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
473 "Make a buffer with LaTeX commands for the year cursor is on."
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
474 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
475 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
476 (calendar-mouse-goto-date (calendar-event-to-date))
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
477 (cal-tex-cursor-year nil)))
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
478
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
479 (defun cal-tex-mouse-filofax-year ()
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
480 "Make a buffer with LaTeX commands for Filofax calendar of year cursor is on."
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
481 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
482 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
483 (calendar-mouse-goto-date (calendar-event-to-date))
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
484 (cal-tex-cursor-filofax-year nil)))
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
485
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
486 (defun cal-tex-mouse-year-landscape ()
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
487 "Make a buffer with LaTeX commands for the year cursor is on."
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
488 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
489 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
490 (calendar-mouse-goto-date (calendar-event-to-date))
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
491 (cal-tex-cursor-year-landscape nil)))
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
492
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
493 (defun calendar-mouse-print-dates ()
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
494 "Pop up menu of equivalent dates to mouse selected date."
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
495 (interactive)
13047
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
496 (let ((date (calendar-event-to-date))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
497 (selection
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
498 (cal-menu-x-popup-menu
13047
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
499 event
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
500 (list
13876
16decb4ae75f Put date on top of other-calendars menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13690
diff changeset
501 (concat (calendar-date-string date) " (Gregorian)")
13047
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
502 (append
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
503 (list
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
504 (concat (calendar-date-string date) " (Gregorian)")
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
505 (list (calendar-day-of-year-string date))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
506 (list (format "ISO date: %s" (calendar-iso-date-string date)))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
507 (list (format "Julian date: %s"
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
508 (calendar-julian-date-string date)))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
509 (list
15068
47ef84d3738d Spelling fix.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 14951
diff changeset
510 (format "Astronomical (Julian) day number (at noon UTC): %s.0"
13047
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
511 (calendar-astro-date-string date)))
20423
f2a0f6498003 Add fixed date (RD) to menu of other dates.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 19975
diff changeset
512 (list
20424
bfc68d8546f3 Minor repair of previous change.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20423
diff changeset
513 (format "Fixed (RD) date: %s"
20423
f2a0f6498003 Add fixed date (RD) to menu of other dates.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 19975
diff changeset
514 (calendar-absolute-from-gregorian date)))
13047
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
515 (list (format "Hebrew date (before sunset): %s"
14915
5a4b28f19b75 Add references to Persian calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 14169
diff changeset
516 (calendar-hebrew-date-string date)))
5a4b28f19b75 Add references to Persian calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 14169
diff changeset
517 (list (format "Persian date: %s"
55431
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
518 (calendar-persian-date-string date)))
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
519 (list (format "Baha'i date (before sunset): %s"
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
520 (calendar-bahai-date-string date))))
13047
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
521 (let ((i (calendar-islamic-date-string date)))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
522 (if (not (string-equal i ""))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
523 (list (list (format "Islamic date (before sunset): %s" i)))))
13285
7ccba52e1e3e Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13194
diff changeset
524 (list
7ccba52e1e3e Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13194
diff changeset
525 (list (format "Chinese date: %s"
7ccba52e1e3e Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13194
diff changeset
526 (calendar-chinese-date-string date))))
7ccba52e1e3e Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13194
diff changeset
527 ; (list '("Chinese date (select to echo Chinese date)"
7ccba52e1e3e Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13194
diff changeset
528 ; . calendar-mouse-chinese-date))
13047
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
529 (let ((c (calendar-coptic-date-string date)))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
530 (if (not (string-equal c ""))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
531 (list (list (format "Coptic date: %s" c)))))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
532 (let ((e (calendar-ethiopic-date-string date)))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
533 (if (not (string-equal e ""))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
534 (list (list (format "Ethiopic date: %s" e)))))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
535 (let ((f (calendar-french-date-string date)))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
536 (if (not (string-equal f ""))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
537 (list (list (format "French Revolutionary date: %s" f)))))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
538 (list
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
539 (list
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
540 (format "Mayan date: %s"
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
541 (calendar-mayan-date-string date)))))))))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
542 (and selection (call-interactively selection))))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
543
13063
30ee606ce331 Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13047
diff changeset
544 (defun calendar-mouse-chinese-date ()
30ee606ce331 Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13047
diff changeset
545 "Show Chinese equivalent for mouse-selected date."
30ee606ce331 Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13047
diff changeset
546 (interactive)
30ee606ce331 Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13047
diff changeset
547 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
548 (calendar-mouse-goto-date (calendar-event-to-date))
13063
30ee606ce331 Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13047
diff changeset
549 (calendar-print-chinese-date)))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
550
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
551 (defun calendar-mouse-goto-date (date)
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
552 (set-buffer (window-buffer (posn-window (event-start last-input-event))))
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
553 (calendar-goto-date date))
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
554
7442
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
555 (defun calendar-mouse-2-date-menu (event)
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
556 "Pop up menu for Mouse-2 for selected date in the calendar window."
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
557 (interactive "e")
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
558 (let* ((date (calendar-event-to-date t))
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
559 (selection
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
560 (cal-menu-x-popup-menu
7442
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
561 event
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
562 (list (calendar-date-string date t nil)
7442
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
563 (list
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
564 ""
7442
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
565 '("Holidays" . calendar-mouse-holidays)
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
566 '("Mark date" . calendar-mouse-set-mark)
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
567 '("Sunrise/sunset" . calendar-mouse-sunrise/sunset)
9766
71c37f31a02d Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9734
diff changeset
568 '("Other calendars" . calendar-mouse-print-dates)
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
569 '("Prepare LaTeX buffer" . calendar-mouse-cal-tex-menu)
9766
71c37f31a02d Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9734
diff changeset
570 '("Diary entries" . calendar-mouse-view-diary-entries)
71c37f31a02d Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9734
diff changeset
571 '("Insert diary entry" . calendar-mouse-insert-diary-entry)
71c37f31a02d Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9734
diff changeset
572 '("Other diary file entries"
71c37f31a02d Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9734
diff changeset
573 . calendar-mouse-view-other-diary-entries)
71c37f31a02d Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9734
diff changeset
574 )))))
7442
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
575 (and selection (call-interactively selection))))
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
576
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
577 (defun calendar-mouse-cal-tex-menu (event)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
578 "Pop up submenu for Mouse-2 for cal-tex commands for selected date in the calendar window."
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
579 (interactive "e")
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
580 (let* ((selection
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
581 (cal-menu-x-popup-menu
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
582 event
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
583 (list (calendar-date-string date t nil)
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
584 (list
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
585 ""
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
586 '("Daily (1 page)" . cal-tex-mouse-day)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
587 '("Weekly (1 page)" . cal-tex-mouse-week)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
588 '("Weekly (2 pages)" . cal-tex-mouse-week2)
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
589 '("Weekly (other style; 1 page)" . cal-tex-mouse-week-iso)
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
590 '("Weekly (yet another style; 1 page)" .
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
591 cal-tex-mouse-week-monday)
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
592 '("Monthly" . cal-tex-mouse-month)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
593 '("Monthly (landscape)" . cal-tex-mouse-month-landscape)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
594 '("Yearly" . cal-tex-mouse-year)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
595 '("Yearly (landscape)" . cal-tex-mouse-year-landscape)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
596 '("Filofax styles" . cal-tex-mouse-filofax)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
597 )))))
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
598 (and selection (call-interactively selection))))
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
599
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
600 (defun cal-tex-mouse-filofax (event)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
601 "Pop up sub-submenu for Mouse-2 for Filofax cal-tex commands for selected date."
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
602 (interactive "e")
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
603 (let* ((selection
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
604 (cal-menu-x-popup-menu
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
605 event
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
606 (list (calendar-date-string date t nil)
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
607 (list
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
608 ""
19975
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
609 '("Filofax Daily (one-day-per-page)" .
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
610 cal-tex-mouse-filofax-daily)
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
611 '("Filofax Weekly (2-weeks-at-a-glance)" .
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
612 cal-tex-mouse-filofax-2week)
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
613 '("Filofax Weekly (week-at-a-glance)" .
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
614 cal-tex-mouse-filofax-week)
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
615 '("Filofax Yearly" . cal-tex-mouse-filofax-year)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
616 )))))
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
617 (and selection (call-interactively selection))))
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
618
7478
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
619 (define-key calendar-mouse-3-map [exit-calendar]
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
620 '("Exit calendar" . exit-calendar))
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
621 (define-key calendar-mouse-3-map [show-diary]
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
622 '("Show diary" . show-all-diary-entries))
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
623 (define-key calendar-mouse-3-map [lunar-phases]
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
624 '("Lunar phases" . calendar-phases-of-moon))
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
625 (define-key calendar-mouse-3-map [unmark]
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
626 '("Unmark" . calendar-unmark))
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
627 (define-key calendar-mouse-3-map [mark-holidays]
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
628 '("Mark holidays" . mark-calendar-holidays))
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
629 (define-key calendar-mouse-3-map [list-holidays]
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
630 '("List holidays" . list-calendar-holidays))
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
631 (define-key calendar-mouse-3-map [mark-diary-entries]
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
632 '("Mark diary entries" . mark-diary-entries))
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
633 (define-key calendar-mouse-3-map [scroll-backward]
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
634 '("Scroll backward" . scroll-calendar-right-three-months))
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
635 (define-key calendar-mouse-3-map [scroll-forward]
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
636 '("Scroll forward" . scroll-calendar-left-three-months))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
637
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
638 (run-hooks 'cal-menu-load-hook)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
639
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
640 (provide 'cal-menu)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
641
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 52230
diff changeset
642 ;;; arch-tag: aa81cf73-ce89-48a4-97ec-9ef861e87fe9
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
643 ;;; cal-menu.el ends here