annotate lisp/calendar/cal-menu.el @ 55772:73fe3355e195

*** empty log message ***
author John Paul Wallington <jpw@pobox.com>
date Tue, 25 May 2004 20:12:00 +0000
parents b278cb498cc8
children 670acab99124 4c90ffeb71c5
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
52116
3132ffb5a7ab (displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents: 50465
diff changeset
3 ;; Copyright (C) 1994, 1995, 2001, 2003 Free Software Foundation, Inc.
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6 ;; Lara Rios <lrios@coewl.cen.uiuc.edu>
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
7 ;; Keywords: calendar
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8 ;; Human-Keywords: calendar, popup menus, menu bar
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10 ;; This file is part of GNU Emacs.
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
11
6736
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
12 ;; 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
13 ;; it under the terms of the GNU General Public License as published by
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
15 ;; any later version.
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
16
6736
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
17 ;; 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
18 ;; 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
19 ;; 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
20 ;; 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
21
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5701
diff changeset
22 ;; 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
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13876
diff changeset
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13876
diff changeset
25 ;; Boston, MA 02111-1307, USA.
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 ;;; Commentary:
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29 ;; This collection of functions implements menu bar and popup menu support for
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30 ;; calendar.el.
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32 ;; Comments, corrections, and improvements should be sent to
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33 ;; Edward M. Reingold Department of Computer Science
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
34 ;; (217) 333-6733 University of Illinois at Urbana-Champaign
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
35 ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
36 ;; Urbana, Illinois 61801
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
37
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
38 ;;; Code:
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
39
52116
3132ffb5a7ab (displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents: 50465
diff changeset
40 (defvar displayed-month)
3132ffb5a7ab (displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents: 50465
diff changeset
41 (defvar displayed-year)
3132ffb5a7ab (displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents: 50465
diff changeset
42
19950
947c67a81ec6 Require calendar only when compiling.
Richard M. Stallman <rms@gnu.org>
parents: 19892
diff changeset
43 (eval-when-compile (require 'calendar))
22027
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
44 (require 'easymenu)
19892
b3d4cde6e4c3 Require calendar.el.
Richard M. Stallman <rms@gnu.org>
parents: 17667
diff changeset
45
9999
8187800943e7 Get rid of edit menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9766
diff changeset
46 (define-key calendar-mode-map [menu-bar edit] 'undefined)
13689
a04244ec8530 Repair function names from rms error in modifying!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13285
diff changeset
47 (define-key calendar-mode-map [menu-bar search] 'undefined)
9999
8187800943e7 Get rid of edit menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9766
diff changeset
48
7478
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
49 (define-key calendar-mode-map [down-mouse-2] 'calendar-mouse-2-date-menu)
7713
44a712d8ba03 (calendar-mode-map): Define mouse-2 as ignore.
Richard M. Stallman <rms@gnu.org>
parents: 7576
diff changeset
50 (define-key calendar-mode-map [mouse-2] 'ignore)
7478
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
51
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
52 (defvar calendar-mouse-3-map (make-sparse-keymap "Calendar"))
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
53 (define-key calendar-mode-map [down-mouse-3] calendar-mouse-3-map)
9734
051c27bcbc22 (calendar-mode-map): Define c-down-mouse-3 like down-mouse-3.
Richard M. Stallman <rms@gnu.org>
parents: 9710
diff changeset
54 (define-key calendar-mode-map [C-down-mouse-3] calendar-mouse-3-map)
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
55
7887
a5e6f7045bc0 (calendar-mode-map): Change moon menu bar to pop up a menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7886
diff changeset
56 (define-key calendar-mode-map [menu-bar moon]
a5e6f7045bc0 (calendar-mode-map): Change moon menu bar to pop up a menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7886
diff changeset
57 (cons "Moon" (make-sparse-keymap "Moon")))
a5e6f7045bc0 (calendar-mode-map): Change moon menu bar to pop up a menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7886
diff changeset
58
a5e6f7045bc0 (calendar-mode-map): Change moon menu bar to pop up a menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7886
diff changeset
59 (define-key calendar-mode-map [menu-bar moon moon]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
60 '("Lunar Phases" . calendar-phases-of-moon))
7887
a5e6f7045bc0 (calendar-mode-map): Change moon menu bar to pop up a menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7886
diff changeset
61
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
62 (define-key calendar-mode-map [menu-bar diary]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
63 (cons "Diary" (make-sparse-keymap "Diary")))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
64
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
65 (define-key calendar-mode-map [menu-bar diary heb]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
66 '("Insert Hebrew" . calendar-mouse-insert-hebrew-diary-entry))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
67 (define-key calendar-mode-map [menu-bar diary isl]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
68 '("Insert Islamic" . calendar-mouse-insert-islamic-diary-entry))
55431
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
69 (define-key calendar-mode-map [menu-bar diary baha]
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
70 '("Insert Baha'i" . calendar-mouse-insert-bahai-diary-entry))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
71 (define-key calendar-mode-map [menu-bar diary cyc]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
72 '("Insert Cyclic" . insert-cyclic-diary-entry))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
73 (define-key calendar-mode-map [menu-bar diary blk]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
74 '("Insert Block" . insert-block-diary-entry))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
75 (define-key calendar-mode-map [menu-bar diary ann]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
76 '("Insert Anniversary" . insert-anniversary-diary-entry))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
77 (define-key calendar-mode-map [menu-bar diary yr]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
78 '("Insert Yearly" . insert-yearly-diary-entry))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
79 (define-key calendar-mode-map [menu-bar diary mon]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
80 '("Insert Monthly" . insert-monthly-diary-entry))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
81 (define-key calendar-mode-map [menu-bar diary wk]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
82 '("Insert Weekly" . insert-weekly-diary-entry))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
83 (define-key calendar-mode-map [menu-bar diary ent]
43195
b5177d0b2c9f (calendar-mode-map): Change the menu item's name to "Insert Diary Entry".
Eli Zaretskii <eliz@gnu.org>
parents: 39524
diff changeset
84 '("Insert Diary Entry" . insert-diary-entry))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
85 (define-key calendar-mode-map [menu-bar diary all]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
86 '("Show All" . show-all-diary-entries))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
87 (define-key calendar-mode-map [menu-bar diary mark]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
88 '("Mark All" . mark-diary-entries))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
89 (define-key calendar-mode-map [menu-bar diary view]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
90 '("Cursor Date" . view-diary-entries))
9766
71c37f31a02d Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9734
diff changeset
91 (define-key calendar-mode-map [menu-bar diary view]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
92 '("Other File" . view-other-diary-entries))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
93
22035
887dbe664b45 (calendar-mode-map): Rename `holidays' menu to `Holidays'.
Richard M. Stallman <rms@gnu.org>
parents: 22031
diff changeset
94 (define-key calendar-mode-map [menu-bar Holidays]
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
95 (cons "Holidays" (make-sparse-keymap "Holidays")))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
96
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
97 (define-key calendar-mode-map [menu-bar goto]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
98 (cons "Goto" (make-sparse-keymap "Goto")))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
99
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
100 (define-key calendar-mode-map [menu-bar goto french]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
101 '("French Date" . calendar-goto-french-date))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
102 (define-key calendar-mode-map [menu-bar goto mayan]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
103 (cons "Mayan Date" (make-sparse-keymap "Mayan")))
13047
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
104 (define-key calendar-mode-map [menu-bar goto ethiopic]
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
105 '("Ethiopic Date" . calendar-goto-ethiopic-date))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
106 (define-key calendar-mode-map [menu-bar goto coptic]
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
107 '("Coptic Date" . calendar-goto-coptic-date))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
108 (define-key calendar-mode-map [menu-bar goto chinese]
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
109 '("Chinese Date" . calendar-goto-chinese-date))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
110 (define-key calendar-mode-map [menu-bar goto julian]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
111 '("Julian Date" . calendar-goto-julian-date))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
112 (define-key calendar-mode-map [menu-bar goto islamic]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
113 '("Islamic Date" . calendar-goto-islamic-date))
14915
5a4b28f19b75 Add references to Persian calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 14169
diff changeset
114 (define-key calendar-mode-map [menu-bar goto persian]
55431
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
115 '("Baha'i Date" . calendar-goto-bahai-date))
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
116 (define-key calendar-mode-map [menu-bar goto persian]
14915
5a4b28f19b75 Add references to Persian calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 14169
diff changeset
117 '("Persian Date" . calendar-goto-persian-date))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
118 (define-key calendar-mode-map [menu-bar goto hebrew]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
119 '("Hebrew Date" . calendar-goto-hebrew-date))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
120 (define-key calendar-mode-map [menu-bar goto astro]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
121 '("Astronomical Date" . calendar-goto-astro-day-number))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
122 (define-key calendar-mode-map [menu-bar goto iso]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
123 '("ISO Date" . calendar-goto-iso-date))
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
124 (define-key calendar-mode-map [menu-bar goto day-of-year]
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
125 '("Day of Year" . calendar-goto-day-of-year))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
126 (define-key calendar-mode-map [menu-bar goto gregorian]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
127 '("Other Date" . calendar-goto-date))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
128 (define-key calendar-mode-map [menu-bar goto end-of-year]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
129 '("End of Year" . calendar-end-of-year))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
130 (define-key calendar-mode-map [menu-bar goto beginning-of-year]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
131 '("Beginning of Year" . calendar-beginning-of-year))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
132 (define-key calendar-mode-map [menu-bar goto end-of-month]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
133 '("End of Month" . calendar-end-of-month))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
134 (define-key calendar-mode-map [menu-bar goto beginning-of-month]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
135 '("Beginning of Month" . calendar-beginning-of-month))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
136 (define-key calendar-mode-map [menu-bar goto end-of-week]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
137 '("End of Week" . calendar-end-of-week))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
138 (define-key calendar-mode-map [menu-bar goto beginning-of-week]
12033
f7638ab47de7 Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents: 9999
diff changeset
139 '("Beginning of Week" . calendar-beginning-of-week))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
140 (define-key calendar-mode-map [menu-bar goto today]
8308
9c9cbb121c37 Change reference from renamed calendar-current-month to calendar-goto-today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7887
diff changeset
141 '("Today" . calendar-goto-today))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
142
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
143
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
144 (define-key calendar-mode-map [menu-bar goto mayan prev-rnd]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
145 '("Previous Round" . calendar-previous-calendar-round-date))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
146 (define-key calendar-mode-map [menu-bar goto mayan nxt-rnd]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
147 '("Next Round" . calendar-next-calendar-round-date))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
148 (define-key calendar-mode-map [menu-bar goto mayan prev-haab]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
149 '("Previous Haab" . calendar-previous-haab-date))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
150 (define-key calendar-mode-map [menu-bar goto mayan next-haab]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
151 '("Next Haab" . calendar-next-haab-date))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
152 (define-key calendar-mode-map [menu-bar goto mayan prev-tzol]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
153 '("Previous Tzolkin" . calendar-previous-tzolkin-date))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
154 (define-key calendar-mode-map [menu-bar goto mayan next-tzol]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
155 '("Next Tzolkin" . calendar-next-tzolkin-date))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
156
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
157 (define-key calendar-mode-map [menu-bar scroll]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
158 (cons "Scroll" (make-sparse-keymap "Scroll")))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
159
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
160 (define-key calendar-mode-map [menu-bar scroll bk-12]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
161 '("Backward 1 Year" . "4\ev"))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
162 (define-key calendar-mode-map [menu-bar scroll bk-3]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
163 '("Backward 3 Months" . scroll-calendar-right-three-months))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
164 (define-key calendar-mode-map [menu-bar scroll bk-1]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
165 '("Backward 1 Month" . scroll-calendar-right))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
166 (define-key calendar-mode-map [menu-bar scroll fwd-12]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
167 '("Forward 1 Year" . "4\C-v"))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
168 (define-key calendar-mode-map [menu-bar scroll fwd-3]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
169 '("Forward 3 Months" . scroll-calendar-left-three-months))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
170 (define-key calendar-mode-map [menu-bar scroll fwd-1]
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
171 '("Forward 1 Month" . scroll-calendar-left))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
172
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
173 (defun calendar-flatten (list)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
174 "Flatten LIST eliminating sublists structure; result is a list of atoms.
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
175 This is the same as the preorder list of leaves in a rooted forest."
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
176 (if (atom list)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
177 (list list)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
178 (if (cdr list)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
179 (append (calendar-flatten (car list)) (calendar-flatten (cdr list)))
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
180 (calendar-flatten (car list)))))
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
181
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
182 (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
183 "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
184 not available."
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
185 (if (display-popup-menus-p)
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
186 (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
187 (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
188
17667
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
189 (defun cal-menu-list-holidays-year ()
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
190 "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
191 (interactive)
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
192 (let ((year (extract-calendar-year (calendar-cursor-to-date))))
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
193 (list-holidays year year)))
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
194
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
195 (defun cal-menu-list-holidays-following-year ()
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
196 "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
197 (interactive)
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
198 (let ((year (1+ (extract-calendar-year (calendar-cursor-to-date)))))
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
199 (list-holidays year year)))
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
200
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
201 (defun cal-menu-list-holidays-previous-year ()
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
202 "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
203 (interactive)
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
204 (let ((year (1- (extract-calendar-year (calendar-cursor-to-date)))))
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
205 (list-holidays year year)))
fd527e9aa377 (cal-menu-list-holidays-following-year)
Richard M. Stallman <rms@gnu.org>
parents: 17553
diff changeset
206
22027
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
207 (defun cal-menu-update ()
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
208 ;; Update the holiday part of calendar menu bar for the current display.
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
209 (condition-case nil
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
210 (if (eq major-mode 'calendar-mode)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
211 (let ((l))
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
212 (calendar-for-loop;; Show 11 years--5 before, 5 after year of
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
213 ;; middle month
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
214 i from (- displayed-year 5) to (+ displayed-year 5) do
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
215 (setq l (cons (vector (format "For Year %s" i)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
216 (list (list 'lambda 'nil '(interactive)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
217 (list 'list-holidays i i)))
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
218 t)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
219 l)))
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
220 (setq l (cons ["Mark Holidays" mark-calendar-holidays t]
22036
342138eae82d Add separators to Holidays menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22035
diff changeset
221 (cons ["Unmark Calendar" calendar-unmark t]
22365
042d83ae4200 Fix menu separators.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22036
diff changeset
222 (cons ["--" '("--") t] l))))
50465
6fc90e779714 (cal-menu-update): Use easy-menu-create-menu rather than easy-menu-change.
Richard M. Stallman <rms@gnu.org>
parents: 45058
diff changeset
223 (define-key calendar-mode-map [menu-bar Holidays]
6fc90e779714 (cal-menu-update): Use easy-menu-create-menu rather than easy-menu-change.
Richard M. Stallman <rms@gnu.org>
parents: 45058
diff changeset
224 (cons "Holidays" (easy-menu-create-menu "Holidays" (nreverse l))))
22365
042d83ae4200 Fix menu separators.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22036
diff changeset
225 (define-key calendar-mode-map [menu-bar Holidays separator]
22036
342138eae82d Add separators to Holidays menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22035
diff changeset
226 '("--"))
22035
887dbe664b45 (calendar-mode-map): Rename `holidays' menu to `Holidays'.
Richard M. Stallman <rms@gnu.org>
parents: 22031
diff changeset
227 (define-key calendar-mode-map [menu-bar Holidays today]
22031
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
228 `(,(format "For Today (%s)"
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
229 (calendar-date-string (calendar-current-date) t t))
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
230 . cal-menu-today-holidays))
22027
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
231 (let ((title
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
232 (let ((m1 displayed-month)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
233 (y1 displayed-year)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
234 (m2 displayed-month)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
235 (y2 displayed-year))
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
236 (increment-calendar-month m1 y1 -1)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
237 (increment-calendar-month m2 y2 1)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
238 (if (= y1 y2)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
239 (format "%s-%s, %d"
52116
3132ffb5a7ab (displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents: 50465
diff changeset
240 (calendar-month-name m1 'abbrev)
3132ffb5a7ab (displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents: 50465
diff changeset
241 (calendar-month-name m2 'abbrev)
22027
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
242 y2)
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
243 (format "%s, %d-%s, %d"
52116
3132ffb5a7ab (displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents: 50465
diff changeset
244 (calendar-month-name m1 'abbrev)
22027
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
245 y1
52116
3132ffb5a7ab (displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents: 50465
diff changeset
246 (calendar-month-name m2 'abbrev)
22027
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
247 y2)))))
22035
887dbe664b45 (calendar-mode-map): Rename `holidays' menu to `Holidays'.
Richard M. Stallman <rms@gnu.org>
parents: 22031
diff changeset
248 (define-key calendar-mode-map [menu-bar Holidays 3-month]
887dbe664b45 (calendar-mode-map): Rename `holidays' menu to `Holidays'.
Richard M. Stallman <rms@gnu.org>
parents: 22031
diff changeset
249 `(,(format "For Window (%s)" title)
22027
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
250 . list-calendar-holidays)))
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
251 (let ((date (calendar-cursor-to-date)))
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
252 (if date
22035
887dbe664b45 (calendar-mode-map): Rename `holidays' menu to `Holidays'.
Richard M. Stallman <rms@gnu.org>
parents: 22031
diff changeset
253 (define-key calendar-mode-map [menu-bar Holidays 1-day]
23593
594ed104120c (cal-menu-update): Fix menu wording.
Karl Heuer <kwzh@gnu.org>
parents: 22414
diff changeset
254 `(,(format "For Cursor Date (%s)"
22027
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
255 (calendar-date-string date t t))
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
256 . calendar-cursor-holidays))))))
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
257 ;; Try to avoid entering infinite beep mode in case of errors.
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
258 (error (ding))))
aca7f8a34a9e Made holiday button on menu bar related to current calendar display.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20424
diff changeset
259
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
260 (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
261 "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
262 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
263 ERROR is t, otherwise just returns nil."
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
264 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
265 (set-buffer (window-buffer (posn-window (event-start last-input-event))))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
266 (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
267 (calendar-cursor-to-date error)))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
268
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
269 (defun calendar-mouse-insert-hebrew-diary-entry (event)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
270 "Pop up menu to insert a Hebrew-date diary entry."
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
271 (interactive "e")
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
272 (let ((hebrew-selection
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
273 (cal-menu-x-popup-menu
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
274 event
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
275 (list "Hebrew insert menu"
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
276 (list (calendar-hebrew-date-string (calendar-cursor-to-date))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
277 '("One time" . insert-hebrew-diary-entry)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
278 '("Monthly" . insert-monthly-hebrew-diary-entry)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
279 '("Yearly" . insert-yearly-hebrew-diary-entry))))))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
280 (and hebrew-selection (call-interactively hebrew-selection))))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
281
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
282 (defun calendar-mouse-insert-islamic-diary-entry (event)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
283 "Pop up menu to insert an Islamic-date diary entry."
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
284 (interactive "e")
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
285 (let ((islamic-selection
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
286 (cal-menu-x-popup-menu
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
287 event
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
288 (list "Islamic insert menu"
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
289 (list (calendar-islamic-date-string (calendar-cursor-to-date))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
290 '("One time" . insert-islamic-diary-entry)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
291 '("Monthly" . insert-monthly-islamic-diary-entry)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
292 '("Yearly" . insert-yearly-islamic-diary-entry))))))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
293 (and islamic-selection (call-interactively islamic-selection))))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
294
55431
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
295 (defun calendar-mouse-insert-bahai-diary-entry (event)
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
296 "Pop up menu to insert an Baha'i-date diary entry."
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
297 (interactive "e")
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
298 (let ((bahai-selection
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
299 (x-popup-menu
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
300 event
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
301 (list "Baha'i insert menu"
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
302 (list (calendar-bahai-date-string (calendar-cursor-to-date))
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
303 '("One time" . insert-bahai-diary-entry)
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
304 '("Monthly" . insert-monthly-bahai-diary-entry)
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
305 '("Yearly" . insert-yearly-bahai-diary-entry))))))
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
306 (and bahai-selection (call-interactively bahai-selection))))
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
307
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
308 (defun calendar-mouse-sunrise/sunset ()
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
309 "Show sunrise/sunset times for mouse-selected date."
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
310 (interactive)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
311 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
312 (calendar-mouse-goto-date (calendar-event-to-date))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
313 (calendar-sunrise-sunset)))
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
314
22031
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
315 (defun cal-menu-today-holidays ()
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
316 "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
317 (interactive)
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
318 (save-excursion
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
319 (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
320 (calendar-cursor-holidays)))
879df83433a1 Minor fix to earlier changes today.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22027
diff changeset
321
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
322 (defun calendar-mouse-holidays ()
22413
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
323 "Pop up menu of holidays for mouse selected date."
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
324 (interactive)
22413
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
325 (let* ((date (calendar-event-to-date))
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
326 (l (mapcar '(lambda (x) (list x))
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
327 (check-calendar-holidays date)))
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
328 (selection
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
329 (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
330 event
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
331 (list
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
332 (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
333 (append
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
334 (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
335 (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
336 (and selection (call-interactively selection))))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
337
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
338 (defun calendar-mouse-view-diary-entries (&optional date diary)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
339 "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
340 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
341
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
342 Any holidays are shown if `holidays-in-diary-buffer' is t."
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
343 (interactive)
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
344 (let* ((date (if date date (calendar-event-to-date)))
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
345 (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
346 (diary-list-include-blanks nil)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
347 (diary-display-hook 'ignore)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
348 (diary-entries
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
349 (mapcar '(lambda (x) (split-string (car (cdr x)) "\^M\\|\n"))
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
350 (list-diary-entries date 1)))
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
351 (holidays (if holidays-in-diary-buffer
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
352 (mapcar '(lambda (x) (list x))
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
353 (check-calendar-holidays date))))
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
354 (title (concat "Diary entries "
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
355 (if diary (format "from %s " diary) "")
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
356 "for "
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
357 (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
358 (selection
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
359 (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
360 event
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
361 (list title
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
362 (append
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
363 (list title)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
364 (if holidays
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
365 (mapcar '(lambda (x) (list (concat " " (car x))))
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
366 holidays))
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
367 (if holidays
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
368 (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
369 (if diary-entries
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
370 (mapcar 'list (calendar-flatten diary-entries))
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
371 '("None")))))))
22413
be2f536a1358 Rewrote calendar-mouse-holidays, calendar-mouse-view-diary-entries,
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 22365
diff changeset
372 (and selection (call-interactively selection))))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
373
9766
71c37f31a02d Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9734
diff changeset
374 (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
375 "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
376 (interactive)
52230
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
377 (calendar-mouse-view-diary-entries
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
378 (calendar-event-to-date)
75388c0f3104 Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents: 52116
diff changeset
379 (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
380
9710
b5fb08fb2cb3 Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 8308
diff changeset
381 (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
382 "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
383 (interactive)
b5fb08fb2cb3 Put insertion of diary entry on daily menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 8308
diff changeset
384 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
385 (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
386 (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
387
7412
f067e1a5ceb4 (calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7403
diff changeset
388 (defun calendar-mouse-set-mark ()
f067e1a5ceb4 (calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7403
diff changeset
389 "Mark the date under the cursor."
f067e1a5ceb4 (calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7403
diff changeset
390 (interactive)
f067e1a5ceb4 (calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7403
diff changeset
391 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
392 (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
393 (calendar-set-mark nil)))
f067e1a5ceb4 (calendar-mouse-set-mark): New function.
Richard M. Stallman <rms@gnu.org>
parents: 7403
diff changeset
394
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
395 (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
396 "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
397 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
398 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
399 (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
400 (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
401
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
402 (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
403 "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
404 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
405 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
406 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
407 (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
408 (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
409
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
410 (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
411 "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
412 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
413 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
414 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
415 (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
416 (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
417
13689
a04244ec8530 Repair function names from rms error in modifying!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13285
diff changeset
418 (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
419 "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
420 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
421 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
422 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
423 (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
424 (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
425
13689
a04244ec8530 Repair function names from rms error in modifying!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13285
diff changeset
426 (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
427 "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
428 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
429 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
430 (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
431 (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
432
19975
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
433 (defun cal-tex-mouse-filofax-daily ()
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
434 "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
435 (interactive)
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
436 (save-excursion
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
437 (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
438 (cal-tex-cursor-filofax-daily nil)))
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
439
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
440 (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
441 "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
442 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
443 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
444 (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
445 (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
446
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
447 (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
448 "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
449 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
450 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
451 (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
452 (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
453
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
454 (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
455 "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
456 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
457 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
458 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
459 (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
460 (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
461
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
462 (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
463 "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
464 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
465 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
466 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
467 (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
468 (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
469
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
470 (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
471 "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
472 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
473 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
474 (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
475 (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
476
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
477 (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
478 "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
479 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
480 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
481 (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
482 (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
483
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
484 (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
485 "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
486 (interactive)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
487 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
488 (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
489 (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
490
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
491 (defun calendar-mouse-print-dates ()
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
492 "Pop up menu of equivalent dates to mouse selected date."
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
493 (interactive)
13047
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
494 (let ((date (calendar-event-to-date))
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
495 (selection
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
496 (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
497 event
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
498 (list
13876
16decb4ae75f Put date on top of other-calendars menu.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13690
diff changeset
499 (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
500 (append
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
501 (list
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
502 (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
503 (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
504 (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
505 (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
506 (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
507 (list
15068
47ef84d3738d Spelling fix.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 14951
diff changeset
508 (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
509 (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
510 (list
20424
bfc68d8546f3 Minor repair of previous change.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20423
diff changeset
511 (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
512 (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
513 (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
514 (calendar-hebrew-date-string date)))
5a4b28f19b75 Add references to Persian calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 14169
diff changeset
515 (list (format "Persian date: %s"
55431
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
516 (calendar-persian-date-string date)))
b278cb498cc8 2004-05-08 John Wiegley <johnw@newartisans.com>
John Wiegley <johnw@newartisans.com>
parents: 52401
diff changeset
517 (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
518 (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
519 (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
520 (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
521 (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
522 (list
7ccba52e1e3e Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13194
diff changeset
523 (list (format "Chinese date: %s"
7ccba52e1e3e Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13194
diff changeset
524 (calendar-chinese-date-string date))))
7ccba52e1e3e Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13194
diff changeset
525 ; (list '("Chinese date (select to echo Chinese date)"
7ccba52e1e3e Fix menu for Chinese calendar.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13194
diff changeset
526 ; . 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
527 (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
528 (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
529 (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
530 (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
531 (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
532 (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
533 (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
534 (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
535 (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
536 (list
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
537 (list
6c3c9645fbfd Added new calendars to menus and made minor fixes.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12033
diff changeset
538 (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
539 (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
540 (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
541
13063
30ee606ce331 Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13047
diff changeset
542 (defun calendar-mouse-chinese-date ()
30ee606ce331 Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13047
diff changeset
543 "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
544 (interactive)
30ee606ce331 Fix display of Chinese date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13047
diff changeset
545 (save-excursion
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
546 (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
547 (calendar-print-chinese-date)))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
548
14951
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
549 (defun calendar-mouse-goto-date (date)
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
550 (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
551 (calendar-goto-date date))
15ab8e95a50a (calendar-mouse-goto-date): New function.
Richard M. Stallman <rms@gnu.org>
parents: 14915
diff changeset
552
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
553 (defun calendar-mouse-2-date-menu (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
554 "Pop up menu for Mouse-2 for selected date in the calendar window."
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
555 (interactive "e")
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
556 (let* ((date (calendar-event-to-date t))
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
557 (selection
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
558 (cal-menu-x-popup-menu
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
559 event
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
560 (list (calendar-date-string date t 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
561 (list
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
562 ""
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
563 '("Holidays" . calendar-mouse-holidays)
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
564 '("Mark date" . calendar-mouse-set-mark)
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
565 '("Sunrise/sunset" . calendar-mouse-sunrise/sunset)
9766
71c37f31a02d Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9734
diff changeset
566 '("Other calendars" . calendar-mouse-print-dates)
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
567 '("Prepare LaTeX buffer" . calendar-mouse-cal-tex-menu)
9766
71c37f31a02d Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9734
diff changeset
568 '("Diary entries" . calendar-mouse-view-diary-entries)
71c37f31a02d Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9734
diff changeset
569 '("Insert diary entry" . calendar-mouse-insert-diary-entry)
71c37f31a02d Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9734
diff changeset
570 '("Other diary file entries"
71c37f31a02d Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9734
diff changeset
571 . calendar-mouse-view-other-diary-entries)
71c37f31a02d Bind new function to mouse.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 9734
diff changeset
572 )))))
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
573 (and selection (call-interactively selection))))
27fdaecd7cb1 (calendar-mode-map): Change binding of Mouse-2. Bind Mouse-3.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 7412
diff changeset
574
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
575 (defun calendar-mouse-cal-tex-menu (event)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
576 "Pop up submenu for Mouse-2 for cal-tex commands for selected date in the calendar window."
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
577 (interactive "e")
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
578 (let* ((selection
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
579 (cal-menu-x-popup-menu
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
580 event
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
581 (list (calendar-date-string date 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
582 (list
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
583 ""
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
584 '("Daily (1 page)" . 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
585 '("Weekly (1 page)" . 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
586 '("Weekly (2 pages)" . cal-tex-mouse-week2)
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
587 '("Weekly (other style; 1 page)" . cal-tex-mouse-week-iso)
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
588 '("Weekly (yet another style; 1 page)" .
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
589 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
590 '("Monthly" . 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
591 '("Monthly (landscape)" . 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
592 '("Yearly" . 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
593 '("Yearly (landscape)" . 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
594 '("Filofax styles" . cal-tex-mouse-filofax)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
595 )))))
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
596 (and selection (call-interactively selection))))
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
597
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
598 (defun cal-tex-mouse-filofax (event)
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
599 "Pop up sub-submenu for Mouse-2 for Filofax cal-tex commands for selected date."
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
600 (interactive "e")
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
601 (let* ((selection
39524
291264d596e9 (cal-menu-x-popup-menu): New function,
Eli Zaretskii <eliz@gnu.org>
parents: 39133
diff changeset
602 (cal-menu-x-popup-menu
13194
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
603 event
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
604 (list (calendar-date-string date 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
605 (list
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
606 ""
19975
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
607 '("Filofax Daily (one-day-per-page)" .
927a8710de05 (cal-tex-mouse-filofax-daily): New function.
Karl Heuer <kwzh@gnu.org>
parents: 19950
diff changeset
608 cal-tex-mouse-filofax-daily)
13690
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
609 '("Filofax Weekly (2-weeks-at-a-glance)" .
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
610 cal-tex-mouse-filofax-2week)
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
611 '("Filofax Weekly (week-at-a-glance)" .
8a3ceaf9bfee More repairs of wrong function names in menus!
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13689
diff changeset
612 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
613 '("Filofax Yearly" . 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
614 )))))
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
615 (and selection (call-interactively selection))))
7e90c5fce35f Added menu items for cal-tex.el (a new file).
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 13063
diff changeset
616
7478
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
617 (define-key calendar-mouse-3-map [exit-calendar]
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
618 '("Exit calendar" . exit-calendar))
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
619 (define-key calendar-mouse-3-map [show-diary]
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
620 '("Show diary" . show-all-diary-entries))
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
621 (define-key calendar-mouse-3-map [lunar-phases]
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
622 '("Lunar phases" . calendar-phases-of-moon))
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
623 (define-key calendar-mouse-3-map [unmark]
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
624 '("Unmark" . calendar-unmark))
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
625 (define-key calendar-mouse-3-map [mark-holidays]
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
626 '("Mark holidays" . mark-calendar-holidays))
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
627 (define-key calendar-mouse-3-map [list-holidays]
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
628 '("List holidays" . list-calendar-holidays))
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
629 (define-key calendar-mouse-3-map [mark-diary-entries]
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
630 '("Mark diary entries" . mark-diary-entries))
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
631 (define-key calendar-mouse-3-map [scroll-backward]
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
632 '("Scroll backward" . scroll-calendar-right-three-months))
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
633 (define-key calendar-mouse-3-map [scroll-forward]
57cfbcfdf92a Rewrite mouse-3 menu as a keymap.
Richard M. Stallman <rms@gnu.org>
parents: 7442
diff changeset
634 '("Scroll forward" . scroll-calendar-left-three-months))
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
635
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
636 (run-hooks 'cal-menu-load-hook)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
637
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
638 (provide 'cal-menu)
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
639
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 52230
diff changeset
640 ;;; arch-tag: aa81cf73-ce89-48a4-97ec-9ef861e87fe9
5701
b2f1e7bb5d00 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
641 ;;; cal-menu.el ends here