Mercurial > emacs
annotate lisp/calendar/cal-menu.el @ 20424:bfc68d8546f3
Minor repair of previous change.
author | Edward M. Reingold <reingold@emr.cs.iit.edu> |
---|---|
date | Fri, 05 Dec 1997 21:28:00 +0000 |
parents | f2a0f6498003 |
children | aca7f8a34a9e |
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 |
14169 | 23 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
25 ;; Boston, MA 02111-1307, USA. | |
5701 | 26 |
27 ;;; Commentary: | |
28 | |
29 ;; This collection of functions implements menu bar and popup menu support for | |
30 ;; calendar.el. | |
31 | |
32 ;; Comments, corrections, and improvements should be sent to | |
33 ;; Edward M. Reingold Department of Computer Science | |
34 ;; (217) 333-6733 University of Illinois at Urbana-Champaign | |
35 ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | |
36 ;; Urbana, Illinois 61801 | |
37 | |
38 ;;; Code: | |
39 | |
19950
947c67a81ec6
Require calendar only when compiling.
Richard M. Stallman <rms@gnu.org>
parents:
19892
diff
changeset
|
40 (eval-when-compile (require 'calendar)) |
19892 | 41 |
9999
8187800943e7
Get rid of edit menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9766
diff
changeset
|
42 (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
|
43 (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
|
44 |
7478
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-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
|
46 (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
|
47 |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
48 (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
|
49 (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
|
50 (define-key calendar-mode-map [C-down-mouse-3] calendar-mouse-3-map) |
5701 | 51 |
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
|
52 (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
|
53 (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
|
54 |
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
|
55 (define-key calendar-mode-map [menu-bar moon moon] |
12033 | 56 '("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
|
57 |
5701 | 58 (define-key calendar-mode-map [menu-bar diary] |
59 (cons "Diary" (make-sparse-keymap "Diary"))) | |
60 | |
61 (define-key calendar-mode-map [menu-bar diary heb] | |
62 '("Insert Hebrew" . calendar-mouse-insert-hebrew-diary-entry)) | |
63 (define-key calendar-mode-map [menu-bar diary isl] | |
64 '("Insert Islamic" . calendar-mouse-insert-islamic-diary-entry)) | |
65 (define-key calendar-mode-map [menu-bar diary cyc] | |
12033 | 66 '("Insert Cyclic" . insert-cyclic-diary-entry)) |
5701 | 67 (define-key calendar-mode-map [menu-bar diary blk] |
12033 | 68 '("Insert Block" . insert-block-diary-entry)) |
5701 | 69 (define-key calendar-mode-map [menu-bar diary ann] |
12033 | 70 '("Insert Anniversary" . insert-anniversary-diary-entry)) |
5701 | 71 (define-key calendar-mode-map [menu-bar diary yr] |
12033 | 72 '("Insert Yearly" . insert-yearly-diary-entry)) |
5701 | 73 (define-key calendar-mode-map [menu-bar diary mon] |
12033 | 74 '("Insert Monthly" . insert-monthly-diary-entry)) |
5701 | 75 (define-key calendar-mode-map [menu-bar diary wk] |
12033 | 76 '("Insert Weekly" . insert-weekly-diary-entry)) |
5701 | 77 (define-key calendar-mode-map [menu-bar diary ent] |
12033 | 78 '("Insert Daily". insert-diary-entry)) |
5701 | 79 (define-key calendar-mode-map [menu-bar diary all] |
12033 | 80 '("Show All" . show-all-diary-entries)) |
5701 | 81 (define-key calendar-mode-map [menu-bar diary mark] |
12033 | 82 '("Mark All" . mark-diary-entries)) |
5701 | 83 (define-key calendar-mode-map [menu-bar diary view] |
12033 | 84 '("Cursor Date" . view-diary-entries)) |
9766
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
85 (define-key calendar-mode-map [menu-bar diary view] |
12033 | 86 '("Other File" . view-other-diary-entries)) |
5701 | 87 |
88 (define-key calendar-mode-map [menu-bar holidays] | |
89 (cons "Holidays" (make-sparse-keymap "Holidays"))) | |
90 | |
91 (define-key calendar-mode-map [menu-bar holidays unmark] | |
92 '("Unmark" . calendar-unmark)) | |
93 (define-key calendar-mode-map [menu-bar holidays mark] | |
94 '("Mark" . mark-calendar-holidays)) | |
17667
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
95 (define-key calendar-mode-map [menu-bar holidays previous-year] |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
96 '("Previous year" . cal-menu-list-holidays-previous-year)) |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
97 (define-key calendar-mode-map [menu-bar holidays following-year] |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
98 '("Following year" . cal-menu-list-holidays-following-year)) |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
99 (define-key calendar-mode-map [menu-bar holidays year] |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
100 '("Year" . cal-menu-list-holidays-year)) |
5701 | 101 (define-key calendar-mode-map [menu-bar holidays 3-mon] |
12033 | 102 '("3 Months" . list-calendar-holidays)) |
5701 | 103 (define-key calendar-mode-map [menu-bar holidays 1-day] |
12033 | 104 '("One Day" . calendar-cursor-holidays)) |
5701 | 105 |
106 (define-key calendar-mode-map [menu-bar goto] | |
107 (cons "Goto" (make-sparse-keymap "Goto"))) | |
108 | |
109 (define-key calendar-mode-map [menu-bar goto french] | |
12033 | 110 '("French Date" . calendar-goto-french-date)) |
5701 | 111 (define-key calendar-mode-map [menu-bar goto mayan] |
12033 | 112 (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
|
113 (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
|
114 '("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
|
115 (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
|
116 '("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
|
117 (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
|
118 '("Chinese Date" . calendar-goto-chinese-date)) |
5701 | 119 (define-key calendar-mode-map [menu-bar goto julian] |
12033 | 120 '("Julian Date" . calendar-goto-julian-date)) |
5701 | 121 (define-key calendar-mode-map [menu-bar goto islamic] |
12033 | 122 '("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
|
123 (define-key calendar-mode-map [menu-bar goto persian] |
5a4b28f19b75
Add references to Persian calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
14169
diff
changeset
|
124 '("Persian Date" . calendar-goto-persian-date)) |
5701 | 125 (define-key calendar-mode-map [menu-bar goto hebrew] |
12033 | 126 '("Hebrew Date" . calendar-goto-hebrew-date)) |
5701 | 127 (define-key calendar-mode-map [menu-bar goto astro] |
12033 | 128 '("Astronomical Date" . calendar-goto-astro-day-number)) |
5701 | 129 (define-key calendar-mode-map [menu-bar goto iso] |
12033 | 130 '("ISO Date" . calendar-goto-iso-date)) |
5701 | 131 (define-key calendar-mode-map [menu-bar goto gregorian] |
12033 | 132 '("Other Date" . calendar-goto-date)) |
5701 | 133 (define-key calendar-mode-map [menu-bar goto end-of-year] |
12033 | 134 '("End of Year" . calendar-end-of-year)) |
5701 | 135 (define-key calendar-mode-map [menu-bar goto beginning-of-year] |
12033 | 136 '("Beginning of Year" . calendar-beginning-of-year)) |
5701 | 137 (define-key calendar-mode-map [menu-bar goto end-of-month] |
12033 | 138 '("End of Month" . calendar-end-of-month)) |
5701 | 139 (define-key calendar-mode-map [menu-bar goto beginning-of-month] |
12033 | 140 '("Beginning of Month" . calendar-beginning-of-month)) |
5701 | 141 (define-key calendar-mode-map [menu-bar goto end-of-week] |
12033 | 142 '("End of Week" . calendar-end-of-week)) |
5701 | 143 (define-key calendar-mode-map [menu-bar goto beginning-of-week] |
12033 | 144 '("Beginning of Week" . calendar-beginning-of-week)) |
5701 | 145 (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
|
146 '("Today" . calendar-goto-today)) |
5701 | 147 |
148 | |
149 (define-key calendar-mode-map [menu-bar goto mayan prev-rnd] | |
150 '("Previous Round" . calendar-previous-calendar-round-date)) | |
151 (define-key calendar-mode-map [menu-bar goto mayan nxt-rnd] | |
152 '("Next Round" . calendar-next-calendar-round-date)) | |
153 (define-key calendar-mode-map [menu-bar goto mayan prev-haab] | |
154 '("Previous Haab" . calendar-previous-haab-date)) | |
155 (define-key calendar-mode-map [menu-bar goto mayan next-haab] | |
156 '("Next Haab" . calendar-next-haab-date)) | |
157 (define-key calendar-mode-map [menu-bar goto mayan prev-tzol] | |
158 '("Previous Tzolkin" . calendar-previous-tzolkin-date)) | |
159 (define-key calendar-mode-map [menu-bar goto mayan next-tzol] | |
160 '("Next Tzolkin" . calendar-next-tzolkin-date)) | |
161 | |
162 (define-key calendar-mode-map [menu-bar scroll] | |
163 (cons "Scroll" (make-sparse-keymap "Scroll"))) | |
164 | |
165 (define-key calendar-mode-map [menu-bar scroll bk-12] | |
166 '("Backward 1 Year" . "4\ev")) | |
167 (define-key calendar-mode-map [menu-bar scroll bk-3] | |
168 '("Backward 3 Months" . scroll-calendar-right-three-months)) | |
169 (define-key calendar-mode-map [menu-bar scroll bk-1] | |
170 '("Backward 1 Month" . scroll-calendar-right)) | |
171 (define-key calendar-mode-map [menu-bar scroll fwd-12] | |
172 '("Forward 1 Year" . "4\C-v")) | |
173 (define-key calendar-mode-map [menu-bar scroll fwd-3] | |
174 '("Forward 3 Months" . scroll-calendar-left-three-months)) | |
175 (define-key calendar-mode-map [menu-bar scroll fwd-1] | |
176 '("Forward 1 Month" . scroll-calendar-left)) | |
177 | |
17667
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
178 (defun cal-menu-list-holidays-year () |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
179 "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
|
180 (interactive) |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
181 (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
|
182 (list-holidays year year))) |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
183 |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
184 (defun cal-menu-list-holidays-following-year () |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
185 "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
|
186 (interactive) |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
187 (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
|
188 (list-holidays year year))) |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
189 |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
190 (defun cal-menu-list-holidays-previous-year () |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
191 "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
|
192 (interactive) |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
193 (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
|
194 (list-holidays year year))) |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
195 |
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
|
196 (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
|
197 "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
|
198 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
|
199 ERROR is t, otherwise just returns nil." |
5701 | 200 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
201 (set-buffer (window-buffer (posn-window (event-start last-input-event)))) |
5701 | 202 (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
|
203 (calendar-cursor-to-date error))) |
5701 | 204 |
205 (defun calendar-mouse-insert-hebrew-diary-entry (event) | |
206 "Pop up menu to insert a Hebrew-date diary entry." | |
207 (interactive "e") | |
208 (let ((hebrew-selection | |
209 (x-popup-menu | |
210 event | |
211 (list "Hebrew insert menu" | |
212 (list (calendar-hebrew-date-string (calendar-cursor-to-date)) | |
213 '("One time" . insert-hebrew-diary-entry) | |
214 '("Monthly" . insert-monthly-hebrew-diary-entry) | |
215 '("Yearly" . insert-yearly-hebrew-diary-entry)))))) | |
216 (and hebrew-selection (call-interactively hebrew-selection)))) | |
217 | |
218 (defun calendar-mouse-insert-islamic-diary-entry (event) | |
219 "Pop up menu to insert an Islamic-date diary entry." | |
220 (interactive "e") | |
221 (let ((islamic-selection | |
222 (x-popup-menu | |
223 event | |
224 (list "Islamic insert menu" | |
225 (list (calendar-islamic-date-string (calendar-cursor-to-date)) | |
226 '("One time" . insert-islamic-diary-entry) | |
227 '("Monthly" . insert-monthly-islamic-diary-entry) | |
228 '("Yearly" . insert-yearly-islamic-diary-entry)))))) | |
229 (and islamic-selection (call-interactively islamic-selection)))) | |
230 | |
231 (defun calendar-mouse-sunrise/sunset () | |
232 "Show sunrise/sunset times for mouse-selected date." | |
233 (interactive) | |
234 (save-excursion | |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
235 (calendar-mouse-goto-date (calendar-event-to-date)) |
5701 | 236 (calendar-sunrise-sunset))) |
237 | |
238 (defun calendar-mouse-holidays () | |
239 "Show holidays for mouse-selected date." | |
240 (interactive) | |
241 (save-excursion | |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
242 (calendar-mouse-goto-date (calendar-event-to-date)) |
5701 | 243 (calendar-cursor-holidays))) |
244 | |
245 (defun calendar-mouse-view-diary-entries () | |
246 "View diary entries on mouse-selected date." | |
247 (interactive) | |
248 (save-excursion | |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
249 (calendar-mouse-goto-date (calendar-event-to-date)) |
5701 | 250 (view-diary-entries 1))) |
251 | |
9766
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
252 (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
|
253 "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
|
254 (interactive) |
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
255 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
256 (calendar-mouse-goto-date (calendar-event-to-date)) |
9766
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
257 (call-interactively 'view-other-diary-entries))) |
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
258 |
9710
b5fb08fb2cb3
Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
8308
diff
changeset
|
259 (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
|
260 "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
|
261 (interactive) |
b5fb08fb2cb3
Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
8308
diff
changeset
|
262 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
263 (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
|
264 (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
|
265 |
7412
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
266 (defun calendar-mouse-set-mark () |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
267 "Mark the date under the cursor." |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
268 (interactive) |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
269 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
270 (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
|
271 (calendar-set-mark nil))) |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
272 |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
273 (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
|
274 "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
|
275 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
276 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
277 (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
|
278 (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
|
279 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
280 (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
|
281 "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
|
282 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
|
283 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
284 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
285 (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
|
286 (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
|
287 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
288 (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
|
289 "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
|
290 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
|
291 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
292 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
293 (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
|
294 (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
|
295 |
13689
a04244ec8530
Repair function names from rms error in modifying!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13285
diff
changeset
|
296 (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
|
297 "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
|
298 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
|
299 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
300 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
301 (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
|
302 (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
|
303 |
13689
a04244ec8530
Repair function names from rms error in modifying!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13285
diff
changeset
|
304 (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
|
305 "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
|
306 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
307 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
308 (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
|
309 (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
|
310 |
19975
927a8710de05
(cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents:
19950
diff
changeset
|
311 (defun cal-tex-mouse-filofax-daily () |
927a8710de05
(cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents:
19950
diff
changeset
|
312 "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
|
313 (interactive) |
927a8710de05
(cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents:
19950
diff
changeset
|
314 (save-excursion |
927a8710de05
(cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents:
19950
diff
changeset
|
315 (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
|
316 (cal-tex-cursor-filofax-daily nil))) |
927a8710de05
(cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents:
19950
diff
changeset
|
317 |
13690
8a3ceaf9bfee
More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13689
diff
changeset
|
318 (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
|
319 "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
|
320 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
321 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
322 (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
|
323 (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
|
324 |
13690
8a3ceaf9bfee
More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13689
diff
changeset
|
325 (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
|
326 "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
|
327 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
328 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
329 (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
|
330 (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
|
331 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
332 (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
|
333 "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
|
334 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
|
335 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
336 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
337 (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
|
338 (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
|
339 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
340 (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
|
341 "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
|
342 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
|
343 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
344 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
345 (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
|
346 (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
|
347 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
348 (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
|
349 "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
|
350 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
351 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
352 (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
|
353 (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
|
354 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
355 (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
|
356 "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
|
357 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
358 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
359 (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
|
360 (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
|
361 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
362 (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
|
363 "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
|
364 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
365 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
366 (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
|
367 (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
|
368 |
5701 | 369 (defun calendar-mouse-print-dates () |
370 "Pop up menu of equivalent dates to mouse selected date." | |
371 (interactive) | |
13047
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
372 (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
|
373 (selection |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
374 (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
|
375 event |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
376 (list |
13876
16decb4ae75f
Put date on top of other-calendars menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13690
diff
changeset
|
377 (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
|
378 (append |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
379 (list |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
380 (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
|
381 (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
|
382 (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
|
383 (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
|
384 (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
|
385 (list |
15068
47ef84d3738d
Spelling fix.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
14951
diff
changeset
|
386 (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
|
387 (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
|
388 (list |
20424
bfc68d8546f3
Minor repair of previous change.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
20423
diff
changeset
|
389 (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
|
390 (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
|
391 (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
|
392 (calendar-hebrew-date-string date))) |
5a4b28f19b75
Add references to Persian calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
14169
diff
changeset
|
393 (list (format "Persian date: %s" |
5a4b28f19b75
Add references to Persian calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
14169
diff
changeset
|
394 (calendar-persian-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
|
395 (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
|
396 (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
|
397 (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
|
398 (list |
7ccba52e1e3e
Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13194
diff
changeset
|
399 (list (format "Chinese date: %s" |
7ccba52e1e3e
Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13194
diff
changeset
|
400 (calendar-chinese-date-string date)))) |
7ccba52e1e3e
Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13194
diff
changeset
|
401 ; (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
|
402 ; . 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
|
403 (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
|
404 (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
|
405 (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
|
406 (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
|
407 (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
|
408 (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
|
409 (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
|
410 (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
|
411 (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
|
412 (list |
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 (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
|
415 (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
|
416 (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
|
417 |
13063
30ee606ce331
Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13047
diff
changeset
|
418 (defun calendar-mouse-chinese-date () |
30ee606ce331
Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13047
diff
changeset
|
419 "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
|
420 (interactive) |
30ee606ce331
Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13047
diff
changeset
|
421 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
422 (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
|
423 (calendar-print-chinese-date))) |
5701 | 424 |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
425 (defun calendar-mouse-goto-date (date) |
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
426 (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
|
427 (calendar-goto-date date)) |
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
428 |
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
|
429 (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
|
430 "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
|
431 (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
|
432 (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
|
433 (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
|
434 (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
|
435 event |
13690
8a3ceaf9bfee
More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13689
diff
changeset
|
436 (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
|
437 (list |
13690
8a3ceaf9bfee
More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13689
diff
changeset
|
438 "" |
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
|
439 '("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
|
440 '("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
|
441 '("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
|
442 '("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
|
443 '("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
|
444 '("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
|
445 '("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
|
446 '("Other diary file entries" |
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
447 . calendar-mouse-view-other-diary-entries) |
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
448 ))))) |
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
|
449 (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
|
450 |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
451 (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
|
452 "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
|
453 (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
|
454 (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
|
455 (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
|
456 event |
13690
8a3ceaf9bfee
More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13689
diff
changeset
|
457 (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
|
458 (list |
13690
8a3ceaf9bfee
More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13689
diff
changeset
|
459 "" |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
460 '("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
|
461 '("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
|
462 '("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
|
463 '("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
|
464 '("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
|
465 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
|
466 '("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
|
467 '("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
|
468 '("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
|
469 '("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
|
470 '("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
|
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 (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
|
473 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
474 (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
|
475 "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
|
476 (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
|
477 (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
|
478 (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
|
479 event |
13690
8a3ceaf9bfee
More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13689
diff
changeset
|
480 (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
|
481 (list |
13690
8a3ceaf9bfee
More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13689
diff
changeset
|
482 "" |
19975
927a8710de05
(cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents:
19950
diff
changeset
|
483 '("Filofax Daily (one-day-per-page)" . |
927a8710de05
(cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents:
19950
diff
changeset
|
484 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
|
485 '("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
|
486 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
|
487 '("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
|
488 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
|
489 '("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
|
490 ))))) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
491 (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
|
492 |
7478
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 [exit-calendar] |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
494 '("Exit calendar" . exit-calendar)) |
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 [show-diary] |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
496 '("Show diary" . show-all-diary-entries)) |
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 [lunar-phases] |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
498 '("Lunar phases" . calendar-phases-of-moon)) |
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 [unmark] |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
500 '("Unmark" . calendar-unmark)) |
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 [mark-holidays] |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
502 '("Mark holidays" . mark-calendar-holidays)) |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
503 (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
|
504 '("List holidays" . list-calendar-holidays)) |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
505 (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
|
506 '("Mark diary entries" . mark-diary-entries)) |
57cfbcfdf92a
Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents:
7442
diff
changeset
|
507 (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
|
508 '("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
|
509 (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
|
510 '("Scroll forward" . scroll-calendar-left-three-months)) |
5701 | 511 |
512 (run-hooks 'cal-menu-load-hook) | |
513 | |
514 (provide 'cal-menu) | |
515 | |
516 ;;; cal-menu.el ends here |