changeset 7403:066fec1fce40

(calendar-event-to-date): Set buffer in case calendar isn't current.
author Richard M. Stallman <rms@gnu.org>
date Sun, 08 May 1994 06:29:31 +0000
parents 494ca99e9517
children ce1457fb5ea4
files lisp/calendar/cal-menu.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/cal-menu.el	Sun May 08 06:10:52 1994 +0000
+++ b/lisp/calendar/cal-menu.el	Sun May 08 06:29:31 1994 +0000
@@ -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)))