From be6231e3d15f63b31bec28137ab7a571c239c2bb Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 8 May 1994 06:29:31 +0000 Subject: [PATCH] (calendar-event-to-date): Set buffer in case calendar isn't current. --- lisp/calendar/cal-menu.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el index 3313992d0b3..96faf2b4957 100644 --- a/lisp/calendar/cal-menu.el +++ b/lisp/calendar/cal-menu.el @@ -177,8 +177,9 @@ (put 'insert-weekly-diary-entry 'menu-enable '(calendar-cursor-to-date)) (defun calendar-event-to-date () - "Date of last event. Nil if last event was not done on a date." + "Date of last event. Value is nil if last event was not done on a date." (save-excursion + (set-buffer (window-buffer (posn-window (event-start last-input-event)))) (goto-char (posn-point (event-start last-input-event))) (calendar-cursor-to-date)))