- (d2 (calendar-absolute-from-gregorian
- (list end-month
- (calendar-last-day-of-month end-month end-year)
- end-year))))
- (increment-calendar-month end-month end-year (1- n))
- (let ((diary-list (if cal-tex-diary
- (cal-tex-list-diary-entries d1 d2)))
- (holidays (if cal-tex-holidays
- (cal-tex-list-holidays d1 d2)))
- other-month other-year)
- (cal-tex-insert-preamble (cal-tex-number-weeks month year n) nil"12pt")
- (if (> n 1)
- (cal-tex-cmd cal-tex-cal-multi-month)
- (cal-tex-cmd cal-tex-cal-one-month))
- (cal-tex-insert-month-header n month year end-month end-year)
- (cal-tex-insert-day-names)
- (cal-tex-nl ".2cm")
- (cal-tex-insert-blank-days month year cal-tex-day-prefix)
- (dotimes (idummy n)
- (setq other-month month
- other-year year)
- (cal-tex-insert-days month year diary-list holidays cal-tex-day-prefix)
- (when (= (mod (calendar-absolute-from-gregorian
- (list month
- (calendar-last-day-of-month month year)
- year))
- 7)
- 6) ; last day of month was Saturday
- (cal-tex-hfill)
- (cal-tex-nl))
- (increment-calendar-month month year 1))
- (cal-tex-insert-blank-days-at-end end-month end-year cal-tex-day-prefix)
- (cal-tex-end-document)))
+ (d2 (progn
+ (calendar-increment-month end-month end-year (1- n))
+ (calendar-absolute-from-gregorian
+ (list end-month
+ (calendar-last-day-of-month end-month end-year)
+ end-year))))
+ (diary-list (if cal-tex-diary (cal-tex-list-diary-entries d1 d2)))
+ (holidays (if cal-tex-holidays (cal-tex-list-holidays d1 d2))))
+ (cal-tex-insert-preamble (cal-tex-number-weeks month year n) nil "12pt")
+ (if (> n 1)
+ (cal-tex-cmd cal-tex-cal-multi-month)
+ (cal-tex-cmd cal-tex-cal-one-month))
+ (cal-tex-insert-month-header n month year end-month end-year)
+ (cal-tex-insert-day-names)
+ (cal-tex-nl ".2cm")
+ (cal-tex-insert-blank-days month year cal-tex-day-prefix)
+ (dotimes (idummy n)
+ (cal-tex-insert-days month year diary-list holidays cal-tex-day-prefix)
+ (when (= (calendar-week-end-day)
+ (calendar-day-of-week
+ (list month
+ (calendar-last-day-of-month month year)
+ year))) ; last day of month was last day of week
+ (cal-tex-hfill)
+ (cal-tex-nl))
+ (calendar-increment-month month year 1))
+ (cal-tex-insert-blank-days-at-end end-month end-year cal-tex-day-prefix))
+ (cal-tex-end-document)