changeset 94312:eaaf578ce48f

(calendar-scroll-left): Handle case when event-start is nil.
author Glenn Morris <rgm@gnu.org>
date Thu, 24 Apr 2008 05:43:27 +0000
parents d550d8d3e7f3
children 17765ebde76c
files lisp/calendar/cal-move.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/cal-move.el	Thu Apr 24 05:42:47 2008 +0000
+++ b/lisp/calendar/cal-move.el	Thu Apr 24 05:43:27 2008 +0000
@@ -144,7 +144,8 @@
                      last-nonmenu-event))
   (unless arg (setq arg 1))
   (save-selected-window
-    (select-window (posn-window (event-start event)))
+    ;; Nil if called from menu-bar.
+    (if (setq event (event-start event)) (select-window (posn-window event)))
     (calendar-cursor-to-nearest-date)
     (unless (zerop arg)
       (let ((old-date (calendar-cursor-to-date))