changeset 96315:3046fb222514

(calendar-cursor-to-date): Handle case where event-start is nil.
author Glenn Morris <rgm@gnu.org>
date Thu, 26 Jun 2008 07:07:34 +0000
parents c6f95c17e184
children 6eafa018d3b6
files lisp/calendar/calendar.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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,