Mercurial > emacs
annotate lisp/calendar/cal-move.el @ 93674:44fab469d68d
* outline.el (outline-mode-menu-bar-map):
* term.el (terminal-signal-menu): Add :help.
* net/eudc.el (eudc-mode-map): Declare and define in one step.
(eudc-tail-menu, eudc-server-menu, eudc-tools-menu): Add :help.
* emacs-lisp/re-builder.el (reb-mode-map):
* textmodes/nroff-mode.el (nroff-mode-map): Add menus.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Fri, 04 Apr 2008 22:45:01 +0000 |
parents | b9615f927009 |
children | 3ff2b47de8f2 |
rev | line source |
---|---|
13053 | 1 ;;; cal-move.el --- calendar functions for movement in the calendar |
2 | |
79703 | 3 ;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 |
67465
a55ee709ec8d
Update copyright pending Emacs 22.
Glenn Morris <rgm@gnu.org>
parents:
65919
diff
changeset
|
4 ;; Free Software Foundation, Inc. |
13053 | 5 |
6 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> | |
65919
5c09efcfc1d9
Update maintainer email address.
Glenn Morris <rgm@gnu.org>
parents:
64085
diff
changeset
|
7 ;; Maintainer: Glenn Morris <rgm@gnu.org> |
13053 | 8 ;; Keywords: calendar |
9 ;; Human-Keywords: calendar | |
10 | |
11 ;; This file is part of GNU Emacs. | |
12 | |
13 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
14 ;; it under the terms of the GNU General Public License as published by | |
78216
93e11478c954
Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents:
77279
diff
changeset
|
15 ;; the Free Software Foundation; either version 3, or (at your option) |
13053 | 16 ;; any later version. |
17 | |
18 ;; GNU Emacs is distributed in the hope that it will be useful, | |
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 ;; GNU General Public License for more details. | |
22 | |
23 ;; You should have received a copy of the GNU General Public License | |
14169 | 24 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
64085 | 25 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
26 ;; Boston, MA 02110-1301, USA. | |
13053 | 27 |
28 ;;; Commentary: | |
29 | |
93486
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
30 ;; See calendar.el. |
13053 | 31 |
32 ;;; Code: | |
33 | |
92916
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
34 (require 'calendar) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
35 |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
36 ;;;###cal-autoload |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
37 (defun calendar-cursor-to-nearest-date () |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
38 "Move the cursor to the closest date. |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
39 The position of the cursor is unchanged if it is already on a date. |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
40 Returns the list (month day year) giving the cursor position." |
93329
6139daabcf5f
(calendar-cursor-to-nearest-date): Remove un-needed local `date'.
Glenn Morris <rgm@gnu.org>
parents:
92916
diff
changeset
|
41 (or (calendar-cursor-to-date) |
6139daabcf5f
(calendar-cursor-to-nearest-date): Remove un-needed local `date'.
Glenn Morris <rgm@gnu.org>
parents:
92916
diff
changeset
|
42 (let ((column (current-column))) |
92916
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
43 (when (> 3 (count-lines (point-min) (point))) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
44 (goto-line 3) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
45 (move-to-column column)) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
46 (if (not (looking-at "[0-9]")) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
47 (if (and (not (looking-at " *$")) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
48 (or (< column 25) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
49 (and (> column 27) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
50 (< column 50)) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
51 (and (> column 52) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
52 (< column 75)))) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
53 (progn |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
54 (re-search-forward "[0-9]" nil t) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
55 (backward-char 1)) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
56 (re-search-backward "[0-9]" nil t))) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
57 (calendar-cursor-to-date)))) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
58 |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
59 (defvar displayed-month) ; from generate-calendar |
52112
e7d0572ccca5
(displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents:
31670
diff
changeset
|
60 (defvar displayed-year) |
e7d0572ccca5
(displayed-month, displayed-year): Define for compiler.
Glenn Morris <rgm@gnu.org>
parents:
31670
diff
changeset
|
61 |
92916
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
62 ;;;###cal-autoload |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
63 (defun calendar-cursor-to-visible-date (date) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
64 "Move the cursor to DATE that is on the screen." |
93329
6139daabcf5f
(calendar-cursor-to-nearest-date): Remove un-needed local `date'.
Glenn Morris <rgm@gnu.org>
parents:
92916
diff
changeset
|
65 (let ((month (extract-calendar-month date)) |
6139daabcf5f
(calendar-cursor-to-nearest-date): Remove un-needed local `date'.
Glenn Morris <rgm@gnu.org>
parents:
92916
diff
changeset
|
66 (day (extract-calendar-day date)) |
6139daabcf5f
(calendar-cursor-to-nearest-date): Remove un-needed local `date'.
Glenn Morris <rgm@gnu.org>
parents:
92916
diff
changeset
|
67 (year (extract-calendar-year date))) |
92916
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
68 (goto-line (+ 3 |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
69 (/ (+ day -1 |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
70 (mod |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
71 (- (calendar-day-of-week (list month 1 year)) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
72 calendar-week-start-day) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
73 7)) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
74 7))) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
75 (move-to-column (+ 6 |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
76 (* 25 |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
77 (1+ (calendar-interval |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
78 displayed-month displayed-year month year))) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
79 (* 3 (mod |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
80 (- (calendar-day-of-week date) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
81 calendar-week-start-day) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
82 7)))))) |
19892 | 83 |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
84 ;;;###cal-autoload |
13053 | 85 (defun calendar-goto-today () |
86 "Reposition the calendar window so the current date is visible." | |
87 (interactive) | |
92916
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
88 (let ((today (calendar-current-date))) ; the date might have changed |
13053 | 89 (if (not (calendar-date-is-visible-p today)) |
90 (generate-calendar-window) | |
91 (update-calendar-mode-line) | |
25411
0d68ae69cd8c
Call the new hook in every movement function.
Richard M. Stallman <rms@gnu.org>
parents:
24337
diff
changeset
|
92 (calendar-cursor-to-visible-date today))) |
0d68ae69cd8c
Call the new hook in every movement function.
Richard M. Stallman <rms@gnu.org>
parents:
24337
diff
changeset
|
93 (run-hooks 'calendar-move-hook)) |
13053 | 94 |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
95 ;;;###cal-autoload |
13053 | 96 (defun calendar-forward-month (arg) |
97 "Move the cursor forward ARG months. | |
98 Movement is backward if ARG is negative." | |
99 (interactive "p") | |
100 (calendar-cursor-to-nearest-date) | |
101 (let* ((cursor-date (calendar-cursor-to-date t)) | |
102 (month (extract-calendar-month cursor-date)) | |
103 (day (extract-calendar-day cursor-date)) | |
93486
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
104 (year (extract-calendar-year cursor-date)) |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
105 (last (progn |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
106 (increment-calendar-month month year arg) |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
107 (calendar-last-day-of-month month year))) |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
108 (day (min last day)) |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
109 ;; Put the new month on the screen, if needed, and go to the new date. |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
110 (new-cursor-date (list month day year))) |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
111 (if (not (calendar-date-is-visible-p new-cursor-date)) |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
112 (calendar-other-month month year)) |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
113 (calendar-cursor-to-visible-date new-cursor-date)) |
25411
0d68ae69cd8c
Call the new hook in every movement function.
Richard M. Stallman <rms@gnu.org>
parents:
24337
diff
changeset
|
114 (run-hooks 'calendar-move-hook)) |
13053 | 115 |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
116 ;;;###cal-autoload |
13053 | 117 (defun calendar-forward-year (arg) |
118 "Move the cursor forward by ARG years. | |
119 Movement is backward if ARG is negative." | |
120 (interactive "p") | |
121 (calendar-forward-month (* 12 arg))) | |
122 | |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
123 ;;;###cal-autoload |
13053 | 124 (defun calendar-backward-month (arg) |
125 "Move the cursor backward by ARG months. | |
126 Movement is forward if ARG is negative." | |
127 (interactive "p") | |
128 (calendar-forward-month (- arg))) | |
129 | |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
130 ;;;###cal-autoload |
13053 | 131 (defun calendar-backward-year (arg) |
132 "Move the cursor backward ARG years. | |
133 Movement is forward is ARG is negative." | |
134 (interactive "p") | |
135 (calendar-forward-month (* -12 arg))) | |
136 | |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
137 ;;;###cal-autoload |
82150
0d322d300115
(calendar-scroll-left, calendar-scroll-right):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
82148
diff
changeset
|
138 (defun calendar-scroll-left (&optional arg event) |
13053 | 139 "Scroll the displayed calendar left by ARG months. |
140 If ARG is negative the calendar is scrolled right. Maintains the relative | |
92634
decf6dfe9876
(calendar-scroll-left, calendar-scroll-right): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
92590
diff
changeset
|
141 position of the cursor with respect to the calendar as well as possible. |
decf6dfe9876
(calendar-scroll-left, calendar-scroll-right): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
92590
diff
changeset
|
142 EVENT is an event like `last-nonmenu-event'." |
82150
0d322d300115
(calendar-scroll-left, calendar-scroll-right):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
82148
diff
changeset
|
143 (interactive (list (prefix-numeric-value current-prefix-arg) |
0d322d300115
(calendar-scroll-left, calendar-scroll-right):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
82148
diff
changeset
|
144 last-nonmenu-event)) |
31670 | 145 (unless arg (setq arg 1)) |
82150
0d322d300115
(calendar-scroll-left, calendar-scroll-right):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
82148
diff
changeset
|
146 (save-selected-window |
0d322d300115
(calendar-scroll-left, calendar-scroll-right):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
82148
diff
changeset
|
147 (select-window (posn-window (event-start event))) |
0d322d300115
(calendar-scroll-left, calendar-scroll-right):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
82148
diff
changeset
|
148 (calendar-cursor-to-nearest-date) |
92916
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
149 (unless (zerop arg) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
150 (let ((old-date (calendar-cursor-to-date)) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
151 (today (calendar-current-date)) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
152 (month displayed-month) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
153 (year displayed-year)) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
154 (increment-calendar-month month year arg) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
155 (generate-calendar-window month year) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
156 (calendar-cursor-to-visible-date |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
157 (cond |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
158 ((calendar-date-is-visible-p old-date) old-date) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
159 ((calendar-date-is-visible-p today) today) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
160 (t (list month 1 year)))))) |
82150
0d322d300115
(calendar-scroll-left, calendar-scroll-right):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
82148
diff
changeset
|
161 (run-hooks 'calendar-move-hook))) |
13053 | 162 |
92916
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
163 (define-obsolete-function-alias |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
164 'scroll-calendar-left 'calendar-scroll-left "23.1") |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
165 |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
166 ;;;###cal-autoload |
82150
0d322d300115
(calendar-scroll-left, calendar-scroll-right):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
82148
diff
changeset
|
167 (defun calendar-scroll-right (&optional arg event) |
13053 | 168 "Scroll the displayed calendar window right by ARG months. |
169 If ARG is negative the calendar is scrolled left. Maintains the relative | |
92634
decf6dfe9876
(calendar-scroll-left, calendar-scroll-right): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
92590
diff
changeset
|
170 position of the cursor with respect to the calendar as well as possible. |
decf6dfe9876
(calendar-scroll-left, calendar-scroll-right): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
92590
diff
changeset
|
171 EVENT is an event like `last-nonmenu-event'." |
82150
0d322d300115
(calendar-scroll-left, calendar-scroll-right):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
82148
diff
changeset
|
172 (interactive (list (prefix-numeric-value current-prefix-arg) |
0d322d300115
(calendar-scroll-left, calendar-scroll-right):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
82148
diff
changeset
|
173 last-nonmenu-event)) |
0d322d300115
(calendar-scroll-left, calendar-scroll-right):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
82148
diff
changeset
|
174 (calendar-scroll-left (- (or arg 1)) event)) |
13053 | 175 |
92916
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
176 (define-obsolete-function-alias |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
177 'scroll-calendar-right 'calendar-scroll-right "23.1") |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
178 |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
179 ;;;###cal-autoload |
82148
d979cb10446a
(calendar-scroll-left, calendar-scroll-right, calendar-scroll-left-three-months)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78216
diff
changeset
|
180 (defun calendar-scroll-left-three-months (arg) |
13053 | 181 "Scroll the displayed calendar window left by 3*ARG months. |
182 If ARG is negative the calendar is scrolled right. Maintains the relative | |
183 position of the cursor with respect to the calendar as well as possible." | |
184 (interactive "p") | |
82148
d979cb10446a
(calendar-scroll-left, calendar-scroll-right, calendar-scroll-left-three-months)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78216
diff
changeset
|
185 (calendar-scroll-left (* 3 arg))) |
13053 | 186 |
92916
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
187 (define-obsolete-function-alias 'scroll-calendar-left-three-months |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
188 'calendar-scroll-left-three-months "23.1") |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
189 |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
190 ;;;###cal-autoload |
82148
d979cb10446a
(calendar-scroll-left, calendar-scroll-right, calendar-scroll-left-three-months)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78216
diff
changeset
|
191 (defun calendar-scroll-right-three-months (arg) |
13053 | 192 "Scroll the displayed calendar window right by 3*ARG months. |
193 If ARG is negative the calendar is scrolled left. Maintains the relative | |
194 position of the cursor with respect to the calendar as well as possible." | |
195 (interactive "p") | |
82148
d979cb10446a
(calendar-scroll-left, calendar-scroll-right, calendar-scroll-left-three-months)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78216
diff
changeset
|
196 (calendar-scroll-left (* -3 arg))) |
13053 | 197 |
92916
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
198 (define-obsolete-function-alias 'scroll-calendar-right-three-months |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
199 'calendar-scroll-right-three-months "23.1") |
13053 | 200 |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
201 ;;;###cal-autoload |
13053 | 202 (defun calendar-forward-day (arg) |
203 "Move the cursor forward ARG days. | |
204 Moves backward if ARG is negative." | |
205 (interactive "p") | |
92916
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
206 (unless (zerop arg) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
207 (let* ((cursor-date (or (calendar-cursor-to-date) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
208 (progn |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
209 (if (> arg 0) (setq arg (1- arg))) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
210 (calendar-cursor-to-nearest-date)))) |
13053 | 211 (new-cursor-date |
212 (calendar-gregorian-from-absolute | |
213 (+ (calendar-absolute-from-gregorian cursor-date) arg))) | |
214 (new-display-month (extract-calendar-month new-cursor-date)) | |
215 (new-display-year (extract-calendar-year new-cursor-date))) | |
92916
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
216 ;; Put the new month on the screen, if needed, and go to the new date. |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
217 (if (not (calendar-date-is-visible-p new-cursor-date)) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
218 (calendar-other-month new-display-month new-display-year)) |
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
219 (calendar-cursor-to-visible-date new-cursor-date))) |
25411
0d68ae69cd8c
Call the new hook in every movement function.
Richard M. Stallman <rms@gnu.org>
parents:
24337
diff
changeset
|
220 (run-hooks 'calendar-move-hook)) |
13053 | 221 |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
222 ;;;###cal-autoload |
13053 | 223 (defun calendar-backward-day (arg) |
224 "Move the cursor back ARG days. | |
225 Moves forward if ARG is negative." | |
226 (interactive "p") | |
227 (calendar-forward-day (- arg))) | |
228 | |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
229 ;;;###cal-autoload |
13053 | 230 (defun calendar-forward-week (arg) |
231 "Move the cursor forward ARG weeks. | |
232 Moves backward if ARG is negative." | |
233 (interactive "p") | |
234 (calendar-forward-day (* arg 7))) | |
235 | |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
236 ;;;###cal-autoload |
13053 | 237 (defun calendar-backward-week (arg) |
238 "Move the cursor back ARG weeks. | |
239 Moves forward if ARG is negative." | |
240 (interactive "p") | |
241 (calendar-forward-day (* arg -7))) | |
242 | |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
243 ;;;###cal-autoload |
13053 | 244 (defun calendar-beginning-of-week (arg) |
245 "Move the cursor back ARG calendar-week-start-day's." | |
246 (interactive "p") | |
247 (calendar-cursor-to-nearest-date) | |
248 (let ((day (calendar-day-of-week (calendar-cursor-to-date)))) | |
249 (calendar-backward-day | |
250 (if (= day calendar-week-start-day) | |
251 (* 7 arg) | |
252 (+ (mod (- day calendar-week-start-day) 7) | |
253 (* 7 (1- arg))))))) | |
254 | |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
255 ;;;###cal-autoload |
13053 | 256 (defun calendar-end-of-week (arg) |
257 "Move the cursor forward ARG calendar-week-start-day+6's." | |
258 (interactive "p") | |
259 (calendar-cursor-to-nearest-date) | |
260 (let ((day (calendar-day-of-week (calendar-cursor-to-date)))) | |
261 (calendar-forward-day | |
262 (if (= day (mod (1- calendar-week-start-day) 7)) | |
263 (* 7 arg) | |
264 (+ (- 6 (mod (- day calendar-week-start-day) 7)) | |
265 (* 7 (1- arg))))))) | |
266 | |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
267 ;;;###cal-autoload |
13053 | 268 (defun calendar-beginning-of-month (arg) |
269 "Move the cursor backward ARG month beginnings." | |
270 (interactive "p") | |
271 (calendar-cursor-to-nearest-date) | |
272 (let* ((date (calendar-cursor-to-date)) | |
273 (month (extract-calendar-month date)) | |
274 (day (extract-calendar-day date)) | |
275 (year (extract-calendar-year date))) | |
276 (if (= day 1) | |
277 (calendar-backward-month arg) | |
278 (calendar-cursor-to-visible-date (list month 1 year)) | |
279 (calendar-backward-month (1- arg))))) | |
280 | |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
281 ;;;###cal-autoload |
13053 | 282 (defun calendar-end-of-month (arg) |
283 "Move the cursor forward ARG month ends." | |
284 (interactive "p") | |
285 (calendar-cursor-to-nearest-date) | |
286 (let* ((date (calendar-cursor-to-date)) | |
287 (month (extract-calendar-month date)) | |
288 (day (extract-calendar-day date)) | |
289 (year (extract-calendar-year date)) | |
93486
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
290 (last-day (calendar-last-day-of-month month year)) |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
291 (last-day (progn |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
292 (unless (= day last-day) |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
293 (calendar-cursor-to-visible-date |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
294 (list month last-day year)) |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
295 (setq arg (1- arg))) |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
296 (increment-calendar-month month year arg) |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
297 (list month |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
298 (calendar-last-day-of-month month year) |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
299 year)))) |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
300 (if (not (calendar-date-is-visible-p last-day)) |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
301 (calendar-other-month month year) |
b9615f927009
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93329
diff
changeset
|
302 (calendar-cursor-to-visible-date last-day))) |
25411
0d68ae69cd8c
Call the new hook in every movement function.
Richard M. Stallman <rms@gnu.org>
parents:
24337
diff
changeset
|
303 (run-hooks 'calendar-move-hook)) |
13053 | 304 |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
305 ;;;###cal-autoload |
13053 | 306 (defun calendar-beginning-of-year (arg) |
307 "Move the cursor backward ARG year beginnings." | |
308 (interactive "p") | |
309 (calendar-cursor-to-nearest-date) | |
310 (let* ((date (calendar-cursor-to-date)) | |
311 (month (extract-calendar-month date)) | |
312 (day (extract-calendar-day date)) | |
313 (year (extract-calendar-year date)) | |
25411
0d68ae69cd8c
Call the new hook in every movement function.
Richard M. Stallman <rms@gnu.org>
parents:
24337
diff
changeset
|
314 (jan-first (list 1 1 year)) |
0d68ae69cd8c
Call the new hook in every movement function.
Richard M. Stallman <rms@gnu.org>
parents:
24337
diff
changeset
|
315 (calendar-move-hook nil)) |
13053 | 316 (if (and (= day 1) (= 1 month)) |
317 (calendar-backward-month (* 12 arg)) | |
318 (if (and (= arg 1) | |
319 (calendar-date-is-visible-p jan-first)) | |
320 (calendar-cursor-to-visible-date jan-first) | |
60981
669da3d2cff9
Update copyright and maintainer.
Glenn Morris <rgm@gnu.org>
parents:
52401
diff
changeset
|
321 (calendar-other-month 1 (- year (1- arg))) |
669da3d2cff9
Update copyright and maintainer.
Glenn Morris <rgm@gnu.org>
parents:
52401
diff
changeset
|
322 (calendar-cursor-to-visible-date (list 1 1 displayed-year))))) |
25411
0d68ae69cd8c
Call the new hook in every movement function.
Richard M. Stallman <rms@gnu.org>
parents:
24337
diff
changeset
|
323 (run-hooks 'calendar-move-hook)) |
13053 | 324 |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
325 ;;;###cal-autoload |
13053 | 326 (defun calendar-end-of-year (arg) |
327 "Move the cursor forward ARG year beginnings." | |
328 (interactive "p") | |
329 (calendar-cursor-to-nearest-date) | |
330 (let* ((date (calendar-cursor-to-date)) | |
331 (month (extract-calendar-month date)) | |
332 (day (extract-calendar-day date)) | |
333 (year (extract-calendar-year date)) | |
25411
0d68ae69cd8c
Call the new hook in every movement function.
Richard M. Stallman <rms@gnu.org>
parents:
24337
diff
changeset
|
334 (dec-31 (list 12 31 year)) |
0d68ae69cd8c
Call the new hook in every movement function.
Richard M. Stallman <rms@gnu.org>
parents:
24337
diff
changeset
|
335 (calendar-move-hook nil)) |
13053 | 336 (if (and (= day 31) (= 12 month)) |
337 (calendar-forward-month (* 12 arg)) | |
338 (if (and (= arg 1) | |
339 (calendar-date-is-visible-p dec-31)) | |
340 (calendar-cursor-to-visible-date dec-31) | |
60981
669da3d2cff9
Update copyright and maintainer.
Glenn Morris <rgm@gnu.org>
parents:
52401
diff
changeset
|
341 (calendar-other-month 12 (+ year (1- arg))) |
25411
0d68ae69cd8c
Call the new hook in every movement function.
Richard M. Stallman <rms@gnu.org>
parents:
24337
diff
changeset
|
342 (calendar-cursor-to-visible-date (list 12 31 displayed-year))))) |
0d68ae69cd8c
Call the new hook in every movement function.
Richard M. Stallman <rms@gnu.org>
parents:
24337
diff
changeset
|
343 (run-hooks 'calendar-move-hook)) |
13053 | 344 |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
345 ;;;###cal-autoload |
13053 | 346 (defun calendar-goto-date (date) |
347 "Move cursor to DATE." | |
348 (interactive (list (calendar-read-date))) | |
349 (let ((month (extract-calendar-month date)) | |
350 (year (extract-calendar-year date))) | |
351 (if (not (calendar-date-is-visible-p date)) | |
352 (calendar-other-month | |
353 (if (and (= month 1) (= year 1)) | |
354 2 | |
355 month) | |
356 year))) | |
25411
0d68ae69cd8c
Call the new hook in every movement function.
Richard M. Stallman <rms@gnu.org>
parents:
24337
diff
changeset
|
357 (calendar-cursor-to-visible-date date) |
0d68ae69cd8c
Call the new hook in every movement function.
Richard M. Stallman <rms@gnu.org>
parents:
24337
diff
changeset
|
358 (run-hooks 'calendar-move-hook)) |
13053 | 359 |
92836
e4347538b00b
(generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents:
92634
diff
changeset
|
360 ;;;###cal-autoload |
52231
9529ff0804c2
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52112
diff
changeset
|
361 (defun calendar-goto-day-of-year (year day &optional noecho) |
92916
f296fd96bd7c
(calendar-cursor-to-nearest-date): Use or, when. Move definition before use.
Glenn Morris <rgm@gnu.org>
parents:
92855
diff
changeset
|
362 "Move cursor to YEAR, DAY number; echo DAY/YEAR unless NOECHO is non-nil. |
52231
9529ff0804c2
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52112
diff
changeset
|
363 Negative DAY counts backward from end of year." |
9529ff0804c2
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52112
diff
changeset
|
364 (interactive |
9529ff0804c2
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52112
diff
changeset
|
365 (let* ((year (calendar-read |
9529ff0804c2
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52112
diff
changeset
|
366 "Year (>0): " |
9529ff0804c2
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52112
diff
changeset
|
367 (lambda (x) (> x 0)) |
9529ff0804c2
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52112
diff
changeset
|
368 (int-to-string (extract-calendar-year |
9529ff0804c2
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52112
diff
changeset
|
369 (calendar-current-date))))) |
9529ff0804c2
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52112
diff
changeset
|
370 (last (if (calendar-leap-year-p year) 366 365)) |
9529ff0804c2
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52112
diff
changeset
|
371 (day (calendar-read |
9529ff0804c2
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52112
diff
changeset
|
372 (format "Day number (+/- 1-%d): " last) |
92590
8ef3d5355402
Unquote lambda functions. Add autoload cookies to functions formerly
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
373 (lambda (x) (and (<= 1 (abs x)) (<= (abs x) last)))))) |
52231
9529ff0804c2
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52112
diff
changeset
|
374 (list year day))) |
9529ff0804c2
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52112
diff
changeset
|
375 (calendar-goto-date |
9529ff0804c2
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52112
diff
changeset
|
376 (calendar-gregorian-from-absolute |
9529ff0804c2
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52112
diff
changeset
|
377 (if (< 0 day) |
9529ff0804c2
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52112
diff
changeset
|
378 (+ -1 day (calendar-absolute-from-gregorian (list 1 1 year))) |
9529ff0804c2
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52112
diff
changeset
|
379 (+ 1 day (calendar-absolute-from-gregorian (list 12 31 year)))))) |
9529ff0804c2
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52112
diff
changeset
|
380 (or noecho (calendar-print-day-of-year))) |
9529ff0804c2
Edward M. Reingold <reingold@emr.cs.iit.edu>
Glenn Morris <rgm@gnu.org>
parents:
52112
diff
changeset
|
381 |
13053 | 382 (provide 'cal-move) |
383 | |
82148
d979cb10446a
(calendar-scroll-left, calendar-scroll-right, calendar-scroll-left-three-months)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78216
diff
changeset
|
384 ;; arch-tag: d0883c46-7e16-4914-8ff8-8f67e699b781 |
13053 | 385 ;;; cal-move.el ends here |