summaryrefslogtreecommitdiff
path: root/lisp/calendar
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2003-08-17 22:51:29 +0000
committerGlenn Morris <rgm@gnu.org>2003-08-17 22:51:29 +0000
commit8923d271caf0b9e7aefe5c688df3e6cc31b6cd95 (patch)
tree736fb52943a2ebe08d3583a7af7bcc5ea71f16c8 /lisp/calendar
parent163fd24dfd910260ae15255c4eaada4ea4aabc23 (diff)
downloademacs-8923d271caf0b9e7aefe5c688df3e6cc31b6cd95.tar.gz
Edward M. Reingold <reingold@emr.cs.iit.edu>
Bind `calendar-goto-day-of-year' to key. Alan Shutko <ats@acm.org> (calendar-make-alist): Correct off-by-one keeping December out of the alist.
Diffstat (limited to 'lisp/calendar')
-rw-r--r--lisp/calendar/calendar.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index e99e0b09d51..51999f8d3b1 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1406,6 +1406,10 @@ The Gregorian date Sunday, December 31, 1 BC is imaginary."
"Move cursor to DATE."
t)
+(autoload 'calendar-goto-day-of-year "cal-move"
+ "Move cursor to day of year."
+ t)
+
(autoload 'calendar-only-one-frame-setup "cal-x"
"Start calendar and display it in a dedicated frame.")
@@ -2016,6 +2020,7 @@ the inserted text. Value is always t."
(define-key calendar-mode-map "\C-x\C-x" 'calendar-exchange-point-and-mark)
(define-key calendar-mode-map "\e=" 'calendar-count-days-region)
(define-key calendar-mode-map "gd" 'calendar-goto-date)
+ (define-key calendar-mode-map "gD" 'calendar-goto-day-of-year)
(define-key calendar-mode-map "gj" 'calendar-goto-julian-date)
(define-key calendar-mode-map "ga" 'calendar-goto-astro-day-number)
(define-key calendar-mode-map "gh" 'calendar-goto-hebrew-date)
@@ -2622,7 +2627,7 @@ If FILTER is provided, apply it to each key in the alist."
(aseqp (if abbrevs (calendar-abbrev-construct abbrevs sequence
'period)))
alist elem)
- (dotimes (i (1- (length sequence)) (reverse alist))
+ (dotimes (i (length sequence) (reverse alist))
(setq index (+ i offset)
elem (elt sequence i)
alist