--- calendar.el 2013-02-06 10:28:54.679401343 -0800 +++ calendar.el.new 2013-02-06 10:28:25.738455568 -0800 @@ -1417,6 +1417,7 @@ (defun calendar-ensure-newline () "Move to the next line, adding a newline if necessary." + (delete-trailing-whitespace (line-beginning-position) (line-end-position) ) (or (zerop (forward-line 1)) (insert "\n"))) @@ -1499,7 +1500,8 @@ (/= day last)) (calendar-ensure-newline) (setq day (1+ day)) ; first day of next week - (calendar-insert-at-column indent calendar-intermonth-text trunc))))) + (calendar-insert-at-column indent calendar-intermonth-text trunc))) + (delete-trailing-whitespace (line-beginning-position) (line-end-position)))) (defun calendar-redraw () "Redraw the calendar display, if `calendar-buffer' is live."