Mercurial > emacs
annotate lisp/calendar/cal-menu.el @ 91322:fc05151881d9
Set font-shape-text for all Indic characters
in composition-function-table.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 07 Jan 2008 12:38:30 +0000 |
parents | 53108e6cea98 |
children | 606f2d163a64 |
rev | line source |
---|---|
5701 | 1 ;;; cal-menu.el --- calendar functions for menu bar and popup menu support |
2 | |
75346 | 3 ;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007 |
67464 | 4 ;; Free Software Foundation, Inc. |
5701 | 5 |
6 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> | |
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 | |
6736
3e1323443b1a
Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents:
5701
diff
changeset
|
14 ;; GNU Emacs is free software; you can redistribute it and/or modify |
3e1323443b1a
Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents:
5701
diff
changeset
|
15 ;; it under the terms of the GNU General Public License as published by |
78216
93e11478c954
Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents:
77279
diff
changeset
|
16 ;; the Free Software Foundation; either version 3, or (at your option) |
6736
3e1323443b1a
Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents:
5701
diff
changeset
|
17 ;; 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 |
14169 | 25 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
64085 | 26 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
27 ;; Boston, MA 02110-1301, USA. | |
5701 | 28 |
29 ;;; Commentary: | |
30 | |
31 ;; This collection of functions implements menu bar and popup menu support for | |
32 ;; calendar.el. | |
33 | |
34 ;;; Code: | |
35 | |
86491 | 36 ;; The code in this file is only called from calendar.el, but can't |
37 ;; require it (to supress undefined function warnings from compiler) | |
38 ;; without a recursive require. | |
86514 | 39 ;; All these functions are either autoloaded, or autoloaded or defined |
40 ;; in calendar.el. | |
41 (declare-function calendar-increment-month "calendar" (n &optional mon yr)) | |
42 (declare-function calendar-month-name "calendar" (month &optional abbrev)) | |
43 (declare-function extract-calendar-year "calendar" (date)) | |
44 (declare-function calendar-cursor-to-date "calendar" (&optional error)) | |
45 (declare-function holiday-list "holidays" (y1 y2 &optional l label)) | |
46 (declare-function calendar-sunrise-sunset "solar" nil) | |
47 (declare-function calendar-current-date "calendar" nil) | |
48 (declare-function calendar-cursor-holidays "holidays" nil) | |
49 (declare-function calendar-date-string "calendar" | |
50 (date &optional abbreviate nodayname)) | |
51 (declare-function insert-diary-entry "diary-lib" (arg)) | |
52 (declare-function calendar-set-mark "calendar" (arg)) | |
53 (declare-function cal-tex-cursor-day "cal-tex" (&optional arg)) | |
54 (declare-function cal-tex-cursor-week "cal-tex" (&optional arg)) | |
55 (declare-function cal-tex-cursor-week2 "cal-tex" (&optional arg)) | |
56 (declare-function cal-tex-cursor-week-iso "cal-tex" (&optional arg)) | |
57 (declare-function cal-tex-cursor-week-monday "cal-tex" (&optional arg)) | |
58 (declare-function cal-tex-cursor-filofax-daily "cal-tex" (&optional arg)) | |
59 (declare-function cal-tex-cursor-filofax-2week "cal-tex" (&optional arg)) | |
60 (declare-function cal-tex-cursor-filofax-week "cal-tex" (&optional arg)) | |
61 (declare-function cal-tex-cursor-month "cal-tex" (arg)) | |
62 (declare-function cal-tex-cursor-month-landscape "cal-tex" (&optional arg)) | |
63 (declare-function cal-tex-cursor-year "cal-tex" (&optional arg)) | |
64 (declare-function cal-tex-cursor-filofax-year "cal-tex" (&optional arg)) | |
65 (declare-function cal-tex-cursor-year-landscape "cal-tex" (&optional arg)) | |
66 (declare-function calendar-day-of-year-string "calendar" (&optional date)) | |
67 (declare-function calendar-iso-date-string "cal-iso" (&optional date)) | |
68 (declare-function calendar-julian-date-string "cal-julian" (&optional date)) | |
69 (declare-function calendar-astro-date-string "cal-julian" (&optional date)) | |
70 (declare-function calendar-absolute-from-gregorian "calendar" (date)) | |
71 (declare-function calendar-hebrew-date-string "cal-hebrew" (&optional date)) | |
72 (declare-function calendar-persian-date-string "cal-persia" (&optional date)) | |
73 (declare-function calendar-bahai-date-string "cal-bahai" (&optional date)) | |
74 (declare-function calendar-islamic-date-string "cal-islam" (&optional date)) | |
75 (declare-function calendar-chinese-date-string "cal-china" (&optional date)) | |
76 (declare-function calendar-coptic-date-string "cal-coptic" (&optional date)) | |
77 (declare-function calendar-ethiopic-date-string "cal-coptic" (&optional date)) | |
78 (declare-function calendar-french-date-string "cal-french" (&optional date)) | |
79 (declare-function calendar-mayan-date-string "cal-mayan" (&optional date)) | |
80 (declare-function calendar-print-chinese-date "cal-china" nil) | |
81 (declare-function calendar-goto-date "cal-move" (date)) | |
86491 | 82 |
52116
3132ffb5a7ab
(displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents:
50465
diff
changeset
|
83 (defvar displayed-year) |
3132ffb5a7ab
(displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents:
50465
diff
changeset
|
84 |
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
|
85 (defconst cal-menu-moon-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
|
86 '("Moon" |
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 ["Lunar Phases" calendar-phases-of-moon])) |
5701 | 88 |
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
|
89 (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
|
90 '("Diary" |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
91 ["Other File" view-other-diary-entries] |
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 ["Cursor Date" diary-view-entries] |
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 ["Mark All" mark-diary-entries] |
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 ["Show All" diary-show-all-entries] |
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 ["Insert Diary Entry" insert-diary-entry] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
96 ["Insert Weekly" insert-weekly-diary-entry] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
97 ["Insert Monthly" insert-monthly-diary-entry] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
98 ["Insert Yearly" insert-yearly-diary-entry] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
99 ["Insert Anniversary" insert-anniversary-diary-entry] |
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 ["Insert Block" insert-block-diary-entry] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
101 ["Insert Cyclic" insert-cyclic-diary-entry] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
102 ("Insert Baha'i" |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
103 [" " nil :suffix (calendar-bahai-date-string (calendar-cursor-to-date))] |
84592
a2988c19b72c
(cal-menu-diary-menu, cal-menu-goto-menu):
Glenn Morris <rgm@gnu.org>
parents:
84553
diff
changeset
|
104 ["One time" diary-bahai-insert-entry] |
a2988c19b72c
(cal-menu-diary-menu, cal-menu-goto-menu):
Glenn Morris <rgm@gnu.org>
parents:
84553
diff
changeset
|
105 ["Monthly" diary-bahai-insert-monthly-entry] |
a2988c19b72c
(cal-menu-diary-menu, cal-menu-goto-menu):
Glenn Morris <rgm@gnu.org>
parents:
84553
diff
changeset
|
106 ["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
|
107 ("Insert Islamic" |
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 [" " nil :suffix (calendar-islamic-date-string (calendar-cursor-to-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
|
109 ["One time" insert-islamic-diary-entry] |
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 ["Monthly" insert-monthly-islamic-diary-entry] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
111 ["Yearly" insert-yearly-islamic-diary-entry]) |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
112 ("Insert Hebrew" |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
113 [" " nil :suffix (calendar-hebrew-date-string (calendar-cursor-to-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
|
114 ["One time" insert-hebrew-diary-entry] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
115 ["Monthly" insert-monthly-hebrew-diary-entry] |
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 ["Yearly" insert-yearly-hebrew-diary-entry]))) |
5701 | 117 |
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
|
118 (defun cal-menu-holiday-window-suffix () |
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 (let ((my1 (calendar-increment-month -1)) |
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 (my2 (calendar-increment-month 1))) |
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 (if (= (cdr my1) (cdr my2)) |
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 (format "%s-%s, %d" |
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 (calendar-month-name (car my1) 'abbrev) |
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 (calendar-month-name (car my2) 'abbrev) |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
125 (cdr my2)) |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
126 (format "%s, %d-%s, %d" |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
127 (calendar-month-name (car my1) 'abbrev) |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
128 (cdr my1) |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
129 (calendar-month-name (car my2) 'abbrev) |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
130 (cdr my2))))) |
5701 | 131 |
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
|
132 (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
|
133 `("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
|
134 ["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
|
135 :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
|
136 :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
|
137 ["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
|
138 :suffix (cal-menu-holiday-window-suffix)] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
139 ["For Today -" cal-menu-today-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
|
140 :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
|
141 "--" |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
142 ,@(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
|
143 ;; Show 11 years--5 before, 5 after year of middle month. |
86445
8385b57c5ce6
(cal-menu-holidays-menu): Use :label rather than :suffix.
Glenn Morris <rgm@gnu.org>
parents:
86430
diff
changeset
|
144 ;; http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01813.html |
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
|
145 (dotimes (i 11) |
86445
8385b57c5ce6
(cal-menu-holidays-menu): Use :label rather than :suffix.
Glenn Morris <rgm@gnu.org>
parents:
86430
diff
changeset
|
146 (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
|
147 `(lambda () |
4c73f7497804
Revert previous commit, made without ChangeLog entry.
Glenn Morris <rgm@gnu.org>
parents:
86414
diff
changeset
|
148 (interactive) |
4c73f7497804
Revert previous commit, made without ChangeLog entry.
Glenn Morris <rgm@gnu.org>
parents:
86414
diff
changeset
|
149 (holiday-list (+ displayed-year ,(- i 5)) |
4c73f7497804
Revert previous commit, made without ChangeLog entry.
Glenn Morris <rgm@gnu.org>
parents:
86414
diff
changeset
|
150 (+ displayed-year ,(- i 5)))) |
86445
8385b57c5ce6
(cal-menu-holidays-menu): Use :label rather than :suffix.
Glenn Morris <rgm@gnu.org>
parents:
86430
diff
changeset
|
151 :label `(format "For Year %d" |
8385b57c5ce6
(cal-menu-holidays-menu): Use :label rather than :suffix.
Glenn Morris <rgm@gnu.org>
parents:
86430
diff
changeset
|
152 (+ displayed-year ,(- i 5)))) |
86430
4c73f7497804
Revert previous commit, made without ChangeLog entry.
Glenn Morris <rgm@gnu.org>
parents:
86414
diff
changeset
|
153 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
|
154 (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
|
155 "--" |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
156 ["Unmark Calendar" calendar-unmark] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
157 ["Mark Holidays" mark-calendar-holidays])) |
5701 | 158 |
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
|
159 (defconst cal-menu-goto-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
|
160 '("Goto" |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
161 ["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
|
162 ["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
|
163 ["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
|
164 ["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
|
165 ["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
|
166 ["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
|
167 ["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
|
168 ["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
|
169 ["Day of Year" calendar-goto-day-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
|
170 ["ISO Week" calendar-goto-iso-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
|
171 ["ISO Date" calendar-goto-iso-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
|
172 ["Astronomical Date" calendar-goto-astro-day-number] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
173 ["Hebrew Date" calendar-goto-hebrew-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
|
174 ["Persian Date" calendar-goto-persian-date] |
84592
a2988c19b72c
(cal-menu-diary-menu, cal-menu-goto-menu):
Glenn Morris <rgm@gnu.org>
parents:
84553
diff
changeset
|
175 ["Baha'i Date" calendar-bahai-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
|
176 ["Islamic Date" calendar-goto-islamic-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
|
177 ["Julian Date" calendar-goto-julian-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
|
178 ["Chinese Date" calendar-goto-chinese-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
|
179 ["Coptic Date" calendar-goto-coptic-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
|
180 ["Ethiopic Date" calendar-goto-ethiopic-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
|
181 ("Mayan 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
|
182 ["Next Tzolkin" calendar-next-tzolkin-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
|
183 ["Previous Tzolkin" calendar-previous-tzolkin-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
|
184 ["Next Haab" calendar-next-haab-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
|
185 ["Previous Haab" calendar-previous-haab-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
|
186 ["Next Round" calendar-next-calendar-round-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
|
187 ["Previous Round" calendar-previous-calendar-round-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
|
188 ["French Date" calendar-goto-french-date])) |
5701 | 189 |
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
|
190 (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
|
191 '("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
|
192 ["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
|
193 ["Forward 3 Months" calendar-scroll-left-three-months] |
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
|
194 ["Forward 1 Year" "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
|
195 ["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
|
196 ["Backward 3 Months" calendar-scroll-right-three-months] |
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
|
197 ["Backward 1 Year" "4\ev"])) |
52230
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
198 |
39524
291264d596e9
(cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents:
39133
diff
changeset
|
199 (defun cal-menu-x-popup-menu (position menu) |
291264d596e9
(cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents:
39133
diff
changeset
|
200 "Like `x-popup-menu', but prints an error message if popup menus are |
291264d596e9
(cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents:
39133
diff
changeset
|
201 not available." |
291264d596e9
(cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents:
39133
diff
changeset
|
202 (if (display-popup-menus-p) |
291264d596e9
(cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents:
39133
diff
changeset
|
203 (x-popup-menu position menu) |
45058
5413ef3a62a3
(cal-menu-x-popup-menu): Fix argument of error call.
Pavel Janík <Pavel@Janik.cz>
parents:
43195
diff
changeset
|
204 (error "Popup menus are not available on this system"))) |
39524
291264d596e9
(cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents:
39133
diff
changeset
|
205 |
17667
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
206 (defun cal-menu-list-holidays-year () |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
207 "Display a list of the holidays of the selected date's year." |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
208 (interactive) |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
209 (let ((year (extract-calendar-year (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
|
210 (holiday-list year year))) |
17667
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
211 |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
212 (defun cal-menu-list-holidays-following-year () |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
213 "Display a list of the holidays of the following year." |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
214 (interactive) |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
215 (let ((year (1+ (extract-calendar-year (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
|
216 (holiday-list year year))) |
17667
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
217 |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
218 (defun cal-menu-list-holidays-previous-year () |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
219 "Display a list of the holidays of the previous year." |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
220 (interactive) |
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
221 (let ((year (1- (extract-calendar-year (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
|
222 (holiday-list year year))) |
17667
fd527e9aa377
(cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents:
17553
diff
changeset
|
223 |
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
|
224 (defun calendar-event-to-date (&optional error) |
27fdaecd7cb1
(calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
7412
diff
changeset
|
225 "Date of last event. |
27fdaecd7cb1
(calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
7412
diff
changeset
|
226 If event is not on a specific date, signals an error if optional parameter |
27fdaecd7cb1
(calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
7412
diff
changeset
|
227 ERROR is t, otherwise just returns nil." |
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
|
228 (with-current-buffer |
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 (window-buffer (posn-window (event-start last-input-event))) |
5701 | 230 (goto-char (posn-point (event-start last-input-event))) |
7442
27fdaecd7cb1
(calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
7412
diff
changeset
|
231 (calendar-cursor-to-date error))) |
5701 | 232 |
233 (defun calendar-mouse-sunrise/sunset () | |
234 "Show sunrise/sunset times for mouse-selected date." | |
235 (interactive) | |
236 (save-excursion | |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
237 (calendar-mouse-goto-date (calendar-event-to-date)) |
5701 | 238 (calendar-sunrise-sunset))) |
239 | |
22031
879df83433a1
Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22027
diff
changeset
|
240 (defun cal-menu-today-holidays () |
879df83433a1
Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22027
diff
changeset
|
241 "Show holidays for today's date." |
879df83433a1
Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22027
diff
changeset
|
242 (interactive) |
879df83433a1
Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22027
diff
changeset
|
243 (save-excursion |
879df83433a1
Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22027
diff
changeset
|
244 (calendar-cursor-to-date (calendar-current-date)) |
879df83433a1
Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22027
diff
changeset
|
245 (calendar-cursor-holidays))) |
879df83433a1
Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22027
diff
changeset
|
246 |
84553
383791965ba9
Rename all list-calendar-holidays callers to calendar-list-holidays,
Glenn Morris <rgm@gnu.org>
parents:
82202
diff
changeset
|
247 (autoload 'calendar-check-holidays "holidays") |
65510
24f7082aa7af
Don't require easymenu, since we don't use it.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
65145
diff
changeset
|
248 (autoload 'diary-list-entries "diary-lib") |
24f7082aa7af
Don't require easymenu, since we don't use it.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
65145
diff
changeset
|
249 |
66617
ed95f221960d
(date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
65919
diff
changeset
|
250 (defun calendar-mouse-holidays (&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
|
251 "Pop up menu of holidays for mouse selected date." |
66617
ed95f221960d
(date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
65919
diff
changeset
|
252 (interactive "e") |
22413
be2f536a1358
Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22365
diff
changeset
|
253 (let* ((date (calendar-event-to-date)) |
84553
383791965ba9
Rename all list-calendar-holidays callers to calendar-list-holidays,
Glenn Morris <rgm@gnu.org>
parents:
82202
diff
changeset
|
254 (l (mapcar 'list (calendar-check-holidays date))) |
22413
be2f536a1358
Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22365
diff
changeset
|
255 (selection |
39524
291264d596e9
(cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents:
39133
diff
changeset
|
256 (cal-menu-x-popup-menu |
22413
be2f536a1358
Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22365
diff
changeset
|
257 event |
be2f536a1358
Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22365
diff
changeset
|
258 (list |
be2f536a1358
Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22365
diff
changeset
|
259 (format "Holidays for %s" (calendar-date-string date)) |
be2f536a1358
Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22365
diff
changeset
|
260 (append |
be2f536a1358
Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22365
diff
changeset
|
261 (list (format "Holidays for %s" (calendar-date-string date))) |
be2f536a1358
Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22365
diff
changeset
|
262 (if l l '("None"))))))) |
be2f536a1358
Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22365
diff
changeset
|
263 (and selection (call-interactively selection)))) |
5701 | 264 |
66617
ed95f221960d
(date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
65919
diff
changeset
|
265 (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
|
266 "Pop up menu of diary entries for mouse-selected date. |
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
267 Use optional DATE and alternative file DIARY. |
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
268 |
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
269 Any holidays are shown if `holidays-in-diary-buffer' is t." |
66617
ed95f221960d
(date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
65919
diff
changeset
|
270 (interactive "i\ni\ne") |
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
|
271 (let* ((date (or date (calendar-event-to-date))) |
52230
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
272 (diary-file (if diary diary diary-file)) |
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
273 (diary-list-include-blanks nil) |
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
274 (diary-display-hook 'ignore) |
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
275 (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
|
276 (mapcar (lambda (x) (split-string (cadr x) "\n")) |
65876
33868a8b76d1
(calendar-mouse-view-diary-entries): Use the new arg to diary-list-entries.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
65510
diff
changeset
|
277 (diary-list-entries date 1 'list-only))) |
52230
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
278 (holidays (if holidays-in-diary-buffer |
84553
383791965ba9
Rename all list-calendar-holidays callers to calendar-list-holidays,
Glenn Morris <rgm@gnu.org>
parents:
82202
diff
changeset
|
279 (calendar-check-holidays date))) |
52230
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
280 (title (concat "Diary entries " |
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
281 (if diary (format "from %s " diary) "") |
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
282 "for " |
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
283 (calendar-date-string date))) |
22413
be2f536a1358
Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22365
diff
changeset
|
284 (selection |
39524
291264d596e9
(cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents:
39133
diff
changeset
|
285 (cal-menu-x-popup-menu |
22413
be2f536a1358
Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22365
diff
changeset
|
286 event |
52230
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
287 (list title |
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
288 (append |
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
289 (list title) |
65510
24f7082aa7af
Don't require easymenu, since we don't use it.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
65145
diff
changeset
|
290 (mapcar (lambda (x) (list (concat " " x))) holidays) |
52230
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
291 (if holidays |
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
292 (list "--shadow-etched-in" "--shadow-etched-in")) |
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
293 (if 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
|
294 (mapcar 'list (apply 'append diary-entries)) |
52230
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
295 '("None"))))))) |
22413
be2f536a1358
Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22365
diff
changeset
|
296 (and selection (call-interactively selection)))) |
5701 | 297 |
9766
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
298 (defun calendar-mouse-view-other-diary-entries () |
22413
be2f536a1358
Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
22365
diff
changeset
|
299 "Pop up menu of diary entries from alternative file on mouse-selected date." |
9766
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
300 (interactive) |
52230
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
301 (calendar-mouse-view-diary-entries |
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
302 (calendar-event-to-date) |
75388c0f3104
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52116
diff
changeset
|
303 (read-file-name "Enter diary file name: " default-directory nil t))) |
9766
71c37f31a02d
Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
9734
diff
changeset
|
304 |
9710
b5fb08fb2cb3
Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
8308
diff
changeset
|
305 (defun calendar-mouse-insert-diary-entry () |
b5fb08fb2cb3
Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
8308
diff
changeset
|
306 "Insert diary entry for mouse-selected date." |
b5fb08fb2cb3
Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
8308
diff
changeset
|
307 (interactive) |
b5fb08fb2cb3
Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
8308
diff
changeset
|
308 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
309 (calendar-mouse-goto-date (calendar-event-to-date)) |
9710
b5fb08fb2cb3
Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
8308
diff
changeset
|
310 (insert-diary-entry nil))) |
b5fb08fb2cb3
Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
8308
diff
changeset
|
311 |
7412
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
312 (defun calendar-mouse-set-mark () |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
313 "Mark the date under the cursor." |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
314 (interactive) |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
315 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
316 (calendar-mouse-goto-date (calendar-event-to-date)) |
7412
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
317 (calendar-set-mark nil))) |
f067e1a5ceb4
(calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents:
7403
diff
changeset
|
318 |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
319 (defun cal-tex-mouse-day () |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
320 "Make a buffer with LaTeX commands for the day mouse is on." |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
321 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
322 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
323 (calendar-mouse-goto-date (calendar-event-to-date)) |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
324 (cal-tex-cursor-day nil))) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
325 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
326 (defun cal-tex-mouse-week () |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
327 "One page calendar for week indicated by cursor. |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
328 Holidays are included if `cal-tex-holidays' is t." |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
329 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
330 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
331 (calendar-mouse-goto-date (calendar-event-to-date)) |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
332 (cal-tex-cursor-week nil))) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
333 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
334 (defun cal-tex-mouse-week2 () |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
335 "Make a buffer with LaTeX commands for the week cursor is on. |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
336 The printed output will be on two pages." |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
337 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
338 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
339 (calendar-mouse-goto-date (calendar-event-to-date)) |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
340 (cal-tex-cursor-week2 nil))) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
341 |
13689
a04244ec8530
Repair function names from rms error in modifying!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13285
diff
changeset
|
342 (defun cal-tex-mouse-week-iso () |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
343 "One page calendar for week indicated by cursor. |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
344 Holidays are included if `cal-tex-holidays' is t." |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
345 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
346 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
347 (calendar-mouse-goto-date (calendar-event-to-date)) |
13689
a04244ec8530
Repair function names from rms error in modifying!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13285
diff
changeset
|
348 (cal-tex-cursor-week-iso nil))) |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
349 |
13689
a04244ec8530
Repair function names from rms error in modifying!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13285
diff
changeset
|
350 (defun cal-tex-mouse-week-monday () |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
351 "One page calendar for week indicated by cursor." |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
352 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
353 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
354 (calendar-mouse-goto-date (calendar-event-to-date)) |
13689
a04244ec8530
Repair function names from rms error in modifying!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13285
diff
changeset
|
355 (cal-tex-cursor-week-monday nil))) |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
356 |
19975
927a8710de05
(cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents:
19950
diff
changeset
|
357 (defun cal-tex-mouse-filofax-daily () |
927a8710de05
(cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents:
19950
diff
changeset
|
358 "Day-per-page Filofax calendar for week indicated by cursor." |
927a8710de05
(cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents:
19950
diff
changeset
|
359 (interactive) |
927a8710de05
(cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents:
19950
diff
changeset
|
360 (save-excursion |
927a8710de05
(cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents:
19950
diff
changeset
|
361 (calendar-mouse-goto-date (calendar-event-to-date)) |
927a8710de05
(cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents:
19950
diff
changeset
|
362 (cal-tex-cursor-filofax-daily nil))) |
927a8710de05
(cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents:
19950
diff
changeset
|
363 |
13690
8a3ceaf9bfee
More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13689
diff
changeset
|
364 (defun cal-tex-mouse-filofax-2week () |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
365 "One page Filofax calendar for week indicated by cursor." |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
366 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
367 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
368 (calendar-mouse-goto-date (calendar-event-to-date)) |
13690
8a3ceaf9bfee
More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13689
diff
changeset
|
369 (cal-tex-cursor-filofax-2week nil))) |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
370 |
13690
8a3ceaf9bfee
More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13689
diff
changeset
|
371 (defun cal-tex-mouse-filofax-week () |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
372 "Two page Filofax calendar for week indicated by cursor." |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
373 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
374 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
375 (calendar-mouse-goto-date (calendar-event-to-date)) |
13690
8a3ceaf9bfee
More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13689
diff
changeset
|
376 (cal-tex-cursor-filofax-week nil))) |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
377 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
378 (defun cal-tex-mouse-month () |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
379 "Make a buffer with LaTeX commands for the month cursor is on. |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
380 Calendar is condensed onto one page." |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
381 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
382 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
383 (calendar-mouse-goto-date (calendar-event-to-date)) |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
384 (cal-tex-cursor-month nil))) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
385 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
386 (defun cal-tex-mouse-month-landscape () |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
387 "Make a buffer with LaTeX commands for the month cursor is on. |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
388 The output is in landscape format, one month to a page." |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
389 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
390 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
391 (calendar-mouse-goto-date (calendar-event-to-date)) |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
392 (cal-tex-cursor-month-landscape nil))) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
393 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
394 (defun cal-tex-mouse-year () |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
395 "Make a buffer with LaTeX commands for the year cursor is on." |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
396 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
397 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
398 (calendar-mouse-goto-date (calendar-event-to-date)) |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
399 (cal-tex-cursor-year nil))) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
400 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
401 (defun cal-tex-mouse-filofax-year () |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
402 "Make a buffer with LaTeX commands for Filofax calendar of year cursor is on." |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
403 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
404 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
405 (calendar-mouse-goto-date (calendar-event-to-date)) |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
406 (cal-tex-cursor-filofax-year nil))) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
407 |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
408 (defun cal-tex-mouse-year-landscape () |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
409 "Make a buffer with LaTeX commands for the year cursor is on." |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
410 (interactive) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
411 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
412 (calendar-mouse-goto-date (calendar-event-to-date)) |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
413 (cal-tex-cursor-year-landscape nil))) |
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
414 |
66617
ed95f221960d
(date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
65919
diff
changeset
|
415 (defun calendar-mouse-print-dates (&optional event) |
5701 | 416 "Pop up menu of equivalent dates to mouse selected date." |
66617
ed95f221960d
(date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
65919
diff
changeset
|
417 (interactive "e") |
ed95f221960d
(date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
65919
diff
changeset
|
418 (let* ((date (calendar-event-to-date)) |
13047
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
419 (selection |
39524
291264d596e9
(cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents:
39133
diff
changeset
|
420 (cal-menu-x-popup-menu |
13047
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
421 event |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
422 (list |
13876
16decb4ae75f
Put date on top of other-calendars menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13690
diff
changeset
|
423 (concat (calendar-date-string date) " (Gregorian)") |
13047
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
424 (append |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
425 (list |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
426 (concat (calendar-date-string date) " (Gregorian)") |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
427 (list (calendar-day-of-year-string date)) |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
428 (list (format "ISO date: %s" (calendar-iso-date-string date))) |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
429 (list (format "Julian date: %s" |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
430 (calendar-julian-date-string date))) |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
431 (list |
15068
47ef84d3738d
Spelling fix.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
14951
diff
changeset
|
432 (format "Astronomical (Julian) day number (at noon UTC): %s.0" |
13047
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
433 (calendar-astro-date-string date))) |
20423
f2a0f6498003
Add fixed date (RD) to menu of other dates.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
19975
diff
changeset
|
434 (list |
20424
bfc68d8546f3
Minor repair of previous change.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
20423
diff
changeset
|
435 (format "Fixed (RD) date: %s" |
20423
f2a0f6498003
Add fixed date (RD) to menu of other dates.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
19975
diff
changeset
|
436 (calendar-absolute-from-gregorian date))) |
13047
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
437 (list (format "Hebrew date (before sunset): %s" |
14915
5a4b28f19b75
Add references to Persian calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
14169
diff
changeset
|
438 (calendar-hebrew-date-string date))) |
5a4b28f19b75
Add references to Persian calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
14169
diff
changeset
|
439 (list (format "Persian date: %s" |
55431
b278cb498cc8
2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents:
52401
diff
changeset
|
440 (calendar-persian-date-string date))) |
b278cb498cc8
2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents:
52401
diff
changeset
|
441 (list (format "Baha'i date (before sunset): %s" |
b278cb498cc8
2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents:
52401
diff
changeset
|
442 (calendar-bahai-date-string date)))) |
13047
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
443 (let ((i (calendar-islamic-date-string date))) |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
444 (if (not (string-equal i "")) |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
445 (list (list (format "Islamic date (before sunset): %s" i))))) |
13285
7ccba52e1e3e
Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13194
diff
changeset
|
446 (list |
7ccba52e1e3e
Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13194
diff
changeset
|
447 (list (format "Chinese date: %s" |
7ccba52e1e3e
Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13194
diff
changeset
|
448 (calendar-chinese-date-string date)))) |
66617
ed95f221960d
(date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
65919
diff
changeset
|
449 ;; (list '("Chinese date (select to echo Chinese date)" |
ed95f221960d
(date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
65919
diff
changeset
|
450 ;; . calendar-mouse-chinese-date)) |
13047
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
451 (let ((c (calendar-coptic-date-string date))) |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
452 (if (not (string-equal c "")) |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
453 (list (list (format "Coptic date: %s" c))))) |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
454 (let ((e (calendar-ethiopic-date-string date))) |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
455 (if (not (string-equal e "")) |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
456 (list (list (format "Ethiopic date: %s" e))))) |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
457 (let ((f (calendar-french-date-string date))) |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
458 (if (not (string-equal f "")) |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
459 (list (list (format "French Revolutionary date: %s" f))))) |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
460 (list |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
461 (list |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
462 (format "Mayan date: %s" |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
463 (calendar-mayan-date-string date))))))))) |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
464 (and selection (call-interactively selection)))) |
6c3c9645fbfd
Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
12033
diff
changeset
|
465 |
13063
30ee606ce331
Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13047
diff
changeset
|
466 (defun calendar-mouse-chinese-date () |
30ee606ce331
Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13047
diff
changeset
|
467 "Show Chinese equivalent for mouse-selected date." |
30ee606ce331
Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13047
diff
changeset
|
468 (interactive) |
30ee606ce331
Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13047
diff
changeset
|
469 (save-excursion |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
470 (calendar-mouse-goto-date (calendar-event-to-date)) |
13063
30ee606ce331
Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13047
diff
changeset
|
471 (calendar-print-chinese-date))) |
5701 | 472 |
14951
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
473 (defun calendar-mouse-goto-date (date) |
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
474 (set-buffer (window-buffer (posn-window (event-start last-input-event)))) |
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
475 (calendar-goto-date date)) |
15ab8e95a50a
(calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14915
diff
changeset
|
476 |
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
|
477 (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
|
478 "Pop up menu for Mouse-2 for selected date in the calendar window." |
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
|
479 '("foo" :filter cal-menu-set-date-title |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
480 "--" |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
481 ["Holidays" calendar-mouse-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
|
482 ["Mark date" calendar-mouse-set-mark] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
483 ["Sunrise/sunset" calendar-mouse-sunrise/sunset] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
484 ["Other calendars" calendar-mouse-print-dates] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
485 ("Prepare LaTeX buffer" |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
486 ["Daily (1 page)" cal-tex-mouse-day] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
487 ["Weekly (1 page)" cal-tex-mouse-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
|
488 ["Weekly (2 pages)" cal-tex-mouse-week2] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
489 ["Weekly (other style; 1 page)" cal-tex-mouse-week-iso] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
490 ["Weekly (yet another style; 1 page)" cal-tex-mouse-week-monday] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
491 ["Monthly" cal-tex-mouse-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
|
492 ["Monthly (landscape)" cal-tex-mouse-month-landscape] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
493 ["Yearly" cal-tex-mouse-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
|
494 ["Yearly (landscape)" cal-tex-mouse-year-landscape] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
495 ("Filofax styles" |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
496 ["Filofax Daily (one-day-per-page)" cal-tex-mouse-filofax-daily] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
497 ["Filofax Weekly (2-weeks-at-a-glance)" cal-tex-mouse-filofax-2week] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
498 ["Filofax Weekly (week-at-a-glance)" cal-tex-mouse-filofax-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
|
499 ["Filofax Yearly" cal-tex-mouse-filofax-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
|
500 ["Diary entries" calendar-mouse-view-diary-entries] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
501 ["Insert diary entry" calendar-mouse-insert-diary-entry] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
502 ["Other diary file entries" calendar-mouse-view-other-diary-entries])) |
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
|
503 |
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
|
504 (defun cal-menu-set-date-title (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
|
505 (easy-menu-filter-return |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
506 menu (calendar-date-string (calendar-event-to-date t) t nil))) |
13194
7e90c5fce35f
Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
13063
diff
changeset
|
507 |
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
|
508 (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
|
509 "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
|
510 '("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
|
511 ["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
|
512 ["Scroll backward" calendar-scroll-right-three-months] |
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
|
513 ["Mark diary entries" mark-diary-entries] |
84553
383791965ba9
Rename all list-calendar-holidays callers to calendar-list-holidays,
Glenn Morris <rgm@gnu.org>
parents:
82202
diff
changeset
|
514 ["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
|
515 ["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
|
516 ["Unmark" calendar-unmark] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
517 ["Lunar phases" calendar-phases-of-moon] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
518 ["Show diary" diary-show-all-entries] |
8410b0ff0e7a
Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
77279
diff
changeset
|
519 ["Exit calendar" exit-calendar])) |
5701 | 520 |
521 (run-hooks 'cal-menu-load-hook) | |
522 | |
523 (provide 'cal-menu) | |
524 | |
66617
ed95f221960d
(date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
65919
diff
changeset
|
525 ;; arch-tag: aa81cf73-ce89-48a4-97ec-9ef861e87fe9 |
5701 | 526 ;;; cal-menu.el ends here |