Mercurial > emacs
annotate lisp/calendar/cal-menu.el @ 7620:f653a70687b6
entered into RCS
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 22 May 1994 09:22:25 +0000 |
parents | ca650a2739ba |
children | 44a712d8ba03 |
rev | line source |
---|---|
5701 | 1 ;;; cal-menu.el --- calendar functions for menu bar and popup menu support |
2 | |
3 ;; Copyright (C) 1994 Free Software Foundation, Inc. | |
4 | |
5 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> | |
6 ;; Lara Rios <lrios@coewl.cen.uiuc.edu> | |
7 ;; Keywords: calendar | |
8 ;; Human-Keywords: calendar, popup menus, menu bar | |
9 | |
10 ;; This file is part of GNU Emacs. | |
11 | |
6736
3e1323443b1a
Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents:
5701
diff
changeset
|
12 ;; 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
|
13 ;; 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
|
14 ;; 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
|
15 ;; any later version. |
5701 | 16 |
6736
3e1323443b1a
Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents:
5701
diff
changeset
|
17 ;; 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
|
18 ;; 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
|
19 ;; 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
|
20 ;; 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
|
21 |
3e1323443b1a
Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents:
5701
diff
changeset
|
22 ;; You should have received a copy of the GNU General Public License |
3e1323443b1a
Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents:
5701
diff
changeset
|
23 ;; along with GNU Emacs; see the file COPYING. If not, write to |
3e1323443b1a
Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents:
5701
diff
changeset
|
24 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
5701 | 25 |
26 ;;; Commentary: | |
27 | |
28 ;; This collection of functions implements menu bar and popup menu support for | |
29 ;; calendar.el. | |
30 | |
31 ;; Comments, corrections, and improvements should be sent to | |
32 ;; Edward M. Reingold Department of Computer Science | |
33 ;; (217) 333-6733 University of Illinois at Urbana-Champaign | |
34 ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | |
35 ;; Urbana, Illinois 61801 | |
36 | |
37 ;;; Code: | |
38 | |
7478
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
39 (define-key calendar-mode-map [down-mouse-2] 'calendar-mouse-2-date-menu) |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
40 |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
41 (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
|
42 (define-key calendar-mode-map [down-mouse-3] calendar-mouse-3-map) |
5701 | 43 |
44 (define-key calendar-mode-map [menu-bar moon] | |
45 '("Moon" . calendar-phases-of-moon)) | |
46 | |
47 (define-key calendar-mode-map [menu-bar diary] | |
48 (cons "Diary" (make-sparse-keymap "Diary"))) | |
49 | |
50 (define-key calendar-mode-map [menu-bar diary heb] | |
51 '("Insert Hebrew" . calendar-mouse-insert-hebrew-diary-entry)) | |
52 (define-key calendar-mode-map [menu-bar diary isl] | |
53 '("Insert Islamic" . calendar-mouse-insert-islamic-diary-entry)) | |
54 (define-key calendar-mode-map [menu-bar diary cyc] | |
55 '("Insert cyclic" . insert-cyclic-diary-entry)) | |
56 (define-key calendar-mode-map [menu-bar diary blk] | |
57 '("Insert block" . insert-block-diary-entry)) | |
58 (define-key calendar-mode-map [menu-bar diary ann] | |
59 '("Insert anniversary" . insert-anniversary-diary-entry)) | |
60 (define-key calendar-mode-map [menu-bar diary yr] | |
61 '("Insert yearly" . insert-yearly-diary-entry)) | |
62 (define-key calendar-mode-map [menu-bar diary mon] | |
63 '("Insert monthly" . insert-monthly-diary-entry)) | |
64 (define-key calendar-mode-map [menu-bar diary wk] | |
65 '("Insert weekly" . insert-weekly-diary-entry)) | |
66 (define-key calendar-mode-map [menu-bar diary ent] | |
67 '("Insert daily". insert-diary-entry)) | |
68 (define-key calendar-mode-map [menu-bar diary all] | |
69 '("Show all" . show-all-diary-entries)) | |
70 (define-key calendar-mode-map [menu-bar diary mark] | |
71 '("Mark all" . mark-diary-entries)) | |
72 (define-key calendar-mode-map [menu-bar diary view] | |
73 '("Cursor date" . view-diary-entries)) | |
74 | |
75 (define-key calendar-mode-map [menu-bar holidays] | |
76 (cons "Holidays" (make-sparse-keymap "Holidays"))) | |
77 | |
78 (define-key calendar-mode-map [menu-bar holidays unmark] | |
79 '("Unmark" . calendar-unmark)) | |
80 (define-key calendar-mode-map [menu-bar holidays mark] | |
81 '("Mark" . mark-calendar-holidays)) | |
82 (define-key calendar-mode-map [menu-bar holidays 3-mon] | |
83 '("3 months" . list-calendar-holidays)) | |
84 (define-key calendar-mode-map [menu-bar holidays 1-day] | |
85 '("One day" . calendar-cursor-holidays)) | |
86 | |
87 (define-key calendar-mode-map [menu-bar goto] | |
88 (cons "Goto" (make-sparse-keymap "Goto"))) | |
89 | |
90 (define-key calendar-mode-map [menu-bar goto french] | |
91 '("French date" . calendar-goto-french-date)) | |
92 (define-key calendar-mode-map [menu-bar goto mayan] | |
93 (cons "Mayan date" (make-sparse-keymap "Mayan"))) | |
94 (define-key calendar-mode-map [menu-bar goto julian] | |
95 '("Julian date" . calendar-goto-julian-date)) | |
96 (define-key calendar-mode-map [menu-bar goto islamic] | |
97 '("Islamic date" . calendar-goto-islamic-date)) | |
98 (define-key calendar-mode-map [menu-bar goto hebrew] | |
99 '("Hebrew date" . calendar-goto-hebrew-date)) | |
100 (define-key calendar-mode-map [menu-bar goto astro] | |
7576
ca650a2739ba
(calendar-mode-map): Use calendar-goto-astro-day-number.
Richard M. Stallman <rms@gnu.org>
parents:
7478
diff
changeset
|
101 '("Astronomical date" . calendar-goto-astro-day-number)) |
5701 | 102 (define-key calendar-mode-map [menu-bar goto iso] |
103 '("ISO date" . calendar-goto-iso-date)) | |
104 (define-key calendar-mode-map [menu-bar goto gregorian] | |
105 '("Other date" . calendar-goto-date)) | |
106 (define-key calendar-mode-map [menu-bar goto end-of-year] | |
107 '("End of year" . calendar-end-of-year)) | |
108 (define-key calendar-mode-map [menu-bar goto beginning-of-year] | |
109 '("Beginning of year" . calendar-beginning-of-year)) | |
110 (define-key calendar-mode-map [menu-bar goto end-of-month] | |
111 '("End of month" . calendar-end-of-month)) | |
112 (define-key calendar-mode-map [menu-bar goto beginning-of-month] | |
113 '("Beginning of month" . calendar-beginning-of-month)) | |
114 (define-key calendar-mode-map [menu-bar goto end-of-week] | |
115 '("End of week" . calendar-end-of-week)) | |
116 (define-key calendar-mode-map [menu-bar goto beginning-of-week] | |
117 '("Beginning of week" . calendar-beginning-of-week)) | |
118 (define-key calendar-mode-map [menu-bar goto today] | |
119 '("Today" . calendar-current-month)) | |
120 | |
121 | |
122 (define-key calendar-mode-map [menu-bar goto mayan prev-rnd] | |
123 '("Previous Round" . calendar-previous-calendar-round-date)) | |
124 (define-key calendar-mode-map [menu-bar goto mayan nxt-rnd] | |
125 '("Next Round" . calendar-next-calendar-round-date)) | |
126 (define-key calendar-mode-map [menu-bar goto mayan prev-haab] | |
127 '("Previous Haab" . calendar-previous-haab-date)) | |
128 (define-key calendar-mode-map [menu-bar goto mayan next-haab] | |
129 '("Next Haab" . calendar-next-haab-date)) | |
130 (define-key calendar-mode-map [menu-bar goto mayan prev-tzol] | |
131 '("Previous Tzolkin" . calendar-previous-tzolkin-date)) | |
132 (define-key calendar-mode-map [menu-bar goto mayan next-tzol] | |
133 '("Next Tzolkin" . calendar-next-tzolkin-date)) | |
134 | |
135 (define-key calendar-mode-map [menu-bar scroll] | |
136 (cons "Scroll" (make-sparse-keymap "Scroll"))) | |
137 | |
138 (define-key calendar-mode-map [menu-bar scroll bk-12] | |
139 '("Backward 1 Year" . "4\ev")) | |
140 (define-key calendar-mode-map [menu-bar scroll bk-3] | |
141 '("Backward 3 Months" . scroll-calendar-right-three-months)) | |
142 (define-key calendar-mode-map [menu-bar scroll bk-1] | |
143 '("Backward 1 Month" . scroll-calendar-right)) | |
144 (define-key calendar-mode-map [menu-bar scroll fwd-12] | |
145 '("Forward 1 Year" . "4\C-v")) | |
146 (define-key calendar-mode-map [menu-bar scroll fwd-3] | |
147 '("Forward 3 Months" . scroll-calendar-left-three-months)) | |
148 (define-key calendar-mode-map [menu-bar scroll fwd-1] | |
149 '("Forward 1 Month" . scroll-calendar-left)) | |
150 | |
151 (put 'calendar-forward-day 'menu-enable '(calendar-cursor-to-date)) | |
152 (put 'calendar-backward-day 'menu-enable '(calendar-cursor-to-date)) | |
153 (put 'calendar-forward-week 'menu-enable '(calendar-cursor-to-date)) | |
154 (put 'calendar-backward-week 'menu-enable '(calendar-cursor-to-date)) | |
155 (put 'calendar-forward-month 'menu-enable '(calendar-cursor-to-date)) | |
156 (put 'calendar-backward-month 'menu-enable '(calendar-cursor-to-date)) | |
157 (put 'calendar-forward-year 'menu-enable '(calendar-cursor-to-date)) | |
158 (put 'calendar-backward-year 'menu-enable '(calendar-cursor-to-date)) | |
159 (put 'calendar-beginning-of-year 'menu-enable '(calendar-cursor-to-date)) | |
160 (put 'calendar-end-of-year 'menu-enable '(calendar-cursor-to-date)) | |
161 (put 'calendar-beginning-of-month 'menu-enable '(calendar-cursor-to-date)) | |
162 (put 'calendar-end-of-month 'menu-enable '(calendar-cursor-to-date)) | |
163 (put 'calendar-end-of-week 'menu-enable '(calendar-cursor-to-date)) | |
164 (put 'calendar-beginning-of-week 'menu-enable '(calendar-cursor-to-date)) | |
165 (put 'calendar-mouse-print-dates 'menu-enable '(calendar-event-to-date)) | |
166 (put 'calendar-sunrise-sunset 'menu-enable '(calendar-event-to-date)) | |
167 (put 'calendar-cursor-holidays 'menu-enable '(calendar-cursor-to-date)) | |
168 (put 'view-diary-entries 'menu-enable '(calendar-cursor-to-date)) | |
169 (put 'calendar-mouse-insert-hebrew-diary-entry | |
170 'menu-enable | |
171 '(calendar-cursor-to-date)) | |
172 (put 'calendar-mouse-insert-islamic-diary-entry | |
173 'menu-enable | |
174 '(calendar-cursor-to-date)) | |
175 (put 'insert-cyclic-diary-entry 'menu-enable '(calendar-cursor-to-date)) | |
176 (put 'insert-block-diary-entry 'menu-enable '(calendar-cursor-to-date)) | |
177 (put 'insert-anniversary-diary-entry 'menu-enable '(calendar-cursor-to-date)) | |
178 (put 'insert-yearly-diary-entry 'menu-enable '(calendar-cursor-to-date)) | |
179 (put 'insert-monthly-diary-entry 'menu-enable '(calendar-cursor-to-date)) | |
180 (put 'insert-weekly-diary-entry 'menu-enable '(calendar-cursor-to-date)) | |
181 | |
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
|
182 (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
|
183 "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
|
184 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
|
185 ERROR is t, otherwise just returns nil." |
5701 | 186 (save-excursion |
187 (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
|
188 (calendar-cursor-to-date error))) |
5701 | 189 |
190 (defun calendar-mouse-insert-hebrew-diary-entry (event) | |
191 "Pop up menu to insert a Hebrew-date diary entry." | |
192 (interactive "e") | |
193 (let ((hebrew-selection | |
194 (x-popup-menu | |
195 event | |
196 (list "Hebrew insert menu" | |
197 (list (calendar-hebrew-date-string (calendar-cursor-to-date)) | |
198 '("One time" . insert-hebrew-diary-entry) | |
199 '("Monthly" . insert-monthly-hebrew-diary-entry) | |
200 '("Yearly" . insert-yearly-hebrew-diary-entry)))))) | |
201 (and hebrew-selection (call-interactively hebrew-selection)))) | |
202 | |
203 (defun calendar-mouse-insert-islamic-diary-entry (event) | |
204 "Pop up menu to insert an Islamic-date diary entry." | |
205 (interactive "e") | |
206 (let ((islamic-selection | |
207 (x-popup-menu | |
208 event | |
209 (list "Islamic insert menu" | |
210 (list (calendar-islamic-date-string (calendar-cursor-to-date)) | |
211 '("One time" . insert-islamic-diary-entry) | |
212 '("Monthly" . insert-monthly-islamic-diary-entry) | |
213 '("Yearly" . insert-yearly-islamic-diary-entry)))))) | |
214 (and islamic-selection (call-interactively islamic-selection)))) | |
215 | |
216 (defun calendar-mouse-sunrise/sunset () | |
217 "Show sunrise/sunset times for mouse-selected date." | |
218 (interactive) | |
219 (save-excursion | |
220 (calendar-goto-date (calendar-event-to-date)) | |
221 (calendar-sunrise-sunset))) | |
222 | |
223 (defun calendar-mouse-holidays () | |
224 "Show holidays for mouse-selected date." | |
225 (interactive) | |
226 (save-excursion | |
227 (calendar-goto-date (calendar-event-to-date)) | |
228 (calendar-cursor-holidays))) | |
229 | |
230 (defun calendar-mouse-view-diary-entries () | |
231 "View diary entries on mouse-selected date." | |
232 (interactive) | |
233 (save-excursion | |
234 (calendar-goto-date (calendar-event-to-date)) | |
235 (view-diary-entries 1))) | |
236 | |
7412
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
237 (defun calendar-mouse-set-mark () |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
238 "Mark the date under the cursor." |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
239 (interactive) |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
240 (save-excursion |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
241 (calendar-goto-date (calendar-event-to-date)) |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
242 (calendar-set-mark nil))) |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
243 |
5701 | 244 (defun calendar-mouse-print-dates () |
245 "Pop up menu of equivalent dates to mouse selected date." | |
246 (interactive) | |
247 (let ((date (calendar-event-to-date))) | |
248 (x-popup-menu | |
249 event | |
250 (list | |
251 "Date Menu" | |
252 (append | |
253 (list | |
254 (concat (calendar-date-string date) " (Gregorian)") | |
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
|
255 (list (calendar-day-of-year-string date)) |
5701 | 256 (list (format "ISO date: %s" (calendar-iso-date-string date))) |
257 (list (format "Julian date: %s" (calendar-julian-date-string date))) | |
258 (list (format "Astronomical (Julian) date (before noon): %s" | |
259 (calendar-astro-date-string date))) | |
260 (list (format "Hebrew date (before sunset): %s" | |
261 (calendar-hebrew-date-string date)))) | |
262 (let ((i (calendar-islamic-date-string date))) | |
263 (if (not (string-equal i "")) | |
7402
494ca99e9517
(calendar-mouse-print-dates): Add missing level of list
Richard M. Stallman <rms@gnu.org>
parents:
6736
diff
changeset
|
264 (list (list (format "Islamic date (before sunset): %s" i))))) |
5701 | 265 (let ((f (calendar-french-date-string date))) |
266 (if (not (string-equal f "")) | |
7402
494ca99e9517
(calendar-mouse-print-dates): Add missing level of list
Richard M. Stallman <rms@gnu.org>
parents:
6736
diff
changeset
|
267 (list (list (format "French Revolutionary date: %s" f))))) |
5701 | 268 (list |
7402
494ca99e9517
(calendar-mouse-print-dates): Add missing level of list
Richard M. Stallman <rms@gnu.org>
parents:
6736
diff
changeset
|
269 (list |
494ca99e9517
(calendar-mouse-print-dates): Add missing level of list
Richard M. Stallman <rms@gnu.org>
parents:
6736
diff
changeset
|
270 (format "Mayan date: %s" (calendar-mayan-date-string date))))))))) |
5701 | 271 |
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
|
272 (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
|
273 "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
|
274 (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
|
275 (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
|
276 (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
|
277 (x-popup-menu |
27fdaecd7cb1
(calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
7412
diff
changeset
|
278 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
|
279 (list "Menu" |
27fdaecd7cb1
(calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
7412
diff
changeset
|
280 (list |
27fdaecd7cb1
(calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
7412
diff
changeset
|
281 (calendar-date-string date t 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
|
282 '("Diary entries" . calendar-mouse-view-diary-entries) |
27fdaecd7cb1
(calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
7412
diff
changeset
|
283 '("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
|
284 '("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
|
285 '("Sunrise/sunset" . calendar-mouse-sunrise/sunset) |
27fdaecd7cb1
(calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
7412
diff
changeset
|
286 '("Other calendars" . calendar-mouse-print-dates)))))) |
27fdaecd7cb1
(calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
7412
diff
changeset
|
287 (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
|
288 |
7478
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
289 (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
|
290 '("Exit calendar" . exit-calendar)) |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
291 (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
|
292 '("Show diary" . show-all-diary-entries)) |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
293 (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
|
294 '("Lunar phases" . calendar-phases-of-moon)) |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
295 (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
|
296 '("Unmark" . calendar-unmark)) |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
297 (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
|
298 '("Mark holidays" . mark-calendar-holidays)) |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
299 (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
|
300 '("List holidays" . list-calendar-holidays)) |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
301 (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
|
302 '("Mark diary entries" . mark-diary-entries)) |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
303 (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
|
304 '("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
|
305 (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
|
306 '("Scroll forward" . scroll-calendar-left-three-months)) |
5701 | 307 |
308 (run-hooks 'cal-menu-load-hook) | |
309 | |
310 (provide 'cal-menu) | |
311 | |
312 ;;; cal-menu.el ends here |