annotate lisp/calendar/cal-menu.el @ 97453:108187861052

Fix last change.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 14 Aug 2008 01:14:28 +0000
parents 6e551caf98f6
children 5482506bbfd1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 ;;; cal-menu.el --- calendar functions for menu bar and popup menu support
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2
92962
b3d9a4a54d89 (cal-menu-goto-menu): Use "Go To".
Glenn Morris <rgm@gnu.org>
parents: 92907
diff changeset
3 ;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
b3d9a4a54d89 (cal-menu-goto-menu): Use "Go To".
Glenn Morris <rgm@gnu.org>
parents: 92907
diff changeset
4 ;; 2008 Free Software Foundation, Inc.
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
92854
5ddbb514b6c5 Whitespace only.
Glenn Morris <rgm@gnu.org>
parents: 92647
diff changeset
7 ;; Lara Rios <lrios@coewl.cen.uiuc.edu>
65919
5c09efcfc1d9 Update maintainer email address.
Glenn Morris <rgm@gnu.org>
parents: 65876
diff changeset
8 ;; Maintainer: Glenn Morris <rgm@gnu.org>
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9 ;; Keywords: calendar
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10 ;; Human-Keywords: calendar, popup menus, menu bar
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
11
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12 ;; This file is part of GNU Emacs.
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
13
94653
e49abd957e81 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94313
diff changeset
14 ;; GNU Emacs is free software: you can redistribute it and/or modify
6736
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
15 ;; it under the terms of the GNU General Public License as published by
94653
e49abd957e81 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94313
diff changeset
16 ;; the Free Software Foundation, either version 3 of the License, or
e49abd957e81 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94313
diff changeset
17 ;; (at your option) any later version.
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18
6736
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
19 ;; 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
20 ;; 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
21 ;; 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
22 ;; 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
23
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
24 ;; You should have received a copy of the GNU General Public License
94653
e49abd957e81 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94313
diff changeset
25 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 ;;; Commentary:
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28
93485
bbd30b42485a (Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents: 93328
diff changeset
29 ;; See calendar.el.
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31 ;;; Code:
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32
93224
e800589311a9 Require calendar rather than declaring functions.
Glenn Morris <rgm@gnu.org>
parents: 93092
diff changeset
33 (require 'calendar)
86491
341f1d128c8b Comment.
Glenn Morris <rgm@gnu.org>
parents: 86445
diff changeset
34
96345
f0549aa8923b (cal-menu-sunmoon-menu): Rename from cal-menu-moon-menu. Add
Glenn Morris <rgm@gnu.org>
parents: 96317
diff changeset
35 (defconst cal-menu-sunmoon-menu
f0549aa8923b (cal-menu-sunmoon-menu): Rename from cal-menu-moon-menu. Add
Glenn Morris <rgm@gnu.org>
parents: 96317
diff changeset
36 '("Sun/Moon"
96356
9601e8a645ea (cal-menu-sunmoon-menu, cal-menu-global-mouse-menu): Update for lunar
Glenn Morris <rgm@gnu.org>
parents: 96345
diff changeset
37 ["Lunar Phases" calendar-lunar-phases]
96345
f0549aa8923b (cal-menu-sunmoon-menu): Rename from cal-menu-moon-menu. Add
Glenn Morris <rgm@gnu.org>
parents: 96317
diff changeset
38 ["Sunrise/sunset for cursor date" calendar-sunrise-sunset]
f0549aa8923b (cal-menu-sunmoon-menu): Rename from cal-menu-moon-menu. Add
Glenn Morris <rgm@gnu.org>
parents: 96317
diff changeset
39 ["Sunrise/sunset for cursor month" calendar-sunrise-sunset-month])
f0549aa8923b (cal-menu-sunmoon-menu): Rename from cal-menu-moon-menu. Add
Glenn Morris <rgm@gnu.org>
parents: 96317
diff changeset
40 "Key map for \"Sun/Moon\" menu in the calendar.")
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
41
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
42 (defconst cal-menu-diary-menu
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
43 '("Diary"
93793
5c3eedca8e41 Update for diary-lib name changes.
Glenn Morris <rgm@gnu.org>
parents: 93742
diff changeset
44 ["Other File" diary-view-other-diary-entries]
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
45 ["Cursor Date" diary-view-entries]
93793
5c3eedca8e41 Update for diary-lib name changes.
Glenn Morris <rgm@gnu.org>
parents: 93742
diff changeset
46 ["Mark All" diary-mark-entries]
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
47 ["Show All" diary-show-all-entries]
93793
5c3eedca8e41 Update for diary-lib name changes.
Glenn Morris <rgm@gnu.org>
parents: 93742
diff changeset
48 ["Insert Diary Entry" diary-insert-entry]
5c3eedca8e41 Update for diary-lib name changes.
Glenn Morris <rgm@gnu.org>
parents: 93742
diff changeset
49 ["Insert Weekly" diary-insert-weekly-entry]
5c3eedca8e41 Update for diary-lib name changes.
Glenn Morris <rgm@gnu.org>
parents: 93742
diff changeset
50 ["Insert Monthly" diary-insert-monthly-entry]
5c3eedca8e41 Update for diary-lib name changes.
Glenn Morris <rgm@gnu.org>
parents: 93742
diff changeset
51 ["Insert Yearly" diary-insert-yearly-entry]
5c3eedca8e41 Update for diary-lib name changes.
Glenn Morris <rgm@gnu.org>
parents: 93742
diff changeset
52 ["Insert Anniversary" diary-insert-anniversary-entry]
5c3eedca8e41 Update for diary-lib name changes.
Glenn Morris <rgm@gnu.org>
parents: 93742
diff changeset
53 ["Insert Block" diary-insert-block-entry]
5c3eedca8e41 Update for diary-lib name changes.
Glenn Morris <rgm@gnu.org>
parents: 93742
diff changeset
54 ["Insert Cyclic" diary-insert-cyclic-entry]
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
55 ("Insert Baha'i"
84592
a2988c19b72c (cal-menu-diary-menu, cal-menu-goto-menu):
Glenn Morris <rgm@gnu.org>
parents: 84553
diff changeset
56 ["One time" diary-bahai-insert-entry]
a2988c19b72c (cal-menu-diary-menu, cal-menu-goto-menu):
Glenn Morris <rgm@gnu.org>
parents: 84553
diff changeset
57 ["Monthly" diary-bahai-insert-monthly-entry]
a2988c19b72c (cal-menu-diary-menu, cal-menu-goto-menu):
Glenn Morris <rgm@gnu.org>
parents: 84553
diff changeset
58 ["Yearly" diary-bahai-insert-yearly-entry])
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
59 ("Insert Islamic"
93649
498835e424c8 Update for iso, islamic, julian, mayan, persian name changes.
Glenn Morris <rgm@gnu.org>
parents: 93485
diff changeset
60 ["One time" diary-islamic-insert-entry]
498835e424c8 Update for iso, islamic, julian, mayan, persian name changes.
Glenn Morris <rgm@gnu.org>
parents: 93485
diff changeset
61 ["Monthly" diary-islamic-insert-monthly-entry]
498835e424c8 Update for iso, islamic, julian, mayan, persian name changes.
Glenn Morris <rgm@gnu.org>
parents: 93485
diff changeset
62 ["Yearly" diary-islamic-insert-yearly-entry])
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
63 ("Insert Hebrew"
93742
370289920262 Update for chinese and hebrew name changes.
Glenn Morris <rgm@gnu.org>
parents: 93718
diff changeset
64 ["One time" diary-hebrew-insert-entry]
94313
17765ebde76c (cal-menu-diary-menu): Fix typo.
Glenn Morris <rgm@gnu.org>
parents: 93843
diff changeset
65 ["Monthly" diary-hebrew-insert-monthly-entry]
96297
7653ed8392c5 (cal-menu-moon-menu, cal-menu-diary-menu, cal-menu-holidays-menu)
Glenn Morris <rgm@gnu.org>
parents: 96067
diff changeset
66 ["Yearly" diary-hebrew-insert-yearly-entry]))
7653ed8392c5 (cal-menu-moon-menu, cal-menu-diary-menu, cal-menu-holidays-menu)
Glenn Morris <rgm@gnu.org>
parents: 96067
diff changeset
67 "Key map for \"Diary\" menu in the calendar.")
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
68
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
69 (defun cal-menu-holiday-window-suffix ()
92647
8b4648ec6f76 (cal-menu-holiday-window-suffix)
Glenn Morris <rgm@gnu.org>
parents: 92549
diff changeset
70 "Return a string suffix for the \"Window\" entry in `cal-menu-holidays-menu'."
93809
3ff2b47de8f2 Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents: 93793
diff changeset
71 (let ((my1 (calendar-increment-month-cons -1))
3ff2b47de8f2 Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents: 93793
diff changeset
72 (my2 (calendar-increment-month-cons 1)))
96067
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
73 ;; Mon1-Mon2, Year or Mon1, Year1-Mon2, Year2.
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
74 (format "%s%s-%s, %d"
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
75 (calendar-month-name (car my1) 'abbrev)
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
76 (if (= (cdr my1) (cdr my2))
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
77 ""
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
78 (format ", %d" (cdr my1)))
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
79 (calendar-month-name (car my2) 'abbrev)
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
80 (cdr my2))))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
81
93809
3ff2b47de8f2 Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents: 93793
diff changeset
82 (defvar displayed-year) ; from calendar-generate
92907
d89709effe07 (displayed-year): Move declaration where needed.
Glenn Morris <rgm@gnu.org>
parents: 92854
diff changeset
83
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
84 (defconst cal-menu-holidays-menu
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
85 `("Holidays"
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
86 ["For Cursor Date -" calendar-cursor-holidays
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
87 :suffix (calendar-date-string (calendar-cursor-to-date) t t)
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
88 :visible (calendar-cursor-to-date)]
84553
383791965ba9 Rename all list-calendar-holidays callers to calendar-list-holidays,
Glenn Morris <rgm@gnu.org>
parents: 82202
diff changeset
89 ["For Window -" calendar-list-holidays
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
90 :suffix (cal-menu-holiday-window-suffix)]
96067
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
91 ["For Today -" (calendar-cursor-holidays (calendar-current-date))
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
92 :suffix (calendar-date-string (calendar-current-date) t t)]
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
93 "--"
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
94 ,@(let ((l ()))
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
95 ;; Show 11 years--5 before, 5 after year of middle month.
87769
d62f6920cb4d (cal-menu-holidays-menu): Comment update.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 87649
diff changeset
96 ;; We used to use :suffix rather than :label and bumped into
d62f6920cb4d (cal-menu-holidays-menu): Comment update.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 87649
diff changeset
97 ;; an easymenu bug:
86445
8385b57c5ce6 (cal-menu-holidays-menu): Use :label rather than :suffix.
Glenn Morris <rgm@gnu.org>
parents: 86430
diff changeset
98 ;; http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01813.html
87769
d62f6920cb4d (cal-menu-holidays-menu): Comment update.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 87649
diff changeset
99 ;; The bug has since been fixed.
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
100 (dotimes (i 11)
86445
8385b57c5ce6 (cal-menu-holidays-menu): Use :label rather than :suffix.
Glenn Morris <rgm@gnu.org>
parents: 86430
diff changeset
101 (push (vector (format "hol-year-%d" i)
86430
4c73f7497804 Revert previous commit, made without ChangeLog entry.
Glenn Morris <rgm@gnu.org>
parents: 86414
diff changeset
102 `(lambda ()
4c73f7497804 Revert previous commit, made without ChangeLog entry.
Glenn Morris <rgm@gnu.org>
parents: 86414
diff changeset
103 (interactive)
93328
15b0834c93df (cal-menu-holidays-menu, cal-menu-list-holidays-year)
Glenn Morris <rgm@gnu.org>
parents: 93224
diff changeset
104 (holiday-list (+ displayed-year ,(- i 5))))
86445
8385b57c5ce6 (cal-menu-holidays-menu): Use :label rather than :suffix.
Glenn Morris <rgm@gnu.org>
parents: 86430
diff changeset
105 :label `(format "For Year %d"
8385b57c5ce6 (cal-menu-holidays-menu): Use :label rather than :suffix.
Glenn Morris <rgm@gnu.org>
parents: 86430
diff changeset
106 (+ displayed-year ,(- i 5))))
86430
4c73f7497804 Revert previous commit, made without ChangeLog entry.
Glenn Morris <rgm@gnu.org>
parents: 86414
diff changeset
107 l))
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
108 (nreverse l))
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
109 "--"
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
110 ["Unmark Calendar" calendar-unmark]
96297
7653ed8392c5 (cal-menu-moon-menu, cal-menu-diary-menu, cal-menu-holidays-menu)
Glenn Morris <rgm@gnu.org>
parents: 96067
diff changeset
111 ["Mark Holidays" calendar-mark-holidays])
7653ed8392c5 (cal-menu-moon-menu, cal-menu-diary-menu, cal-menu-holidays-menu)
Glenn Morris <rgm@gnu.org>
parents: 96067
diff changeset
112 "Key map for \"Holidays\" menu in the calendar.")
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
113
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
114 (defconst cal-menu-goto-menu
96345
f0549aa8923b (cal-menu-sunmoon-menu): Rename from cal-menu-moon-menu. Add
Glenn Morris <rgm@gnu.org>
parents: 96317
diff changeset
115 '("Goto"
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
116 ["Today" calendar-goto-today]
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
117 ["Beginning of Week" calendar-beginning-of-week]
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
118 ["End of Week" calendar-end-of-week]
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
119 ["Beginning of Month" calendar-beginning-of-month]
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
120 ["End of Month" calendar-end-of-month]
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
121 ["Beginning of Year" calendar-beginning-of-year]
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
122 ["End of Year" calendar-end-of-year]
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
123 ["Other Date" calendar-goto-date]
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
124 ["Day of Year" calendar-goto-day-of-year]
93649
498835e424c8 Update for iso, islamic, julian, mayan, persian name changes.
Glenn Morris <rgm@gnu.org>
parents: 93485
diff changeset
125 ["ISO Week" calendar-iso-goto-week]
498835e424c8 Update for iso, islamic, julian, mayan, persian name changes.
Glenn Morris <rgm@gnu.org>
parents: 93485
diff changeset
126 ["ISO Date" calendar-iso-goto-date]
498835e424c8 Update for iso, islamic, julian, mayan, persian name changes.
Glenn Morris <rgm@gnu.org>
parents: 93485
diff changeset
127 ["Astronomical Date" calendar-astro-goto-day-number]
93742
370289920262 Update for chinese and hebrew name changes.
Glenn Morris <rgm@gnu.org>
parents: 93718
diff changeset
128 ["Hebrew Date" calendar-hebrew-goto-date]
93649
498835e424c8 Update for iso, islamic, julian, mayan, persian name changes.
Glenn Morris <rgm@gnu.org>
parents: 93485
diff changeset
129 ["Persian Date" calendar-persian-goto-date]
84592
a2988c19b72c (cal-menu-diary-menu, cal-menu-goto-menu):
Glenn Morris <rgm@gnu.org>
parents: 84553
diff changeset
130 ["Baha'i Date" calendar-bahai-goto-date]
93649
498835e424c8 Update for iso, islamic, julian, mayan, persian name changes.
Glenn Morris <rgm@gnu.org>
parents: 93485
diff changeset
131 ["Islamic Date" calendar-islamic-goto-date]
498835e424c8 Update for iso, islamic, julian, mayan, persian name changes.
Glenn Morris <rgm@gnu.org>
parents: 93485
diff changeset
132 ["Julian Date" calendar-julian-goto-date]
93742
370289920262 Update for chinese and hebrew name changes.
Glenn Morris <rgm@gnu.org>
parents: 93718
diff changeset
133 ["Chinese Date" calendar-chinese-goto-date]
93718
2b79fd9755d7 Update for coptic and french name changes.
Glenn Morris <rgm@gnu.org>
parents: 93649
diff changeset
134 ["Coptic Date" calendar-coptic-goto-date]
2b79fd9755d7 Update for coptic and french name changes.
Glenn Morris <rgm@gnu.org>
parents: 93649
diff changeset
135 ["Ethiopic Date" calendar-ethiopic-goto-date]
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
136 ("Mayan Date"
93649
498835e424c8 Update for iso, islamic, julian, mayan, persian name changes.
Glenn Morris <rgm@gnu.org>
parents: 93485
diff changeset
137 ["Next Tzolkin" calendar-mayan-next-tzolkin-date]
498835e424c8 Update for iso, islamic, julian, mayan, persian name changes.
Glenn Morris <rgm@gnu.org>
parents: 93485
diff changeset
138 ["Previous Tzolkin" calendar-mayan-previous-tzolkin-date]
498835e424c8 Update for iso, islamic, julian, mayan, persian name changes.
Glenn Morris <rgm@gnu.org>
parents: 93485
diff changeset
139 ["Next Haab" calendar-mayan-next-haab-date]
498835e424c8 Update for iso, islamic, julian, mayan, persian name changes.
Glenn Morris <rgm@gnu.org>
parents: 93485
diff changeset
140 ["Previous Haab" calendar-mayan-previous-haab-date]
498835e424c8 Update for iso, islamic, julian, mayan, persian name changes.
Glenn Morris <rgm@gnu.org>
parents: 93485
diff changeset
141 ["Next Round" calendar-mayan-next-round-date]
498835e424c8 Update for iso, islamic, julian, mayan, persian name changes.
Glenn Morris <rgm@gnu.org>
parents: 93485
diff changeset
142 ["Previous Round" calendar-mayan-previous-round-date])
96297
7653ed8392c5 (cal-menu-moon-menu, cal-menu-diary-menu, cal-menu-holidays-menu)
Glenn Morris <rgm@gnu.org>
parents: 96067
diff changeset
143 ["French Date" calendar-french-goto-date])
96345
f0549aa8923b (cal-menu-sunmoon-menu): Rename from cal-menu-moon-menu. Add
Glenn Morris <rgm@gnu.org>
parents: 96317
diff changeset
144 "Key map for \"Goto\" menu in the calendar.")
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
145
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
146 (defconst cal-menu-scroll-menu
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
147 '("Scroll"
82149
2914fd1abc3e (cal-menu-scroll-menu, cal-menu-global-mouse-menu): Use new names.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 82140
diff changeset
148 ["Forward 1 Month" calendar-scroll-left]
2914fd1abc3e (cal-menu-scroll-menu, cal-menu-global-mouse-menu): Use new names.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 82140
diff changeset
149 ["Forward 3 Months" calendar-scroll-left-three-months]
94313
17765ebde76c (cal-menu-diary-menu): Fix typo.
Glenn Morris <rgm@gnu.org>
parents: 93843
diff changeset
150 ["Forward 1 Year" (calendar-scroll-left 12) :keys "4 C-v"]
82149
2914fd1abc3e (cal-menu-scroll-menu, cal-menu-global-mouse-menu): Use new names.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 82140
diff changeset
151 ["Backward 1 Month" calendar-scroll-right]
2914fd1abc3e (cal-menu-scroll-menu, cal-menu-global-mouse-menu): Use new names.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 82140
diff changeset
152 ["Backward 3 Months" calendar-scroll-right-three-months]
96297
7653ed8392c5 (cal-menu-moon-menu, cal-menu-diary-menu, cal-menu-holidays-menu)
Glenn Morris <rgm@gnu.org>
parents: 96067
diff changeset
153 ["Backward 1 Year" (calendar-scroll-right 12) :keys "4 M-v"])
7653ed8392c5 (cal-menu-moon-menu, cal-menu-diary-menu, cal-menu-holidays-menu)
Glenn Morris <rgm@gnu.org>
parents: 96067
diff changeset
154 "Key map for \"Scroll\" menu in the calendar.")
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
155
97422
6e551caf98f6 Add declarations for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 96356
diff changeset
156 (declare-function x-popup-menu "xmenu.c" (position menu))
6e551caf98f6 Add declarations for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 96356
diff changeset
157
96067
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
158 (defmacro cal-menu-x-popup-menu (event title &rest body)
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
159 "Call `x-popup-menu' at position EVENT, with TITLE and contents BODY.
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
160 Signals an error if popups are unavailable."
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
161 (declare (indent 2))
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
162 `(if (display-popup-menus-p)
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
163 (x-popup-menu ,event (list ,title (append (list ,title) ,@body)))
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
164 (error "Popup menus are not available on this system")))
22031
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
165
93328
15b0834c93df (cal-menu-holidays-menu, cal-menu-list-holidays-year)
Glenn Morris <rgm@gnu.org>
parents: 93224
diff changeset
166 (autoload 'diary-list-entries "diary-lib")
96317
1428d59cfd91 (calendar-check-holidays): Declare rather than autoloading.
Glenn Morris <rgm@gnu.org>
parents: 96314
diff changeset
167 ;; Autoloaded in diary-lib.
1428d59cfd91 (calendar-check-holidays): Declare rather than autoloading.
Glenn Morris <rgm@gnu.org>
parents: 96314
diff changeset
168 (declare-function calendar-check-holidays "holidays" (date))
92549
389da10cb238 (holidays-in-diary-buffer): Declare for compiler.
Glenn Morris <rgm@gnu.org>
parents: 87769
diff changeset
169
66617
ed95f221960d (date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65919
diff changeset
170 (defun calendar-mouse-view-diary-entries (&optional date diary event)
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
171 "Pop up menu of diary entries for mouse-selected date.
92647
8b4648ec6f76 (cal-menu-holiday-window-suffix)
Glenn Morris <rgm@gnu.org>
parents: 92549
diff changeset
172 Use optional DATE and alternative file DIARY. EVENT is the event
93809
3ff2b47de8f2 Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents: 93793
diff changeset
173 that invoked this command. Shows holidays if `diary-show-holidays-flag'
92647
8b4648ec6f76 (cal-menu-holiday-window-suffix)
Glenn Morris <rgm@gnu.org>
parents: 92549
diff changeset
174 is non-nil."
66617
ed95f221960d (date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65919
diff changeset
175 (interactive "i\ni\ne")
96067
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
176 (let* ((date (or date (calendar-cursor-to-date nil event)))
93092
6c0dbddcd03a (calendar-other-dates): Declare it, and removes the declarations it replaces.
Glenn Morris <rgm@gnu.org>
parents: 92962
diff changeset
177 (diary-file (or diary diary-file))
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
178 (diary-list-include-blanks nil)
96067
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
179 (diary-entries (mapcar (lambda (x) (split-string (cadr x) "\n"))
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
180 (diary-list-entries date 1 'list-only)))
93809
3ff2b47de8f2 Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents: 93793
diff changeset
181 (holidays (if diary-show-holidays-flag
84553
383791965ba9 Rename all list-calendar-holidays callers to calendar-list-holidays,
Glenn Morris <rgm@gnu.org>
parents: 82202
diff changeset
182 (calendar-check-holidays date)))
96067
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
183 (title (format "Diary entries%s for %s"
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
184 (if diary (format " from %s" diary) "")
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
185 (calendar-date-string date)))
96067
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
186 (selection (cal-menu-x-popup-menu event title
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
187 (mapcar (lambda (x) (list (concat " " x))) holidays)
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
188 (if holidays
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
189 (list "--shadow-etched-in" "--shadow-etched-in"))
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
190 (if diary-entries
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
191 (mapcar 'list (apply 'append diary-entries))
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
192 '("None")))))
22413
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
193 (and selection (call-interactively selection))))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
194
96067
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
195 (defun calendar-mouse-view-other-diary-entries (&optional event)
22413
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
196 "Pop up menu of diary entries from alternative file on mouse-selected date."
96067
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
197 (interactive "e")
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
198 (calendar-mouse-view-diary-entries
96067
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
199 (calendar-cursor-to-date nil event)
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
200 (read-file-name "Enter diary file name: " default-directory nil t)
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
201 event))
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
202
92647
8b4648ec6f76 (cal-menu-holiday-window-suffix)
Glenn Morris <rgm@gnu.org>
parents: 92549
diff changeset
203 (defun cal-menu-set-date-title (menu)
8b4648ec6f76 (cal-menu-holiday-window-suffix)
Glenn Morris <rgm@gnu.org>
parents: 92549
diff changeset
204 "Convert date of last event to title suitable for MENU."
8b4648ec6f76 (cal-menu-holiday-window-suffix)
Glenn Morris <rgm@gnu.org>
parents: 92549
diff changeset
205 (easy-menu-filter-return
96067
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
206 menu (calendar-date-string (calendar-cursor-to-date t last-input-event)
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
207 t nil)))
92647
8b4648ec6f76 (cal-menu-holiday-window-suffix)
Glenn Morris <rgm@gnu.org>
parents: 92549
diff changeset
208
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
209 (easy-menu-define cal-menu-context-mouse-menu 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
210 "Pop up menu for Mouse-2 for selected date in the calendar window."
93843
61357badb5fa (cal-menu-event-to-date): Rename calendar-event-to-date. Update callers.
Glenn Morris <rgm@gnu.org>
parents: 93809
diff changeset
211 '("cal-menu-mouse2" :filter cal-menu-set-date-title
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
212 "--"
96304
b56931e7df3b (calendar-mouse-holidays): Remove function.
Glenn Morris <rgm@gnu.org>
parents: 96297
diff changeset
213 ["Holidays" calendar-cursor-holidays]
96047
65c4c935e492 * calendar/calendar.el (calendar-cursor-to-date): Add argument `event'.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 95415
diff changeset
214 ["Mark date" calendar-set-mark]
65c4c935e492 * calendar/calendar.el (calendar-cursor-to-date): Add argument `event'.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 95415
diff changeset
215 ["Sunrise/sunset" calendar-sunrise-sunset]
96297
7653ed8392c5 (cal-menu-moon-menu, cal-menu-diary-menu, cal-menu-holidays-menu)
Glenn Morris <rgm@gnu.org>
parents: 96067
diff changeset
216 ["Other calendars" calendar-print-other-dates]
96304
b56931e7df3b (calendar-mouse-holidays): Remove function.
Glenn Morris <rgm@gnu.org>
parents: 96297
diff changeset
217 ;; FIXME there is a bug (#447) with last-nonmenu-event and submenus.
96067
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
218 ;; These currently don't work if called without calendar window selected.
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
219 ("Prepare LaTeX buffer"
96067
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
220 ["Daily (1 page)" cal-tex-cursor-day]
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
221 ["Weekly (1 page)" cal-tex-cursor-week]
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
222 ["Weekly (2 pages)" cal-tex-cursor-week2]
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
223 ["Weekly (other style; 1 page)" cal-tex-cursor-week-iso]
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
224 ["Weekly (yet another style; 1 page)" cal-tex-cursor-week-monday]
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
225 ["Monthly" cal-tex-cursor-month]
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
226 ["Monthly (landscape)" cal-tex-cursor-month-landscape]
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
227 ["Yearly" cal-tex-cursor-year]
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
228 ["Yearly (landscape)" cal-tex-cursor-year-landscape]
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
229 ("Filofax styles"
96067
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
230 ["Filofax Daily (one-day-per-page)" cal-tex-cursor-filofax-daily]
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
231 ["Filofax Weekly (2-weeks-at-a-glance)" cal-tex-cursor-filofax-2week]
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
232 ["Filofax Weekly (week-at-a-glance)" cal-tex-cursor-filofax-week]
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
233 ["Filofax Yearly" cal-tex-cursor-filofax-year]))
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
234 ("Write HTML calendar"
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
235 ["For selected month" cal-html-cursor-month]
e2c64ca546da (cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents: 96047
diff changeset
236 ["For selected year" cal-html-cursor-year])
96307
fd9cd4ce5935 (cal-menu-context-mouse-menu): Add some :keys.
Glenn Morris <rgm@gnu.org>
parents: 96304
diff changeset
237 ["Diary entries" calendar-mouse-view-diary-entries :keys "d"]
96047
65c4c935e492 * calendar/calendar.el (calendar-cursor-to-date): Add argument `event'.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 95415
diff changeset
238 ["Insert diary entry" diary-insert-entry]
96307
fd9cd4ce5935 (cal-menu-context-mouse-menu): Add some :keys.
Glenn Morris <rgm@gnu.org>
parents: 96304
diff changeset
239 ["Other diary file entries" calendar-mouse-view-other-diary-entries
fd9cd4ce5935 (cal-menu-context-mouse-menu): Add some :keys.
Glenn Morris <rgm@gnu.org>
parents: 96304
diff changeset
240 :keys "D"]))
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
241
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
242 (easy-menu-define cal-menu-global-mouse-menu nil
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
243 "Menu bound to a mouse event, not specific to the mouse-click location."
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
244 '("Calendar"
82149
2914fd1abc3e (cal-menu-scroll-menu, cal-menu-global-mouse-menu): Use new names.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 82140
diff changeset
245 ["Scroll forward" calendar-scroll-left-three-months]
2914fd1abc3e (cal-menu-scroll-menu, cal-menu-global-mouse-menu): Use new names.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 82140
diff changeset
246 ["Scroll backward" calendar-scroll-right-three-months]
93793
5c3eedca8e41 Update for diary-lib name changes.
Glenn Morris <rgm@gnu.org>
parents: 93742
diff changeset
247 ["Mark diary entries" diary-mark-entries]
84553
383791965ba9 Rename all list-calendar-holidays callers to calendar-list-holidays,
Glenn Morris <rgm@gnu.org>
parents: 82202
diff changeset
248 ["List holidays" calendar-list-holidays]
383791965ba9 Rename all list-calendar-holidays callers to calendar-list-holidays,
Glenn Morris <rgm@gnu.org>
parents: 82202
diff changeset
249 ["Mark holidays" calendar-mark-holidays]
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
250 ["Unmark" calendar-unmark]
96356
9601e8a645ea (cal-menu-sunmoon-menu, cal-menu-global-mouse-menu): Update for lunar
Glenn Morris <rgm@gnu.org>
parents: 96345
diff changeset
251 ["Lunar phases" calendar-lunar-phases]
96345
f0549aa8923b (cal-menu-sunmoon-menu): Rename from cal-menu-moon-menu. Add
Glenn Morris <rgm@gnu.org>
parents: 96317
diff changeset
252 ["Sunrise times for month" calendar-sunrise-sunset-month]
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
253 ["Show diary" diary-show-all-entries]
93843
61357badb5fa (cal-menu-event-to-date): Rename calendar-event-to-date. Update callers.
Glenn Morris <rgm@gnu.org>
parents: 93809
diff changeset
254 ["Exit calendar" calendar-exit]))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
255
93092
6c0dbddcd03a (calendar-other-dates): Declare it, and removes the declarations it replaces.
Glenn Morris <rgm@gnu.org>
parents: 92962
diff changeset
256 ;; Undocumented and probably useless.
6c0dbddcd03a (calendar-other-dates): Declare it, and removes the declarations it replaces.
Glenn Morris <rgm@gnu.org>
parents: 92962
diff changeset
257 (defvar cal-menu-load-hook nil
6c0dbddcd03a (calendar-other-dates): Declare it, and removes the declarations it replaces.
Glenn Morris <rgm@gnu.org>
parents: 92962
diff changeset
258 "Hook run on loading of the `cal-menu' package.")
6c0dbddcd03a (calendar-other-dates): Declare it, and removes the declarations it replaces.
Glenn Morris <rgm@gnu.org>
parents: 92962
diff changeset
259 (make-obsolete-variable 'cal-menu-load-hook
6c0dbddcd03a (calendar-other-dates): Declare it, and removes the declarations it replaces.
Glenn Morris <rgm@gnu.org>
parents: 92962
diff changeset
260 "it will be removed in future." "23.1")
6c0dbddcd03a (calendar-other-dates): Declare it, and removes the declarations it replaces.
Glenn Morris <rgm@gnu.org>
parents: 92962
diff changeset
261
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
262 (run-hooks 'cal-menu-load-hook)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
263
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
264 (provide 'cal-menu)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
265
66617
ed95f221960d (date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65919
diff changeset
266 ;; arch-tag: aa81cf73-ce89-48a4-97ec-9ef861e87fe9
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
267 ;;; cal-menu.el ends here