aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/calendar/calendar.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 291452db080..66ee1875a23 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -2169,11 +2169,13 @@ the inserted text. Value is always t."
2169 t) 2169 t)
2170 2170
2171(defun redraw-calendar () 2171(defun redraw-calendar ()
2172 "Redraw the calendar display." 2172 "Redraw the calendar display, if `calendar-buffer' is live."
2173 (interactive) 2173 (interactive)
2174 (let ((cursor-date (calendar-cursor-to-nearest-date))) 2174 (if (get-buffer calendar-buffer)
2175 (generate-calendar-window displayed-month displayed-year) 2175 (with-current-buffer calendar-buffer
2176 (calendar-cursor-to-visible-date cursor-date))) 2176 (let ((cursor-date (calendar-cursor-to-nearest-date)))
2177 (generate-calendar-window displayed-month displayed-year)
2178 (calendar-cursor-to-visible-date cursor-date)))))
2177 2179
2178(defcustom calendar-debug-sexp nil 2180(defcustom calendar-debug-sexp nil
2179 "*Turn debugging on when evaluating a sexp in the diary or holiday list." 2181 "*Turn debugging on when evaluating a sexp in the diary or holiday list."