Reputation: 268
I am using Emacs and open calendar, now i would like to highlight weekend days with a light background color, i tried to google but have no solid solutions. anyone can help on this? thanks a lot!
Sorry I can't post pictures yet, hope i have put the question clearly.
Upvotes: 1
Views: 442
Reputation: 9410
Here you have some code that does that. You would need to change font-lock-doc-string-face
to the face you want to use (or make a new one and configure it) if you don't like the one I used.
(defadvice calendar-generate-month
(after highlight-weekend-days (month year indent) activate)
"Highlight weekend days"
(dotimes (i 31)
(let ((date (list month (1+ i) year)))
(if (or (= (calendar-day-of-week date) 0)
(= (calendar-day-of-week date) 6))
(calendar-mark-visible-date date 'font-lock-doc-string-face)))))
Upvotes: 5