1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-04 08:47:11 +00:00

(calendar-cursor-to-date): Handle case where event-start is nil.

This commit is contained in:
Glenn Morris 2008-06-26 07:08:01 +00:00
parent 2eff62d6fa
commit 2b11fcd531
2 changed files with 6 additions and 1 deletions

View File

@ -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 <monnier@iro.umontreal.ca>
* minibuffer.el (completion-basic-try-completion): Use the text after

View File

@ -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,