comparison lisp/calendar/cal-menu.el @ 37001:69ed032fdcce

Undo changes made by John Wiegley in previous revision.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 26 Mar 2001 13:33:23 +0000
parents 6098465deff0
children e573c7f532dd
comparison
equal deleted inserted replaced
37000:b28c6e54c0f3 37001:69ed032fdcce
61 61
62 (define-key calendar-mode-map [menu-bar diary heb] 62 (define-key calendar-mode-map [menu-bar diary heb]
63 '("Insert Hebrew" . calendar-mouse-insert-hebrew-diary-entry)) 63 '("Insert Hebrew" . calendar-mouse-insert-hebrew-diary-entry))
64 (define-key calendar-mode-map [menu-bar diary isl] 64 (define-key calendar-mode-map [menu-bar diary isl]
65 '("Insert Islamic" . calendar-mouse-insert-islamic-diary-entry)) 65 '("Insert Islamic" . calendar-mouse-insert-islamic-diary-entry))
66 (define-key calendar-mode-map [menu-bar diary baha]
67 '("Insert Baha'i" . calendar-mouse-insert-bahai-diary-entry))
68 (define-key calendar-mode-map [menu-bar diary cyc] 66 (define-key calendar-mode-map [menu-bar diary cyc]
69 '("Insert Cyclic" . insert-cyclic-diary-entry)) 67 '("Insert Cyclic" . insert-cyclic-diary-entry))
70 (define-key calendar-mode-map [menu-bar diary blk] 68 (define-key calendar-mode-map [menu-bar diary blk]
71 '("Insert Block" . insert-block-diary-entry)) 69 '("Insert Block" . insert-block-diary-entry))
72 (define-key calendar-mode-map [menu-bar diary ann] 70 (define-key calendar-mode-map [menu-bar diary ann]
106 '("Chinese Date" . calendar-goto-chinese-date)) 104 '("Chinese Date" . calendar-goto-chinese-date))
107 (define-key calendar-mode-map [menu-bar goto julian] 105 (define-key calendar-mode-map [menu-bar goto julian]
108 '("Julian Date" . calendar-goto-julian-date)) 106 '("Julian Date" . calendar-goto-julian-date))
109 (define-key calendar-mode-map [menu-bar goto islamic] 107 (define-key calendar-mode-map [menu-bar goto islamic]
110 '("Islamic Date" . calendar-goto-islamic-date)) 108 '("Islamic Date" . calendar-goto-islamic-date))
111 (define-key calendar-mode-map [menu-bar goto persian]
112 '("Baha'i Date" . calendar-goto-bahai-date))
113 (define-key calendar-mode-map [menu-bar goto persian] 109 (define-key calendar-mode-map [menu-bar goto persian]
114 '("Persian Date" . calendar-goto-persian-date)) 110 '("Persian Date" . calendar-goto-persian-date))
115 (define-key calendar-mode-map [menu-bar goto hebrew] 111 (define-key calendar-mode-map [menu-bar goto hebrew]
116 '("Hebrew Date" . calendar-goto-hebrew-date)) 112 '("Hebrew Date" . calendar-goto-hebrew-date))
117 (define-key calendar-mode-map [menu-bar goto astro] 113 (define-key calendar-mode-map [menu-bar goto astro]
268 '("One time" . insert-islamic-diary-entry) 264 '("One time" . insert-islamic-diary-entry)
269 '("Monthly" . insert-monthly-islamic-diary-entry) 265 '("Monthly" . insert-monthly-islamic-diary-entry)
270 '("Yearly" . insert-yearly-islamic-diary-entry)))))) 266 '("Yearly" . insert-yearly-islamic-diary-entry))))))
271 (and islamic-selection (call-interactively islamic-selection)))) 267 (and islamic-selection (call-interactively islamic-selection))))
272 268
273 (defun calendar-mouse-insert-bahai-diary-entry (event)
274 "Pop up menu to insert an Baha'i-date diary entry."
275 (interactive "e")
276 (let ((bahai-selection
277 (x-popup-menu
278 event
279 (list "Baha'i insert menu"
280 (list (calendar-bahai-date-string (calendar-cursor-to-date))
281 '("One time" . insert-bahai-diary-entry)
282 '("Monthly" . insert-monthly-bahai-diary-entry)
283 '("Yearly" . insert-yearly-bahai-diary-entry))))))
284 (and bahai-selection (call-interactively bahai-selection))))
285
286 (defun calendar-mouse-sunrise/sunset () 269 (defun calendar-mouse-sunrise/sunset ()
287 "Show sunrise/sunset times for mouse-selected date." 270 "Show sunrise/sunset times for mouse-selected date."
288 (interactive) 271 (interactive)
289 (save-excursion 272 (save-excursion
290 (calendar-mouse-goto-date (calendar-event-to-date)) 273 (calendar-mouse-goto-date (calendar-event-to-date))
489 (format "Fixed (RD) date: %s" 472 (format "Fixed (RD) date: %s"
490 (calendar-absolute-from-gregorian date))) 473 (calendar-absolute-from-gregorian date)))
491 (list (format "Hebrew date (before sunset): %s" 474 (list (format "Hebrew date (before sunset): %s"
492 (calendar-hebrew-date-string date))) 475 (calendar-hebrew-date-string date)))
493 (list (format "Persian date: %s" 476 (list (format "Persian date: %s"
494 (calendar-persian-date-string date))) 477 (calendar-persian-date-string date))))
495 (list (format "Baha'i date (before sunset): %s"
496 (calendar-bahai-date-string date))))
497 (let ((i (calendar-islamic-date-string date))) 478 (let ((i (calendar-islamic-date-string date)))
498 (if (not (string-equal i "")) 479 (if (not (string-equal i ""))
499 (list (list (format "Islamic date (before sunset): %s" i))))) 480 (list (list (format "Islamic date (before sunset): %s" i)))))
500 (list 481 (list
501 (list (format "Chinese date: %s" 482 (list (format "Chinese date: %s"