Mercurial > emacs
annotate lisp/calendar/cal-menu.el @ 13573:6fff4a5fc018
(calendar-julian-date-string): Autoload this.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 17 Nov 1995 17:01:55 +0000 |
parents | 7ccba52e1e3e |
children | a04244ec8530 |
rev | line source |
---|---|
5701 | 1 ;;; cal-menu.el --- calendar functions for menu bar and popup menu support |
2 | |
13047
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
3 ;; Copyright (C) 1994, 1995 Free Software Foundation, Inc. |
5701 | 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 | |
9999
8187800943e7
Get rid of edit menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9766
diff
changeset
|
39 (define-key calendar-mode-map [menu-bar edit] 'undefined) |
8187800943e7
Get rid of edit menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9766
diff
changeset
|
40 |
7478
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
41 (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
|
42 (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
|
43 |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
44 (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
|
45 (define-key calendar-mode-map [down-mouse-3] calendar-mouse-3-map) |
9734
051c27bcbc22
(calendar-mode-map): Define c-down-mouse-3 like down-mouse-3.
Richard M. Stallman <rms@gnu.org>
parents:
9710
diff
changeset
|
46 (define-key calendar-mode-map [C-down-mouse-3] calendar-mouse-3-map) |
5701 | 47 |
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
|
48 (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
|
49 (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
|
50 |
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
|
51 (define-key calendar-mode-map [menu-bar moon moon] |
12033 | 52 '("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
|
53 |
5701 | 54 (define-key calendar-mode-map [menu-bar diary] |
55 (cons "Diary" (make-sparse-keymap "Diary"))) | |
56 | |
57 (define-key calendar-mode-map [menu-bar diary heb] | |
58 '("Insert Hebrew" . calendar-mouse-insert-hebrew-diary-entry)) | |
59 (define-key calendar-mode-map [menu-bar diary isl] | |
60 '("Insert Islamic" . calendar-mouse-insert-islamic-diary-entry)) | |
61 (define-key calendar-mode-map [menu-bar diary cyc] | |
12033 | 62 '("Insert Cyclic" . insert-cyclic-diary-entry)) |
5701 | 63 (define-key calendar-mode-map [menu-bar diary blk] |
12033 | 64 '("Insert Block" . insert-block-diary-entry)) |
5701 | 65 (define-key calendar-mode-map [menu-bar diary ann] |
12033 | 66 '("Insert Anniversary" . insert-anniversary-diary-entry)) |
5701 | 67 (define-key calendar-mode-map [menu-bar diary yr] |
12033 | 68 '("Insert Yearly" . insert-yearly-diary-entry)) |
5701 | 69 (define-key calendar-mode-map [menu-bar diary mon] |
12033 | 70 '("Insert Monthly" . insert-monthly-diary-entry)) |
5701 | 71 (define-key calendar-mode-map [menu-bar diary wk] |
12033 | 72 '("Insert Weekly" . insert-weekly-diary-entry)) |
5701 | 73 (define-key calendar-mode-map [menu-bar diary ent] |
12033 | 74 '("Insert Daily". insert-diary-entry)) |
5701 | 75 (define-key calendar-mode-map [menu-bar diary all] |
12033 | 76 '("Show All" . show-all-diary-entries)) |
5701 | 77 (define-key calendar-mode-map [menu-bar diary mark] |
12033 | 78 '("Mark All" . mark-diary-entries)) |
5701 | 79 (define-key calendar-mode-map [menu-bar diary view] |
12033 | 80 '("Cursor Date" . view-diary-entries)) |
9766
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
81 (define-key calendar-mode-map [menu-bar diary view] |
12033 | 82 '("Other File" . view-other-diary-entries)) |
5701 | 83 |
84 (define-key calendar-mode-map [menu-bar holidays] | |
85 (cons "Holidays" (make-sparse-keymap "Holidays"))) | |
86 | |
87 (define-key calendar-mode-map [menu-bar holidays unmark] | |
88 '("Unmark" . calendar-unmark)) | |
89 (define-key calendar-mode-map [menu-bar holidays mark] | |
90 '("Mark" . mark-calendar-holidays)) | |
91 (define-key calendar-mode-map [menu-bar holidays 3-mon] | |
12033 | 92 '("3 Months" . list-calendar-holidays)) |
5701 | 93 (define-key calendar-mode-map [menu-bar holidays 1-day] |
12033 | 94 '("One Day" . calendar-cursor-holidays)) |
5701 | 95 |
96 (define-key calendar-mode-map [menu-bar goto] | |
97 (cons "Goto" (make-sparse-keymap "Goto"))) | |
98 | |
99 (define-key calendar-mode-map [menu-bar goto french] | |
12033 | 100 '("French Date" . calendar-goto-french-date)) |
5701 | 101 (define-key calendar-mode-map [menu-bar goto mayan] |
12033 | 102 (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
|
103 (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
|
104 '("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
|
105 (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
|
106 '("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
|
107 (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
|
108 '("Chinese Date" . calendar-goto-chinese-date)) |
5701 | 109 (define-key calendar-mode-map [menu-bar goto julian] |
12033 | 110 '("Julian Date" . calendar-goto-julian-date)) |
5701 | 111 (define-key calendar-mode-map [menu-bar goto islamic] |
12033 | 112 '("Islamic Date" . calendar-goto-islamic-date)) |
5701 | 113 (define-key calendar-mode-map [menu-bar goto hebrew] |
12033 | 114 '("Hebrew Date" . calendar-goto-hebrew-date)) |
5701 | 115 (define-key calendar-mode-map [menu-bar goto astro] |
12033 | 116 '("Astronomical Date" . calendar-goto-astro-day-number)) |
5701 | 117 (define-key calendar-mode-map [menu-bar goto iso] |
12033 | 118 '("ISO Date" . calendar-goto-iso-date)) |
5701 | 119 (define-key calendar-mode-map [menu-bar goto gregorian] |
12033 | 120 '("Other Date" . calendar-goto-date)) |
5701 | 121 (define-key calendar-mode-map [menu-bar goto end-of-year] |
12033 | 122 '("End of Year" . calendar-end-of-year)) |
5701 | 123 (define-key calendar-mode-map [menu-bar goto beginning-of-year] |
12033 | 124 '("Beginning of Year" . calendar-beginning-of-year)) |
5701 | 125 (define-key calendar-mode-map [menu-bar goto end-of-month] |
12033 | 126 '("End of Month" . calendar-end-of-month)) |
5701 | 127 (define-key calendar-mode-map [menu-bar goto beginning-of-month] |
12033 | 128 '("Beginning of Month" . calendar-beginning-of-month)) |
5701 | 129 (define-key calendar-mode-map [menu-bar goto end-of-week] |
12033 | 130 '("End of Week" . calendar-end-of-week)) |
5701 | 131 (define-key calendar-mode-map [menu-bar goto beginning-of-week] |
12033 | 132 '("Beginning of Week" . calendar-beginning-of-week)) |
5701 | 133 (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
|
134 '("Today" . calendar-goto-today)) |
5701 | 135 |
136 | |
137 (define-key calendar-mode-map [menu-bar goto mayan prev-rnd] | |
138 '("Previous Round" . calendar-previous-calendar-round-date)) | |
139 (define-key calendar-mode-map [menu-bar goto mayan nxt-rnd] | |
140 '("Next Round" . calendar-next-calendar-round-date)) | |
141 (define-key calendar-mode-map [menu-bar goto mayan prev-haab] | |
142 '("Previous Haab" . calendar-previous-haab-date)) | |
143 (define-key calendar-mode-map [menu-bar goto mayan next-haab] | |
144 '("Next Haab" . calendar-next-haab-date)) | |
145 (define-key calendar-mode-map [menu-bar goto mayan prev-tzol] | |
146 '("Previous Tzolkin" . calendar-previous-tzolkin-date)) | |
147 (define-key calendar-mode-map [menu-bar goto mayan next-tzol] | |
148 '("Next Tzolkin" . calendar-next-tzolkin-date)) | |
149 | |
150 (define-key calendar-mode-map [menu-bar scroll] | |
151 (cons "Scroll" (make-sparse-keymap "Scroll"))) | |
152 | |
153 (define-key calendar-mode-map [menu-bar scroll bk-12] | |
154 '("Backward 1 Year" . "4\ev")) | |
155 (define-key calendar-mode-map [menu-bar scroll bk-3] | |
156 '("Backward 3 Months" . scroll-calendar-right-three-months)) | |
157 (define-key calendar-mode-map [menu-bar scroll bk-1] | |
158 '("Backward 1 Month" . scroll-calendar-right)) | |
159 (define-key calendar-mode-map [menu-bar scroll fwd-12] | |
160 '("Forward 1 Year" . "4\C-v")) | |
161 (define-key calendar-mode-map [menu-bar scroll fwd-3] | |
162 '("Forward 3 Months" . scroll-calendar-left-three-months)) | |
163 (define-key calendar-mode-map [menu-bar scroll fwd-1] | |
164 '("Forward 1 Month" . scroll-calendar-left)) | |
165 | |
166 (put 'calendar-forward-day 'menu-enable '(calendar-cursor-to-date)) | |
167 (put 'calendar-backward-day 'menu-enable '(calendar-cursor-to-date)) | |
168 (put 'calendar-forward-week 'menu-enable '(calendar-cursor-to-date)) | |
169 (put 'calendar-backward-week 'menu-enable '(calendar-cursor-to-date)) | |
170 (put 'calendar-forward-month 'menu-enable '(calendar-cursor-to-date)) | |
171 (put 'calendar-backward-month 'menu-enable '(calendar-cursor-to-date)) | |
172 (put 'calendar-forward-year 'menu-enable '(calendar-cursor-to-date)) | |
173 (put 'calendar-backward-year 'menu-enable '(calendar-cursor-to-date)) | |
174 (put 'calendar-beginning-of-year 'menu-enable '(calendar-cursor-to-date)) | |
175 (put 'calendar-end-of-year 'menu-enable '(calendar-cursor-to-date)) | |
176 (put 'calendar-beginning-of-month 'menu-enable '(calendar-cursor-to-date)) | |
177 (put 'calendar-end-of-month 'menu-enable '(calendar-cursor-to-date)) | |
178 (put 'calendar-end-of-week 'menu-enable '(calendar-cursor-to-date)) | |
179 (put 'calendar-beginning-of-week 'menu-enable '(calendar-cursor-to-date)) | |
180 (put 'calendar-mouse-print-dates 'menu-enable '(calendar-event-to-date)) | |
181 (put 'calendar-sunrise-sunset 'menu-enable '(calendar-event-to-date)) | |
182 (put 'calendar-cursor-holidays 'menu-enable '(calendar-cursor-to-date)) | |
183 (put 'view-diary-entries 'menu-enable '(calendar-cursor-to-date)) | |
9766
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
184 (put 'view-other-diary-entries 'menu-enable '(calendar-cursor-to-date)) |
5701 | 185 (put 'calendar-mouse-insert-hebrew-diary-entry |
186 'menu-enable | |
187 '(calendar-cursor-to-date)) | |
188 (put 'calendar-mouse-insert-islamic-diary-entry | |
189 'menu-enable | |
190 '(calendar-cursor-to-date)) | |
191 (put 'insert-cyclic-diary-entry 'menu-enable '(calendar-cursor-to-date)) | |
192 (put 'insert-block-diary-entry 'menu-enable '(calendar-cursor-to-date)) | |
193 (put 'insert-anniversary-diary-entry 'menu-enable '(calendar-cursor-to-date)) | |
194 (put 'insert-yearly-diary-entry 'menu-enable '(calendar-cursor-to-date)) | |
195 (put 'insert-monthly-diary-entry 'menu-enable '(calendar-cursor-to-date)) | |
196 (put 'insert-weekly-diary-entry 'menu-enable '(calendar-cursor-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
|
197 (put 'cal-tex-cursor-day 'menu-enable '(calendar-cursor-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
198 (put 'cal-tex-cursor-week 'menu-enable '(calendar-cursor-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
199 (put 'cal-tex-cursor-week2 'menu-enable '(calendar-cursor-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
200 (put 'cal-tex-cursor-week3 'menu-enable '(calendar-cursor-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
201 (put 'cal-tex-cursor-week4 'menu-enable '(calendar-cursor-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
202 (put 'cal-tex-cursor-week5 'menu-enable '(calendar-cursor-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
203 (put 'cal-tex-cursor-week6 'menu-enable '(calendar-cursor-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
204 (put 'cal-tex-cursor-month 'menu-enable '(calendar-cursor-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
205 (put 'cal-tex-cursor-month-landscape 'menu-enable '(calendar-cursor-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
206 (put 'cal-tex-cursor-year 'menu-enable '(calendar-cursor-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
207 (put 'cal-tex-cursor-filofax-year 'menu-enable '(calendar-cursor-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
208 (put 'cal-tex-cursor-year-landscape 'menu-enable '(calendar-cursor-to-date)) |
5701 | 209 |
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
|
210 (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
|
211 "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
|
212 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
|
213 ERROR is t, otherwise just returns nil." |
5701 | 214 (save-excursion |
215 (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
|
216 (calendar-cursor-to-date error))) |
5701 | 217 |
218 (defun calendar-mouse-insert-hebrew-diary-entry (event) | |
219 "Pop up menu to insert a Hebrew-date diary entry." | |
220 (interactive "e") | |
221 (let ((hebrew-selection | |
222 (x-popup-menu | |
223 event | |
224 (list "Hebrew insert menu" | |
225 (list (calendar-hebrew-date-string (calendar-cursor-to-date)) | |
226 '("One time" . insert-hebrew-diary-entry) | |
227 '("Monthly" . insert-monthly-hebrew-diary-entry) | |
228 '("Yearly" . insert-yearly-hebrew-diary-entry)))))) | |
229 (and hebrew-selection (call-interactively hebrew-selection)))) | |
230 | |
231 (defun calendar-mouse-insert-islamic-diary-entry (event) | |
232 "Pop up menu to insert an Islamic-date diary entry." | |
233 (interactive "e") | |
234 (let ((islamic-selection | |
235 (x-popup-menu | |
236 event | |
237 (list "Islamic insert menu" | |
238 (list (calendar-islamic-date-string (calendar-cursor-to-date)) | |
239 '("One time" . insert-islamic-diary-entry) | |
240 '("Monthly" . insert-monthly-islamic-diary-entry) | |
241 '("Yearly" . insert-yearly-islamic-diary-entry)))))) | |
242 (and islamic-selection (call-interactively islamic-selection)))) | |
243 | |
244 (defun calendar-mouse-sunrise/sunset () | |
245 "Show sunrise/sunset times for mouse-selected date." | |
246 (interactive) | |
247 (save-excursion | |
248 (calendar-goto-date (calendar-event-to-date)) | |
249 (calendar-sunrise-sunset))) | |
250 | |
251 (defun calendar-mouse-holidays () | |
252 "Show holidays for mouse-selected date." | |
253 (interactive) | |
254 (save-excursion | |
255 (calendar-goto-date (calendar-event-to-date)) | |
256 (calendar-cursor-holidays))) | |
257 | |
258 (defun calendar-mouse-view-diary-entries () | |
259 "View diary entries on mouse-selected date." | |
260 (interactive) | |
261 (save-excursion | |
262 (calendar-goto-date (calendar-event-to-date)) | |
263 (view-diary-entries 1))) | |
264 | |
9766
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
265 (defun calendar-mouse-view-other-diary-entries () |
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
266 "View diary entries from alternative file on mouse-selected date." |
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
267 (interactive) |
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
268 (save-excursion |
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
269 (calendar-goto-date (calendar-event-to-date)) |
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
270 (call-interactively 'view-other-diary-entries))) |
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
271 |
9710
b5fb08fb2cb3
Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
8308
diff
changeset
|
272 (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
|
273 "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
|
274 (interactive) |
b5fb08fb2cb3
Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
8308
diff
changeset
|
275 (save-excursion |
b5fb08fb2cb3
Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
8308
diff
changeset
|
276 (calendar-goto-date (calendar-event-to-date)) |
b5fb08fb2cb3
Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
8308
diff
changeset
|
277 (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
|
278 |
7412
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
279 (defun calendar-mouse-set-mark () |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
280 "Mark the date under the cursor." |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
281 (interactive) |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
282 (save-excursion |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
283 (calendar-goto-date (calendar-event-to-date)) |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
284 (calendar-set-mark nil))) |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
285 |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
286 (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
|
287 "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
|
288 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
289 (save-excursion |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
290 (calendar-goto-date (calendar-event-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
291 (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
|
292 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
293 (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
|
294 "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
|
295 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
|
296 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
297 (save-excursion |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
298 (calendar-goto-date (calendar-event-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
299 (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
|
300 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
301 (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
|
302 "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
|
303 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
|
304 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
305 (save-excursion |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
306 (calendar-goto-date (calendar-event-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
307 (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
|
308 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
309 (defun cal-tex-mouse-week3 () |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
310 "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
|
311 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
|
312 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
313 (save-excursion |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
314 (calendar-goto-date (calendar-event-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
315 (cal-tex-cursor-week3 nil))) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
316 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
317 (defun cal-tex-mouse-week4 () |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
318 "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
|
319 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
320 (save-excursion |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
321 (calendar-goto-date (calendar-event-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
322 (cal-tex-cursor-week4 nil))) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
323 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
324 (defun cal-tex-mouse-week5 () |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
325 "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
|
326 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
327 (save-excursion |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
328 (calendar-goto-date (calendar-event-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
329 (cal-tex-cursor-week5 nil))) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
330 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
331 (defun cal-tex-mouse-week6 () |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
332 "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
|
333 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
334 (save-excursion |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
335 (calendar-goto-date (calendar-event-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
336 (cal-tex-cursor-week6 nil))) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
337 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
338 (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
|
339 "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
|
340 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
|
341 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
342 (save-excursion |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
343 (calendar-goto-date (calendar-event-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
344 (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
|
345 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
346 (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
|
347 "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
|
348 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
|
349 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
350 (save-excursion |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
351 (calendar-goto-date (calendar-event-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
352 (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
|
353 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
354 (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
|
355 "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
|
356 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
357 (save-excursion |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
358 (calendar-goto-date (calendar-event-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
359 (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
|
360 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
361 (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
|
362 "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
|
363 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
364 (save-excursion |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
365 (calendar-goto-date (calendar-event-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
366 (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
|
367 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
368 (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
|
369 "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
|
370 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
371 (save-excursion |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
372 (calendar-goto-date (calendar-event-to-date)) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
373 (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
|
374 |
5701 | 375 (defun calendar-mouse-print-dates () |
376 "Pop up menu of equivalent dates to mouse selected date." | |
377 (interactive) | |
13047
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
378 (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
|
379 (selection |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
380 (x-popup-menu |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
381 event |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
382 (list |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
383 "Date Menu" |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
384 (append |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
385 (list |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
386 (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
|
387 (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
|
388 (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
|
389 (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
|
390 (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
|
391 (list |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
392 (format "Astronomical (Julian) day number (after noon UTC): %s" |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
393 (calendar-astro-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
|
394 (list (format "Hebrew date (before sunset): %s" |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
395 (calendar-hebrew-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
|
396 (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
|
397 (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
|
398 (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
|
399 (list |
7ccba52e1e3e
Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13194
diff
changeset
|
400 (list (format "Chinese date: %s" |
7ccba52e1e3e
Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13194
diff
changeset
|
401 (calendar-chinese-date-string date)))) |
7ccba52e1e3e
Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13194
diff
changeset
|
402 ; (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
|
403 ; . 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
|
404 (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
|
405 (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
|
406 (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
|
407 (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
|
408 (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
|
409 (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
|
410 (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
|
411 (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
|
412 (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
|
413 (list |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
414 (list |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
415 (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
|
416 (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
|
417 (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
|
418 |
13063
30ee606ce331
Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13047
diff
changeset
|
419 (defun calendar-mouse-chinese-date () |
30ee606ce331
Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13047
diff
changeset
|
420 "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
|
421 (interactive) |
30ee606ce331
Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13047
diff
changeset
|
422 (save-excursion |
30ee606ce331
Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13047
diff
changeset
|
423 (calendar-goto-date (calendar-event-to-date)) |
30ee606ce331
Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13047
diff
changeset
|
424 (calendar-print-chinese-date))) |
5701 | 425 |
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
|
426 (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
|
427 "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
|
428 (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
|
429 (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
|
430 (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
|
431 (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
|
432 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
|
433 (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
|
434 (list |
13047
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
435 (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
|
436 '("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
|
437 '("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
|
438 '("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
|
439 '("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
|
440 '("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
|
441 '("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
|
442 '("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
|
443 '("Other diary file entries" |
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
444 . calendar-mouse-view-other-diary-entries) |
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
445 ))))) |
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
|
446 (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
|
447 |
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 (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
|
449 "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
|
450 (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
|
451 (let* ((selection |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
452 (x-popup-menu |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
453 event |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
454 (list "Menu" |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
455 (list |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
456 (calendar-date-string date t nil) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
457 '("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
|
458 '("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
|
459 '("Weekly (2 pages)" . 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
|
460 '("Weekly (other style; 1 page)" . cal-tex-mouse-week3) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
461 '("Weekly (yet another style; 1 page)" . cal-tex-mouse-week4) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
462 '("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
|
463 '("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
|
464 '("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
|
465 '("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
|
466 '("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
|
467 ))))) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
468 (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
|
469 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
470 (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
|
471 "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
|
472 (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
|
473 (let* ((selection |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
474 (x-popup-menu |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
475 event |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
476 (list "Menu" |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
477 (list |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
478 (calendar-date-string date t nil) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
479 '("Filofax Weekly (1 page)" . cal-tex-mouse-week5) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
480 '("Filofax Weekly (2 pages)" . cal-tex-mouse-week6) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
481 '("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
|
482 ))))) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
483 (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
|
484 |
7478
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
485 (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
|
486 '("Exit calendar" . exit-calendar)) |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
487 (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
|
488 '("Show diary" . show-all-diary-entries)) |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
489 (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
|
490 '("Lunar phases" . calendar-phases-of-moon)) |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
491 (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
|
492 '("Unmark" . calendar-unmark)) |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
493 (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
|
494 '("Mark holidays" . mark-calendar-holidays)) |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
495 (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
|
496 '("List holidays" . list-calendar-holidays)) |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
497 (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
|
498 '("Mark diary entries" . mark-diary-entries)) |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
499 (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
|
500 '("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
|
501 (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
|
502 '("Scroll forward" . scroll-calendar-left-three-months)) |
5701 | 503 |
504 (run-hooks 'cal-menu-load-hook) | |
505 | |
506 (provide 'cal-menu) | |
507 | |
508 ;;; cal-menu.el ends here |