annotate lisp/calendar/cal-menu.el @ 86431:9c38f723c526

Place-holder entry for nXML.
author Glenn Morris <rgm@gnu.org>
date Sun, 25 Nov 2007 03:15:43 +0000
parents 4c73f7497804
children 8385b57c5ce6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 ;;; cal-menu.el --- calendar functions for menu bar and popup menu support
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2
75346
7a3f13e2dd57 Add 2007 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 70634
diff changeset
3 ;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007
67464
757a5ae466cd Update copyright info.
Glenn Morris <rgm@gnu.org>
parents: 66617
diff changeset
4 ;; Free Software Foundation, Inc.
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
7 ;; Lara Rios <lrios@coewl.cen.uiuc.edu>
65919
5c09efcfc1d9 Update maintainer email address.
Glenn Morris <rgm@gnu.org>
parents: 65876
diff changeset
8 ;; Maintainer: Glenn Morris <rgm@gnu.org>
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9 ;; Keywords: calendar
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10 ;; Human-Keywords: calendar, popup menus, menu bar
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
11
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12 ;; This file is part of GNU Emacs.
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
13
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
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18
6736
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
19 ;; GNU Emacs is distributed in the hope that it will be useful,
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
22 ;; GNU General Public License for more details.
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
23
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
24 ;; You should have received a copy of the GNU General Public License
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13876
diff changeset
25 ;; along with GNU Emacs; see the file COPYING. If not, write to the
64085
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62577
diff changeset
26 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62577
diff changeset
27 ;; Boston, MA 02110-1301, USA.
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29 ;;; Commentary:
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31 ;; This collection of functions implements menu bar and popup menu support for
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32 ;; calendar.el.
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
34 ;;; Code:
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
35
52116
3132ffb5a7ab (displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents: 50465
diff changeset
36 (defvar displayed-year)
3132ffb5a7ab (displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents: 50465
diff changeset
37
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
38 (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
39 '("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
40 ["Lunar Phases" calendar-phases-of-moon]))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
41
82117
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
42 (defconst cal-menu-diary-menu
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
43 '("Diary"
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
44 ["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
45 ["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
46 ["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
47 ["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
48 ["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
49 ["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
50 ["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
51 ["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
52 ["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
53 ["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
54 ["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
55 ("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
56 [" " 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
57 ["One time" diary-bahai-insert-entry]
a2988c19b72c (cal-menu-diary-menu, cal-menu-goto-menu):
Glenn Morris <rgm@gnu.org>
parents: 84553
diff changeset
58 ["Monthly" diary-bahai-insert-monthly-entry]
a2988c19b72c (cal-menu-diary-menu, cal-menu-goto-menu):
Glenn Morris <rgm@gnu.org>
parents: 84553
diff changeset
59 ["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
60 ("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
61 [" " 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
62 ["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
63 ["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
64 ["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
65 ("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
66 [" " 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
67 ["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
68 ["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
69 ["Yearly" insert-yearly-hebrew-diary-entry])))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
70
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
71 (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
72 (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
73 (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
74 (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
75 (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
76 (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
77 (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
78 (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
79 (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
80 (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
81 (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
82 (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
83 (cdr my2)))))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
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-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
86 `("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 ["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
88 :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
89 :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
90 ["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
91 :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
92 ["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
93 :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
94 "--"
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 ,@(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
96 ;; Show 11 years--5 before, 5 after year of middle 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
97 (dotimes (i 11)
86430
4c73f7497804 Revert previous commit, made without ChangeLog entry.
Glenn Morris <rgm@gnu.org>
parents: 86414
diff changeset
98 (push (vector "For Year"
4c73f7497804 Revert previous commit, made without ChangeLog entry.
Glenn Morris <rgm@gnu.org>
parents: 86414
diff changeset
99 `(lambda ()
4c73f7497804 Revert previous commit, made without ChangeLog entry.
Glenn Morris <rgm@gnu.org>
parents: 86414
diff changeset
100 (interactive)
4c73f7497804 Revert previous commit, made without ChangeLog entry.
Glenn Morris <rgm@gnu.org>
parents: 86414
diff changeset
101 (holiday-list (+ displayed-year ,(- i 5))
4c73f7497804 Revert previous commit, made without ChangeLog entry.
Glenn Morris <rgm@gnu.org>
parents: 86414
diff changeset
102 (+ displayed-year ,(- i 5))))
4c73f7497804 Revert previous commit, made without ChangeLog entry.
Glenn Morris <rgm@gnu.org>
parents: 86414
diff changeset
103 :suffix `(number-to-string (+ displayed-year ,(- i 5))))
4c73f7497804 Revert previous commit, made without ChangeLog entry.
Glenn Morris <rgm@gnu.org>
parents: 86414
diff changeset
104 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
105 (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
106 "--"
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 ["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
108 ["Mark Holidays" mark-calendar-holidays]))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
109
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
110 (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
111 '("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
112 ["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
113 ["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
114 ["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
115 ["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
116 ["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
117 ["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
118 ["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
119 ["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
120 ["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
121 ["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
122 ["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
123 ["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
124 ["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
125 ["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
126 ["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
127 ["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
128 ["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
129 ["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
130 ["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
131 ["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
132 ("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
133 ["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
134 ["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
135 ["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
136 ["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
137 ["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
138 ["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
139 ["French Date" calendar-goto-french-date]))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
140
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
141 (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
142 '("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
143 ["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
144 ["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
145 ["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
146 ["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
147 ["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
148 ["Backward 1 Year" "4\ev"]))
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
149
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
150 (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
151 "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
152 not available."
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
153 (if (display-popup-menus-p)
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
154 (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
155 (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
156
17667
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
157 (defun cal-menu-list-holidays-year ()
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
158 "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
159 (interactive)
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
160 (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
161 (holiday-list year year)))
17667
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
162
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
163 (defun cal-menu-list-holidays-following-year ()
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
164 "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
165 (interactive)
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
166 (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
167 (holiday-list year year)))
17667
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
168
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
169 (defun cal-menu-list-holidays-previous-year ()
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
170 "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
171 (interactive)
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
172 (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
173 (holiday-list year year)))
17667
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
174
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
175 (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
176 "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
177 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
178 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
179 (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
180 (window-buffer (posn-window (event-start last-input-event)))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
181 (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
182 (calendar-cursor-to-date error)))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
183
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
184 (defun calendar-mouse-sunrise/sunset ()
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
185 "Show sunrise/sunset times for mouse-selected date."
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
186 (interactive)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
187 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
188 (calendar-mouse-goto-date (calendar-event-to-date))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
189 (calendar-sunrise-sunset)))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
190
22031
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
191 (defun cal-menu-today-holidays ()
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
192 "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
193 (interactive)
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
194 (save-excursion
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
195 (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
196 (calendar-cursor-holidays)))
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
197
84553
383791965ba9 Rename all list-calendar-holidays callers to calendar-list-holidays,
Glenn Morris <rgm@gnu.org>
parents: 82202
diff changeset
198 (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
199 (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
200
66617
ed95f221960d (date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65919
diff changeset
201 (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
202 "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
203 (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
204 (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
205 (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
206 (selection
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
207 (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
208 event
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
209 (list
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
210 (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
211 (append
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
212 (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
213 (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
214 (and selection (call-interactively selection))))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
215
66617
ed95f221960d (date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65919
diff changeset
216 (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
217 "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
218 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
219
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
220 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
221 (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
222 (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
223 (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
224 (diary-list-include-blanks nil)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
225 (diary-display-hook 'ignore)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
226 (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
227 (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
228 (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
229 (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
230 (calendar-check-holidays date)))
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
231 (title (concat "Diary entries "
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
232 (if diary (format "from %s " diary) "")
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
233 "for "
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
234 (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
235 (selection
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
236 (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
237 event
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
238 (list title
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
239 (append
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
240 (list title)
65510
24f7082aa7af Don't require easymenu, since we don't use it.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65145
diff changeset
241 (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
242 (if holidays
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
243 (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
244 (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
245 (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
246 '("None")))))))
22413
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
247 (and selection (call-interactively selection))))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
248
9766
71c37f31a02d Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9734
diff changeset
249 (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
250 "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
251 (interactive)
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
252 (calendar-mouse-view-diary-entries
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
253 (calendar-event-to-date)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
254 (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
255
9710
b5fb08fb2cb3 Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 8308
diff changeset
256 (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
257 "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
258 (interactive)
b5fb08fb2cb3 Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 8308
diff changeset
259 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
260 (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
261 (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
262
7412
f067e1a5ceb4 (calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7403
diff changeset
263 (defun calendar-mouse-set-mark ()
f067e1a5ceb4 (calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7403
diff changeset
264 "Mark the date under the cursor."
f067e1a5ceb4 (calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7403
diff changeset
265 (interactive)
f067e1a5ceb4 (calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7403
diff changeset
266 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
267 (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
268 (calendar-set-mark nil)))
f067e1a5ceb4 (calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7403
diff changeset
269
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
270 (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
271 "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
272 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
273 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
274 (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
275 (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
276
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
277 (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
278 "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
279 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
280 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
281 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
282 (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
283 (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
284
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
285 (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
286 "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
287 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
288 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
289 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
290 (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
291 (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
292
13689
a04244ec8530 Repair function names from rms error in modifying!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13285
diff changeset
293 (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
294 "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
295 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
296 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
297 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
298 (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
299 (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
300
13689
a04244ec8530 Repair function names from rms error in modifying!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13285
diff changeset
301 (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
302 "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
303 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
304 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
305 (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
306 (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
307
19975
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
308 (defun cal-tex-mouse-filofax-daily ()
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
309 "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
310 (interactive)
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
311 (save-excursion
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
312 (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
313 (cal-tex-cursor-filofax-daily nil)))
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
314
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
315 (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
316 "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
317 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
318 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
319 (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
320 (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
321
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
322 (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
323 "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
324 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
325 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
326 (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
327 (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
328
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
329 (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
330 "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
331 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
332 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
333 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
334 (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
335 (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
336
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
337 (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
338 "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
339 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
340 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
341 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
342 (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
343 (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
344
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
345 (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
346 "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
347 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
348 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
349 (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
350 (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
351
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
352 (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
353 "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
354 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
355 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
356 (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
357 (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
358
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
359 (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
360 "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
361 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
362 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
363 (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
364 (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
365
66617
ed95f221960d (date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65919
diff changeset
366 (defun calendar-mouse-print-dates (&optional event)
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
367 "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
368 (interactive "e")
ed95f221960d (date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65919
diff changeset
369 (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
370 (selection
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
371 (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
372 event
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
373 (list
13876
16decb4ae75f Put date on top of other-calendars menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13690
diff changeset
374 (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
375 (append
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
376 (list
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
377 (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
378 (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
379 (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
380 (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
381 (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
382 (list
15068
47ef84d3738d Spelling fix.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 14951
diff changeset
383 (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
384 (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
385 (list
20424
bfc68d8546f3 Minor repair of previous change.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20423
diff changeset
386 (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
387 (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
388 (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
389 (calendar-hebrew-date-string date)))
5a4b28f19b75 Add references to Persian calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 14169
diff changeset
390 (list (format "Persian date: %s"
55431
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
391 (calendar-persian-date-string date)))
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
392 (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
393 (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
394 (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
395 (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
396 (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
397 (list
7ccba52e1e3e Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13194
diff changeset
398 (list (format "Chinese date: %s"
7ccba52e1e3e Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13194
diff changeset
399 (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
400 ;; (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
401 ;; . 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
402 (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
403 (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
404 (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
405 (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
406 (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
407 (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
408 (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
409 (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
410 (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
411 (list
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
412 (list
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
413 (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
414 (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
415 (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
416
13063
30ee606ce331 Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13047
diff changeset
417 (defun calendar-mouse-chinese-date ()
30ee606ce331 Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13047
diff changeset
418 "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
419 (interactive)
30ee606ce331 Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13047
diff changeset
420 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
421 (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
422 (calendar-print-chinese-date)))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
423
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
424 (defun calendar-mouse-goto-date (date)
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
425 (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
426 (calendar-goto-date date))
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
427
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
428 (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
429 "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
430 '("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
431 "--"
8410b0ff0e7a Break dependency on calendar.el (i.e. do not modify calendar-mode-map),
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 77279
diff changeset
432 ["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
433 ["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
434 ["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
435 ["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
436 ("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
437 ["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
438 ["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
439 ["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
440 ["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
441 ["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
442 ["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
443 ["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
444 ["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
445 ["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
446 ("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
447 ["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
448 ["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
449 ["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
450 ["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
451 ["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
452 ["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
453 ["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
454
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
455 (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
456 (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
457 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
458
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
459 (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
460 "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
461 '("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
462 ["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
463 ["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
464 ["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
465 ["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
466 ["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
467 ["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
468 ["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
469 ["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
470 ["Exit calendar" exit-calendar]))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
471
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
472 (run-hooks 'cal-menu-load-hook)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
473
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
474 (provide 'cal-menu)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
475
66617
ed95f221960d (date, event): Don't declare as dynamic-var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65919
diff changeset
476 ;; arch-tag: aa81cf73-ce89-48a4-97ec-9ef861e87fe9
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
477 ;;; cal-menu.el ends here