Mercurial > emacs
comparison lisp/calendar/cal-menu.el @ 17667:fd527e9aa377
(cal-menu-list-holidays-following-year)
(cal-menu-list-holidays-previous-year)
(cal-menu-list-holidays-year): New commands.
(calendar-mode-map): Put them in the holidays menu.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 05 May 1997 17:54:28 +0000 |
parents | 1dc9754cbf8e |
children | b3d4cde6e4c3 |
comparison
equal
deleted
inserted
replaced
17666:ca11152dcad5 | 17667:fd527e9aa377 |
---|---|
88 | 88 |
89 (define-key calendar-mode-map [menu-bar holidays unmark] | 89 (define-key calendar-mode-map [menu-bar holidays unmark] |
90 '("Unmark" . calendar-unmark)) | 90 '("Unmark" . calendar-unmark)) |
91 (define-key calendar-mode-map [menu-bar holidays mark] | 91 (define-key calendar-mode-map [menu-bar holidays mark] |
92 '("Mark" . mark-calendar-holidays)) | 92 '("Mark" . mark-calendar-holidays)) |
93 (define-key calendar-mode-map [menu-bar holidays previous-year] | |
94 '("Previous year" . cal-menu-list-holidays-previous-year)) | |
95 (define-key calendar-mode-map [menu-bar holidays following-year] | |
96 '("Following year" . cal-menu-list-holidays-following-year)) | |
97 (define-key calendar-mode-map [menu-bar holidays year] | |
98 '("Year" . cal-menu-list-holidays-year)) | |
93 (define-key calendar-mode-map [menu-bar holidays 3-mon] | 99 (define-key calendar-mode-map [menu-bar holidays 3-mon] |
94 '("3 Months" . list-calendar-holidays)) | 100 '("3 Months" . list-calendar-holidays)) |
95 (define-key calendar-mode-map [menu-bar holidays 1-day] | 101 (define-key calendar-mode-map [menu-bar holidays 1-day] |
96 '("One Day" . calendar-cursor-holidays)) | 102 '("One Day" . calendar-cursor-holidays)) |
97 | 103 |
164 '("Forward 1 Year" . "4\C-v")) | 170 '("Forward 1 Year" . "4\C-v")) |
165 (define-key calendar-mode-map [menu-bar scroll fwd-3] | 171 (define-key calendar-mode-map [menu-bar scroll fwd-3] |
166 '("Forward 3 Months" . scroll-calendar-left-three-months)) | 172 '("Forward 3 Months" . scroll-calendar-left-three-months)) |
167 (define-key calendar-mode-map [menu-bar scroll fwd-1] | 173 (define-key calendar-mode-map [menu-bar scroll fwd-1] |
168 '("Forward 1 Month" . scroll-calendar-left)) | 174 '("Forward 1 Month" . scroll-calendar-left)) |
175 | |
176 (defun cal-menu-list-holidays-year () | |
177 "Display a list of the holidays of the selected date's year." | |
178 (interactive) | |
179 (let ((year (extract-calendar-year (calendar-cursor-to-date)))) | |
180 (list-holidays year year))) | |
181 | |
182 (defun cal-menu-list-holidays-following-year () | |
183 "Display a list of the holidays of the following year." | |
184 (interactive) | |
185 (let ((year (1+ (extract-calendar-year (calendar-cursor-to-date))))) | |
186 (list-holidays year year))) | |
187 | |
188 (defun cal-menu-list-holidays-previous-year () | |
189 "Display a list of the holidays of the previous year." | |
190 (interactive) | |
191 (let ((year (1- (extract-calendar-year (calendar-cursor-to-date))))) | |
192 (list-holidays year year))) | |
169 | 193 |
170 (defun calendar-event-to-date (&optional error) | 194 (defun calendar-event-to-date (&optional error) |
171 "Date of last event. | 195 "Date of last event. |
172 If event is not on a specific date, signals an error if optional parameter | 196 If event is not on a specific date, signals an error if optional parameter |
173 ERROR is t, otherwise just returns nil." | 197 ERROR is t, otherwise just returns nil." |