# HG changeset patch # User Glenn Morris # Date 1214464054 0 # Node ID 3046fb222514033fd22e7220956d93734015b696 # Parent c6f95c17e184e1e038d8a2424e3c9baa1a9f1fc4 (calendar-cursor-to-date): Handle case where event-start is nil. diff -r c6f95c17e184 -r 3046fb222514 lisp/calendar/calendar.el --- a/lisp/calendar/calendar.el Thu Jun 26 07:06:27 2008 +0000 +++ b/lisp/calendar/calendar.el Thu Jun 26 07:07:34 2008 +0000 @@ -1787,7 +1787,8 @@ (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,