Commit 57dd9e68 authored by Leo Liu's avatar Leo Liu
Browse files

Sync window-point and point in calendar-redraw

Fixes: debbugs:13420
parent 6f24caec
2013-01-14 Leo Liu <sdl.web@gmail.com>
* calendar/calendar.el (calendar-redraw): Sync window-point and point.
(Bug#13420)
2013-01-14 Glenn Morris <rgm@gnu.org>
 
* progmodes/compile.el (compilation-error-regexp-alist-alist):
......
......@@ -1562,11 +1562,13 @@ line."
(defun calendar-redraw ()
"Redraw the calendar display, if `calendar-buffer' is live."
(interactive)
(if (get-buffer calendar-buffer)
(with-current-buffer calendar-buffer
(let ((cursor-date (calendar-cursor-to-nearest-date)))
(calendar-generate-window displayed-month displayed-year)
(calendar-cursor-to-visible-date cursor-date)))))
(when (get-buffer calendar-buffer)
(with-current-buffer calendar-buffer
(let ((cursor-date (calendar-cursor-to-nearest-date)))
(calendar-generate-window displayed-month displayed-year)
(calendar-cursor-to-visible-date cursor-date))
(when (window-live-p (get-buffer-window))
(set-window-point (get-buffer-window) (point))))))
(defvar calendar-mode-map
(let ((map (make-keymap)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment