From 2b11fcd531a5d9e8084344b341aecff379870770 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 26 Jun 2008 07:08:01 +0000 Subject: [PATCH] (calendar-cursor-to-date): Handle case where event-start is nil. --- lisp/ChangeLog | 4 ++++ lisp/calendar/calendar.el | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 78ef7e35b3a..b9683e282dd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -48,6 +48,10 @@ Add doc strings. (cal-menu-context-mouse-menu): Add some :keys. + * calendar/cal-menu.el (cal-menu-moon-menu): Add sunrise/sunset. + * calendar/calendar.el (calendar-cursor-to-date): Handle case where + event-start is nil. + 2008-06-26 Stefan Monnier * minibuffer.el (completion-basic-try-completion): Use the text after diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 35dc6119015..284937f3017 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1787,7 +1787,8 @@ use instead of point." (if event (window-buffer (posn-window (event-start event))) (current-buffer)) (save-excursion - (if event (goto-char (posn-point (event-start event)))) + (and event (setq event (event-start event)) + (goto-char (posn-point event))) (let* ((segment (calendar-column-to-segment)) (month (% (+ displayed-month (1- segment)) 12))) ;; Call with point on either of the two digits in a 2-digit date,