From 61debe4a9c2d555f537a3ed3a45a0f77a2f13c82 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 17 Mar 2014 09:04:32 -0700 Subject: [PATCH] * lisp/calendar/calendar.el (calendar-generate-month): Apply weekend face to the right days; fixes 2013-08-06 change. Fixes: debbugs:17028 --- lisp/ChangeLog | 5 +++++ lisp/calendar/calendar.el | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2946ac5e0a..94240d63a6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-03-17 Glenn Morris + + * calendar/calendar.el (calendar-generate-month): Apply weekend + face to the right days; fixes 2013-08-06 change. (Bug#17028) + 2014-03-17 Michael Albinus * net/tramp.el (tramp-action-out-of-band): Read pending output. diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 37d5dfaedf..57cb488a83 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1546,7 +1546,8 @@ line." (last (calendar-last-day-of-month month year)) (trunc (min calendar-intermonth-spacing (1- calendar-left-margin))) - (day 1)) + (day 1) + j) (goto-char (point-min)) (calendar-move-to-column indent) (insert @@ -1556,11 +1557,11 @@ line." (calendar-insert-at-column indent calendar-intermonth-header trunc) ;; Use the first N characters of each day to head the columns. (dotimes (i 7) + (setq j (mod (+ calendar-week-start-day i) 7)) (insert (truncate-string-to-width - (propertize (calendar-day-name (mod (+ calendar-week-start-day i) 7) - 'header t) - 'font-lock-face (if (memq i '(0 6)) + (propertize (calendar-day-name j 'header t) + 'font-lock-face (if (memq j '(0 6)) 'calendar-weekend-header 'calendar-weekday-header)) calendar-day-header-width nil ?\s) -- 2.20.1