Mercurial > emacs
annotate lisp/calendar/cal-menu.el @ 112218:376148b31b5e
Add 2011 to FSF/AIST copyright years.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sun, 02 Jan 2011 15:50:46 -0800 |
parents | 1d1d5d9bd884 |
children | 417b1e4d63cd |
rev | line source |
---|---|
5701 | 1 ;;; cal-menu.el --- calendar functions for menu bar and popup menu support |
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, |
112218
376148b31b5e
Add 2011 to FSF/AIST copyright years.
Glenn Morris <rgm@gnu.org>
parents:
106815
diff
changeset
|
4 ;; 2008, 2009, 2010, 2011 Free Software Foundation, Inc. |
5701 | 5 |
6 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> | |
92854 | 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 | 9 ;; Keywords: calendar |
10 ;; Human-Keywords: calendar, popup menus, menu bar | |
11 | |
12 ;; This file is part of GNU Emacs. | |
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 | 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 | 26 |
27 ;;; Commentary: | |
28 | |
93485
bbd30b42485a
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93328
diff
changeset
|
29 ;; See calendar.el. |
5701 | 30 |
31 ;;; Code: | |
32 | |
93224
e800589311a9
Require calendar rather than declaring functions.
Glenn Morris <rgm@gnu.org>
parents:
93092
diff
changeset
|
33 (require 'calendar) |
86491 | 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 | 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 | 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 | 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 | 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 | 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" |
105140
c9ff23f80f09
(cal-menu-scroll-menu): Add a sub-section with commands that move
Glenn Morris <rgm@gnu.org>
parents:
103976
diff
changeset
|
148 ["Scroll Commands" nil :help "Commands that scroll the visible window"] |
82149
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 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
|
150 ["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
|
151 ["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
|
152 ["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
|
153 ["Backward 3 Months" calendar-scroll-right-three-months] |
105140
c9ff23f80f09
(cal-menu-scroll-menu): Add a sub-section with commands that move
Glenn Morris <rgm@gnu.org>
parents:
103976
diff
changeset
|
154 ["Backward 1 Year" (calendar-scroll-right 12) :keys "4 M-v"] |
c9ff23f80f09
(cal-menu-scroll-menu): Add a sub-section with commands that move
Glenn Morris <rgm@gnu.org>
parents:
103976
diff
changeset
|
155 "--" |
c9ff23f80f09
(cal-menu-scroll-menu): Add a sub-section with commands that move
Glenn Morris <rgm@gnu.org>
parents:
103976
diff
changeset
|
156 ["Motion Commands" nil :help "Commands that move point"] |
c9ff23f80f09
(cal-menu-scroll-menu): Add a sub-section with commands that move
Glenn Morris <rgm@gnu.org>
parents:
103976
diff
changeset
|
157 ["Forward 1 Day" calendar-forward-day] |
c9ff23f80f09
(cal-menu-scroll-menu): Add a sub-section with commands that move
Glenn Morris <rgm@gnu.org>
parents:
103976
diff
changeset
|
158 ["Forward 1 Week" calendar-forward-week] |
c9ff23f80f09
(cal-menu-scroll-menu): Add a sub-section with commands that move
Glenn Morris <rgm@gnu.org>
parents:
103976
diff
changeset
|
159 ["Forward 1 Month" calendar-forward-month] |
c9ff23f80f09
(cal-menu-scroll-menu): Add a sub-section with commands that move
Glenn Morris <rgm@gnu.org>
parents:
103976
diff
changeset
|
160 ["Forward 1 Year" calendar-forward-year] |
c9ff23f80f09
(cal-menu-scroll-menu): Add a sub-section with commands that move
Glenn Morris <rgm@gnu.org>
parents:
103976
diff
changeset
|
161 ["Backward 1 Day" calendar-backward-day] |
c9ff23f80f09
(cal-menu-scroll-menu): Add a sub-section with commands that move
Glenn Morris <rgm@gnu.org>
parents:
103976
diff
changeset
|
162 ["Backward 1 Week" calendar-backward-week] |
c9ff23f80f09
(cal-menu-scroll-menu): Add a sub-section with commands that move
Glenn Morris <rgm@gnu.org>
parents:
103976
diff
changeset
|
163 ["Backward 1 Month" calendar-backward-month] |
c9ff23f80f09
(cal-menu-scroll-menu): Add a sub-section with commands that move
Glenn Morris <rgm@gnu.org>
parents:
103976
diff
changeset
|
164 ["Backward 1 Year" calendar-backward-year]) |
96297
7653ed8392c5
(cal-menu-moon-menu, cal-menu-diary-menu, cal-menu-holidays-menu)
Glenn Morris <rgm@gnu.org>
parents:
96067
diff
changeset
|
165 "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
|
166 |
105933
8f110099da5c
Update x-popup-menu declaration.
Glenn Morris <rgm@gnu.org>
parents:
105140
diff
changeset
|
167 (declare-function x-popup-menu "menu.c" (position menu)) |
97422
6e551caf98f6
Add declarations for builds without X.
Glenn Morris <rgm@gnu.org>
parents:
96356
diff
changeset
|
168 |
96067
e2c64ca546da
(cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents:
96047
diff
changeset
|
169 (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
|
170 "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
|
171 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
|
172 (declare (indent 2)) |
e2c64ca546da
(cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents:
96047
diff
changeset
|
173 `(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
|
174 (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
|
175 (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
|
176 |
93328
15b0834c93df
(cal-menu-holidays-menu, cal-menu-list-holidays-year)
Glenn Morris <rgm@gnu.org>
parents:
93224
diff
changeset
|
177 (autoload 'diary-list-entries "diary-lib") |
96317
1428d59cfd91
(calendar-check-holidays): Declare rather than autoloading.
Glenn Morris <rgm@gnu.org>
parents:
96314
diff
changeset
|
178 ;; Autoloaded in diary-lib. |
1428d59cfd91
(calendar-check-holidays): Declare rather than autoloading.
Glenn Morris <rgm@gnu.org>
parents:
96314
diff
changeset
|
179 (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
|
180 |
66617
ed95f221960d
(date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
65919
diff
changeset
|
181 (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
|
182 "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
|
183 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
|
184 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
|
185 is non-nil." |
66617
ed95f221960d
(date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
65919
diff
changeset
|
186 (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
|
187 (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
|
188 (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
|
189 (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
|
190 (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
|
191 (diary-list-entries date 1 'list-only))) |
93809
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93793
diff
changeset
|
192 (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
|
193 (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
|
194 (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
|
195 (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
|
196 (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
|
197 (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
|
198 (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
|
199 (if holidays |
e2c64ca546da
(cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents:
96047
diff
changeset
|
200 (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
|
201 (if diary-entries |
e2c64ca546da
(cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents:
96047
diff
changeset
|
202 (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
|
203 '("None"))))) |
22413
be2f536a1358
Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22365
diff
changeset
|
204 (and selection (call-interactively selection)))) |
5701 | 205 |
96067
e2c64ca546da
(cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents:
96047
diff
changeset
|
206 (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
|
207 "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
|
208 (interactive "e") |
52230
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
209 (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
|
210 (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
|
211 (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
|
212 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
|
213 |
103976
a1f42bc54ce3
(cal-menu-set-date-title): Handle calls from non-calendar buffers (Bug#3862).
Glenn Morris <rgm@gnu.org>
parents:
100970
diff
changeset
|
214 ;; In 22, the equivalent code gave an error when not called on a date, |
a1f42bc54ce3
(cal-menu-set-date-title): Handle calls from non-calendar buffers (Bug#3862).
Glenn Morris <rgm@gnu.org>
parents:
100970
diff
changeset
|
215 ;; but easymenu does not seem to allow this (?). |
a1f42bc54ce3
(cal-menu-set-date-title): Handle calls from non-calendar buffers (Bug#3862).
Glenn Morris <rgm@gnu.org>
parents:
100970
diff
changeset
|
216 ;; The ignore-errors is because `documentation' can end up calling |
a1f42bc54ce3
(cal-menu-set-date-title): Handle calls from non-calendar buffers (Bug#3862).
Glenn Morris <rgm@gnu.org>
parents:
100970
diff
changeset
|
217 ;; this in a non-calendar buffer where displayed-month is unbound. (Bug#3862) |
92647
8b4648ec6f76
(cal-menu-holiday-window-suffix)
Glenn Morris <rgm@gnu.org>
parents:
92549
diff
changeset
|
218 (defun cal-menu-set-date-title (menu) |
8b4648ec6f76
(cal-menu-holiday-window-suffix)
Glenn Morris <rgm@gnu.org>
parents:
92549
diff
changeset
|
219 "Convert date of last event to title suitable for MENU." |
103976
a1f42bc54ce3
(cal-menu-set-date-title): Handle calls from non-calendar buffers (Bug#3862).
Glenn Morris <rgm@gnu.org>
parents:
100970
diff
changeset
|
220 (let ((date (ignore-errors (calendar-cursor-to-date nil last-input-event)))) |
a1f42bc54ce3
(cal-menu-set-date-title): Handle calls from non-calendar buffers (Bug#3862).
Glenn Morris <rgm@gnu.org>
parents:
100970
diff
changeset
|
221 (if date |
a1f42bc54ce3
(cal-menu-set-date-title): Handle calls from non-calendar buffers (Bug#3862).
Glenn Morris <rgm@gnu.org>
parents:
100970
diff
changeset
|
222 (easy-menu-filter-return menu (calendar-date-string date t nil)) |
a1f42bc54ce3
(cal-menu-set-date-title): Handle calls from non-calendar buffers (Bug#3862).
Glenn Morris <rgm@gnu.org>
parents:
100970
diff
changeset
|
223 (message "Not on a date!") |
a1f42bc54ce3
(cal-menu-set-date-title): Handle calls from non-calendar buffers (Bug#3862).
Glenn Morris <rgm@gnu.org>
parents:
100970
diff
changeset
|
224 nil))) |
92647
8b4648ec6f76
(cal-menu-holiday-window-suffix)
Glenn Morris <rgm@gnu.org>
parents:
92549
diff
changeset
|
225 |
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
|
226 (easy-menu-define cal-menu-context-mouse-menu nil |
103976
a1f42bc54ce3
(cal-menu-set-date-title): Handle calls from non-calendar buffers (Bug#3862).
Glenn Morris <rgm@gnu.org>
parents:
100970
diff
changeset
|
227 "Pop up mouse menu for selected date in the calendar window." |
a1f42bc54ce3
(cal-menu-set-date-title): Handle calls from non-calendar buffers (Bug#3862).
Glenn Morris <rgm@gnu.org>
parents:
100970
diff
changeset
|
228 '("cal-menu-context-mouse-menu" :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
|
229 "--" |
96304
b56931e7df3b
(calendar-mouse-holidays): Remove function.
Glenn Morris <rgm@gnu.org>
parents:
96297
diff
changeset
|
230 ["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
|
231 ["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
|
232 ["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
|
233 ["Other calendars" calendar-print-other-dates] |
103976
a1f42bc54ce3
(cal-menu-set-date-title): Handle calls from non-calendar buffers (Bug#3862).
Glenn Morris <rgm@gnu.org>
parents:
100970
diff
changeset
|
234 ;; There was a bug (#447; fixed) with last-nonmenu-event and submenus. |
a1f42bc54ce3
(cal-menu-set-date-title): Handle calls from non-calendar buffers (Bug#3862).
Glenn Morris <rgm@gnu.org>
parents:
100970
diff
changeset
|
235 ;; These did not 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
|
236 ("Prepare LaTeX buffer" |
96067
e2c64ca546da
(cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents:
96047
diff
changeset
|
237 ["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
|
238 ["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
|
239 ["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
|
240 ["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
|
241 ["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
|
242 ["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
|
243 ["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
|
244 ["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
|
245 ["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
|
246 ("Filofax styles" |
96067
e2c64ca546da
(cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents:
96047
diff
changeset
|
247 ["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
|
248 ["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
|
249 ["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
|
250 ["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
|
251 ("Write HTML calendar" |
e2c64ca546da
(cal-menu-holidays-menu): Use calendar-cursor-holidays rather than
Glenn Morris <rgm@gnu.org>
parents:
96047
diff
changeset
|
252 ["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
|
253 ["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
|
254 ["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
|
255 ["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
|
256 ["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
|
257 :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
|
258 |
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
|
259 (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
|
260 "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
|
261 '("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
|
262 ["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
|
263 ["Scroll backward" calendar-scroll-right-three-months] |
93793
5c3eedca8e41
Update for diary-lib name changes.
Glenn Morris <rgm@gnu.org>
parents:
93742
diff
changeset
|
264 ["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
|
265 ["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
|
266 ["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
|
267 ["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
|
268 ["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
|
269 ["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
|
270 ["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
|
271 ["Exit calendar" calendar-exit])) |
5701 | 272 |
93092
6c0dbddcd03a
(calendar-other-dates): Declare it, and removes the declarations it replaces.
Glenn Morris <rgm@gnu.org>
parents:
92962
diff
changeset
|
273 ;; 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
|
274 (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
|
275 "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
|
276 (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
|
277 "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
|
278 |
5701 | 279 (run-hooks 'cal-menu-load-hook) |
280 | |
281 (provide 'cal-menu) | |
282 | |
66617
ed95f221960d
(date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
65919
diff
changeset
|
283 ;; arch-tag: aa81cf73-ce89-48a4-97ec-9ef861e87fe9 |
5701 | 284 ;;; cal-menu.el ends here |