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